queries.txt 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. You can enable more powerful views using the custom query language.
  2. The basic format is:
  3. <field> <comparison> [value] [<logic operator> <field> <comparison> [value] [...]]
  4. Field names:
  5. TYPE: 0 for audio files, 1 for video files
  6. FILENAME: Full filename (including path)
  7. LENGTH: Length, in seconds (or hh:mm:ss)
  8. ARTIST: Artist
  9. ALBUM: Album
  10. ALBUMARTIST: Album Artist
  11. TITLE: Title
  12. TRACKNO: Track number of file
  13. GENRE: Genre
  14. YEAR: Year
  15. COMMENT: Comment
  16. COMPOSER: Composer
  17. DISC: Disc number of a CD set
  18. FILESIZE: File size, in kilobytes
  19. FILETIME: Last known file date/time on disk
  20. LASTUPD: Date/time of file imported to library or modified in library
  21. LASTPLAY: Date/time of last play
  22. RATING: Rating value (1-5, or 0 or empty for unrated)
  23. PLAYCOUNT: Number of plays
  24. PUBLISHER: Publisher or record label
  25. DIRECTOR: Film director (for videos)
  26. PRODUCER: Film or Record producer
  27. CATEGORY: Category
  28. REPLAYGAIN_ALBUM_GAIN: ReplayGain Album Gain
  29. REPLAYGAIN_TRACK_GAIN: ReplayGain Track Gain
  30. BITRATE: Bitrate (in KBPS)
  31. TRACKS: Total number of tracks on the disc
  32. DISCS: Total number of discs in the set
  33. ISPODCAST: 1 for a podcast episode, 0 otherwise
  34. PODCASTCHANNEL: The name of the channel for a podcast
  35. PODCASTPUBDATE: Date/time when the podcast was published
  36. LOSSLESS: Shows lossless audio formats, e.g. lossless=1
  37. Comparison operators:
  38. '=': String or integer equals value
  39. '!=': String or integer does not equal value
  40. '<': String or integer is less than value
  41. '>': String or integer is greater than value
  42. '<=': String or integer is less than or equal to value
  43. '>=': String or integer is greater than or equal to value
  44. HAS: String contains value
  45. NOTHAS: String does not contain value
  46. LIKE: String is similar to value ("the" and whitespace are ignored)
  47. BEGINS: String begins with value
  48. BEGINSLIKE: String begins like value
  49. ENDS: String ends with value
  50. ISEMPTY: (no comparison value required) TRUE if <field> is empty
  51. ISNOTEMPTY: (no comparison value required) TRUE if <field> is not empty
  52. Values:
  53. "strings with spaces" or strings_without_spaces
  54. integers can be "32" or just 32
  55. integers for LENGTH can be a plain integer (seconds), or mm:ss or hh:mm:ss
  56. date/timestamps should be [datetime data], which can be either an absolute
  57. or relative time. i.e.: [3 weeks ago], [18:15], [05/30/2003],
  58. [yesterday noon], [3 days ago 5 pm], [now], [5 mn before may 30th], etc.
  59. Logic operators:
  60. &&, &, or AND: boolean AND two comparisons
  61. ||, |, or OR: boolean OR two comparisons
  62. !, or NOT: prefix this to an expression for the boolean NOT of that expression
  63. Examples:
  64. all video files: type = 1
  65. audio by Air longer than 4 minutes: type = 0 & artist = "air" & length > 4:00
  66. all files on drive C: filename BEGINS C:
  67. high rated items that haven't been played lately: rating > 3 & lastplay < [1 week ago]
  68. newly added items that haven't been played yet: lastupd >= [yesterday] & playcount <= 0
  69. Note that you can also use this syntax in the search field of views. Simply prefix a '?' or 'query:' to your search string