BrowseAmp manual


2.3.4 media library commands
BrowseAmp -> creating skins -> Hyperlink commands -> media library commands

query the Winamp media library


Specify the query string to use with a media library query. Affects the output of the medialibrary tag.

<string>: Query string to use.

how to use queries
Here is a list of valid query strings taken from the Winamp help

<field> <comparison> [value] [<logic operator> <field> <comparison> [value] [...]]

Field names:
TYPE: 0 for audio files, 1 for video files
FILENAME: Full filename (including path)
LENGTH: Length, in seconds (or hh:mm:ss)
ARTIST: Artist
ALBUM: Album
TITLE: Title
TRACKNO: Track number of file
GENRE: Genre
YEAR: Year
COMMENT: Comment
FILESIZE: File size, in kilobytes
FILEDATE: Last known file date/time on disk
LASTUPD: Date/time of file imported to library or modified in library
LASTPLAY: Date/time of last play
RATING: Rating value (1-5, or 0 or empty for unrated)
PLAYCOUNT: Number of plays
BITRATE: Bitrate (in KBPS)

Comparison operators:
'=': String or integer equals value
'!=': String or integer does not equal value
'<': String or integer is less than value
'>': String or integer is greater than value
'<=': String or integer is less than or equal to value
'>=': String or integer is greater than or equal to value
HAS: String contains value
NOTHAS: String does not contain value
LIKE: String is similar to value ("the" and whitespace are ignored)
BEGINS: String begins with value
ENDS: String ends with value
ISEMPTY: (no comparison value required) TRUE if <field> is empty
ISNOTEMPTY: (no comparison value required) TRUE if <field> is not empty

"strings with spaces" or strings_without_spaces
integers can be "32" or just 32
integers for LENGTH can be a plain integer (seconds), or mm:ss or hh:mm:ss
date/timestamps should be [datetime data], which can be either an absolute
or relative time. i.e.: [3 weeks ago], [18:15], [05/30/2003],
[yesterday noon], [3 days ago 5 pm], [now], [5 mn before may 30th], etc.

Logic operators:
&&, &, or AND: boolean AND two comparisons
||, |, or OR: boolean OR two comparisons
!, or NOT: prefix this to an expression for the boolean NOT of that expression

all video files: type = 1
audio by Air longer than 4 minutes: type = 0 & artist = "air" & length > 4:00
all files on drive C: filename BEGINS C:
high rated items that haven't been played lately: rating > 3 & lastplay < [1 week ago]
newly added items that haven't been played yet: lastupd >= [yesterday] & playcount > 0

Example 1
<a href="medialibrary.html?refresh&query=lastplay &gt; [2 weeks ago]">Recently Played</a>

Example 2
<a href="medialibrary.html?refresh&query=playcount!=0">Most


search the Winamp media library


This tag is used to do a keyword search on the media library. It affects the output of the medialibrary tag.

<string>: keyword to search for.

Example 1
<form name="form1" method="get" action="">search the media library: <input name="search_ml" type="text" id="search_ml" value="<#search_ml>" size="50"></form>


search the Winamp media library


Select a page when length in the medialibrary tag is set. With some JavaScript you can navigate within the pages. See eXtended skin for example.

#: page to show.

Example 1
<script language="JavaScript" type="text/JavaScript">
ml_page = <#ml_page>;
document.write("<a href=\"medialibrary.html?refresh&query=<#query escape=1>&search_ml=<#search_ml>&ml_page="+Math.max(ml_page-1,0)+"\">prev</a>");
document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">");
document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">");
document.write("<a href=\"medialibrary.html?refresh&query=<#query escape=1>&search_ml=<#search_ml>&ml_page="+(ml_page+1)+"\">next</a>");


set rating of a Winamp media library item


First select a file with the usefile command. Then set a new rating with rating=#.

#: rating (0..5).

rate this file:
<a href="?usefile=<#CurrentTrackFilename>&rating=0">0</a>
<a href="?usefile=<#CurrentTrackFilename>&rating=1">1</a>
<a href="?usefile=<#CurrentTrackFilename>&rating=2">2</a>
<a href="?usefile=<#CurrentTrackFilename>&rating=3">3</a>
<a href="?usefile=<#CurrentTrackFilename>&rating=4">4</a>
<a href="?usefile=<#CurrentTrackFilename>&rating=5">5</a>

last change: 2008-02-27 , Henry Thasler