X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=README.afs;h=edd2d17be98591391a7d3ceab0a820cf12b77763;hp=ca01df6ac678a7cb3b1be14ac5957a1ddb1a4137;hb=f8ea51cdb591ef482806563a862e1ef28c2ed89c;hpb=002731cd3938f3be6b71651e56c062af1adcdec0 diff --git a/README.afs b/README.afs index ca01df6a..edd2d17b 100644 --- a/README.afs +++ b/README.afs @@ -78,10 +78,10 @@ A mood consists of a unique name and its *mood definition*, which is a set of *mood lines* containing expressions in terms of attributes and other data contained in the database. -A mood defines a subset of audio files called the *admissible audio -files* for that mood. At any time, at most one mood can be *active* -which means that para_server is going to select only files from that -subset of admissible files. +A mood defines a subset of audio files called the *admissible audio files* +for that mood. At any time, at most one mood can be *active* which +means that para_server is going to select only files from that subset +of admissible files. So in order to create a mood definition one has to write a set of mood lines. Mood lines come in three flavours: Accept lines, deny @@ -156,20 +156,42 @@ List of mood_methods Takes no arguments and matches an audio file if and only if no attributes are set. - played_rarely - -Takes no arguments and matches all audio files where the number of -times this audio file was selected is below the average. - - is_set attribute_name + is_set Takes the name of an attribute and matches iff that attribute is set. - path_matches pattern + path_matches Takes a filename pattern and matches iff the path of the audio file matches the pattern. + artist_matches + album_matches + title_matches + comment_matches + +Takes an extended regular expression and matches iff the text of the +corresponding tag of the audio file matches the pattern. If the tag +is not set, the empty string is matched against the pattern. + + year ~ + bitrate ~ + frequency ~ + channels ~ + +Takes a comparator ~ of the set {<, =, <=, >, >=, !=} and a number +. Matches an audio file iff the condition ~ is +satisfied where val is the corresponding value of the audio file +(bitrate in kbit/s, frequency in Hz, channel count, value of the +year tag). + +The year tag is special as its value is undefined if the audio file +has no year tag or the content of the year tag is not a number. Such +audio files never match. Another difference is the special treatment +if the year tag is a two-digit number. In this case either 1900 or +2000 are added to the tag value, depending on whether the number is +greater than 2000 plus the current year. + ---------- Mood usage