BrowseAmp manual
version

 

back
2.2.6 media library
BrowseAmp -> creating skins -> HTML tags -> media library

show the results of a Winamp media library query

<#medialibrary template=filename empty=filename basequery='type==0'>

Used to build the medialibrary. You can specify a base query.

Parameter
template: required, Specifies a path/filename to use as template for a medialibrary entry. The template is inserted for EVERY item resulting from the media library query. You can use table rows <tr>...</tr> for example.

basequery
: Base Winamp media library query string to use with this tag. You can specify other queries with the query command, but the basequery is always added (logical AND) to the resulting query.

length: How many rows to display. Use this parameter with the ml_page command to navigate between pages.

Example 1
<#medialibrary template=templates/medialibrary_row1.html empty=templates/medialibrary_empty.html>
use the medialibrary_row1.html template and the medialibrary_empty.html template for empty search results.

Example 2
<#medialibrary template=templates/medialibrary_row1.html empty=templates/medialibrary_empty.html basequery='type==1'>
Same as above but forces the display of video files.

 

show the artist of a media library entry

<#medialibrary_artist>

Use this in a template for medialibrary. The tag is replaced with the artist of an entry.

Parameter
none

Example
<a href='?query=artist=="<#medialibrary_artist urlencoded=1>"'><#medialibrary_artist></a>


show the title of a media library entry

<#medialibrary_title>

Use this in a template for medialibrary. The tag is replaced with the title of an entry.

Parameter
none

Example
<a href="index.html?file=<#medialibrary_filename urlencoded=true>&page=medialibrary" target="_top"><b><#medialibrary_title></b></a>


show the genre of a media library entry

<#medialibrary_genre>

Use this in a template for medialibrary. The tag is replaced with the genre of an entry.

Parameter
none

Example
<a href='?query=genre=="<#medialibrary_genre urlencoded=1>"'><#medialibrary_genre></a>


show the album of a media library entry

<#medialibrary_album>

Use this in a template for medialibrary. The tag is replaced with the album of an entry.

Parameter
none

Example
<a href='?query=album=="<#medialibrary_album urlencoded=1>"'><#medialibrary_album></a>


show the length of a media library entry in minutes

<#medialibrary_songlengthmin>

Should be used in a template for medialibrary. The tag is replaced with the length of a track in the media library in minutes. Creates numbers from 1...n.

Parameter
none.

Example
<#medialibrary_songlengthmin>:<#medialibrary_songlengthsec>


show the length of a media library entry in seconds

<#medialibrary_songlengthsec>

Should be used in a template for medialibrary. The tag is replaced with the length of a track in the media library in seconds. Creates numbers from 01...nn.

Parameter
none.

Example
<#medialibrary_songlengthmin>:<#medialibrary_songlengthsec>


show the tracknumber of a media library entry

<#medialibrary_tracknumber>

Should be used in a template for medialibrary. The tag is replaced with the tracknumber (within the album) of an entry. Creates numbers from 1...n or an empty string if no tracknumber is given

Parameter
none.

Example
<td><#medialibrary_tracknumber></td>


show the year of a media library entry

<#medialibrary_year>

Should be used in a template for medialibrary. The tag is replaced with the year (of release) of an entry. Creates numbers or an empty string if no year is given.

Parameter
none.

Example
<a href='?query=year=="<#medialibrary_year urlencoded=1>"'><#medialibrary_year></a>


show the rating of a media library entry

<#medialibrary_rating>

Should be used in a template for medialibrary. The tag is replaced with the rating of an entry. Creates numbers from 1...5 or an empty string if no rating is given.

Parameter
none.

Example
<a href='?query=rating=="<#medialibrary_rating urlencoded=1>"'><#medialibrary_rating></a>


show the play count of a media library entry

<#medialibrary_playcount>

Should be used in a template for medialibrary. The tag is replaced with the play count of an entry. Creates numbers from 1...n or an empty string if never played.

Parameter
none.

Example
<a href='?query=playcount=="<#medialibrary_playcount urlencoded=1>"'><#medialibrary_playcount></a>


show the date when a media library entry was played

<#medialibrary_lastplayed>

Should be used in a template for medialibrary. The tag is replaced with the date when an entry was played. Creates a string(date and time) or an empty string if never played.

Parameter
none.

Example
<#medialibrary_lastplayed>

 

show the filename of a media library entry

<#medialibrary_filename>

Should be used in a template for medialibrary. The tag is replaced with the filename of an entry.

Parameter
none.

Example
<a href="index.html?file=<#medialibrary_filename urlencoded=true>&page=medialibrary" target="_top"><b><#medialibrary_title></b></a>


show the filename of a media library entry

<#medialibrary_form_filename>

Should be used in a template for medialibrary. The tag is replaced with the filename modified to be used in a form (e.g. checkbox).

Parameter
none.

Example
<input name="add" type="checkbox" id="add" value="<#medialibrary_form_filename>">


show the filename of a media library entry

<#medialibrary_filesize>

Should be used in a template for medialibrary. The tag is replaced with the filesize of an entry.

Parameter
none.

Example
<a href="index.html?file=<#medialibrary_filename urlencoded=true>&page=medialibrary" target="_top" title="<#medialibrary_filesize> MB"><b><#medialibrary_title></b></a>

 

insert the string the media library was searched for

<#search_ml>

Insert the string the media library was searched for.

Parameter
maxlength: How many chars to display

Example
<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>


insert the string the media library was searched for

<#query>

Insert the query string that is currently used for the media library tag.

Parameter
none.

Example
<input name="query" type="text" id="query" value="<#query escape=1>" size="50"> &nbsp; <input type="submit" name="button" value=" query ">

 

insert the selected page

<#ml_page>

Insert the page you selected. See ml_page command.

Parameter
maxlength: How many chars to display

Example
<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>


insert the total number of media library pages

<#ml_pages>

Insert the number of pages resulting from your medialibrary request. You can build a page selector with JavaScript in combination with the <#ml_page> tag. See example below.

ATTENTION: Use this tag after the <#medialibrary> tag because the number of pages is calculated in the <#medialibrary> tag. Otherwise you get a 0xffff result. See eXtended skin for a detailed example.

Parameter
maxlength: How many chars to display

Example
<script language="JavaScript" type="text/JavaScript"> ml_page = <#ml_page>; ml_pages = <#ml_pages>; if(ml_page>0) 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>"); else document.write("prev"); document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">"); document.write("(" + <#ml_results> + " Results) Page #" +(ml_page+1) + " of " +(ml_pages)); document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">"); if((ml_page+1)<ml_pages) document.write("<a href=\"medialibrary.html?refresh&query=<#query escape=1>&search_ml=<#search_ml>&ml_page="+(ml_page+1)+"\">next</a>"); else document.write("next"); </script>


insert the number of results from your ML query

<#ml_results>

Insert the number of results from your medialibrary query. See example below.

ATTENTION: Use this tag after the <#medialibrary> tag because the number of pages is calculated in the <#medialibrary> tag. Otherwise you get a 0xffff result. See eXtended skin for a detailed example.

Parameter
maxlength: How many chars to display

Example
<script language="JavaScript" type="text/JavaScript"> ml_page = <#ml_page>; ml_pages = <#ml_pages>; if(ml_page>0) 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>"); else document.write("prev"); document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">"); document.write("(" + <#ml_results> + " Results) Page #" +(ml_page+1) + " of " +(ml_pages)); document.write("<img src=\"clearpixel.gif\" width=\"20\" height=\"1\">"); if((ml_page+1)<ml_pages) document.write("<a href=\"medialibrary.html?refresh&query=<#query escape=1>&search_ml=<#search_ml>&ml_page="+(ml_page+1)+"\">next</a>"); else document.write("next"); </script>

 

 

 

 

 

last change: 2008-02-29 , Henry Thasler
www.browseamp.com