Track Info Template SDK

From wiki.jriver.com
Revision as of 05:48, 4 May 2015 by Glynor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

basoulacaal This SDK contains everything you need to create your own Track Info template for Media Center.

Writing a template

A Track Info template is a standard HTML file with some parts of it replaced by keywords which Media Center replaces with track information.

The following predefined keywords are available:

Paths:

  • TRACKINFO_INSERT_TRACKPATH - full path to the currently playing file. ( example E:\\Music\Metallica\ )

Graphics:

  • TRACKINFO_INSERT_IMAGE - Image file associated with track.

General Info (text):

  • TRACKINFO_INSERT_ARTIST - Artist
  • TRACKINFO_INSERT_ALBUM - Album
  • TRACKINFO_INSERT_TITLE - Title
  • TRACKINFO_INSERT_YEAR - Year
  • TRACKINFO_INSERT_COMMENT - Comment
  • TRACKINFO_INSERT_GENRE - Genre
  • TRACKINFO_INSERT_FORMAT - Format of the encoding
  • TRACKINFO_INSERT_BITRATE - Bitrate
  • TRACKINFO_INSERT_DURATION - Duration in hours and minutes format (01:43)
  • TRACKINFO_INSERT_SIZE - Size of the file
  • TRACKINFO_INSERT_TRACKNUMBER - Track number
  • TRACKINFO_INSERT_RATING - File rating
  • TRACKINFO_INSERT_PLAYLISTS - Playlists associated with the track.
  • TRACKINFO_INSERT_FILENAME - Full path to currently playing file.
  • TRACKINFO_INSERT_NUMBERPLAYED - Number of times file has been played.
  • TRACKINFO_INSERT_DATE - Date when file was created.
  • TRACKINFO_INSERT_LAST_PLAYED - Date when file was last played.
  • TRACKINFO_INSERT_LYRICS - Track lyrics
  • TRACKINFO_INSERT_NOTES - Track Notes
  • TRACKINFO_INSERT_PN_POSITION - Position of the track in currently playing list.
  • TRACKINFO_INSERT_PN_TRACKS - Total number of tracks in currently playing list.

The following fields are no longer supported:

  • TRACKINFO_INSERT_CUSTOM1 - Custom field 1
  • TRACKINFO_INSERT_CUSTOM2 - Custom field 2
  • TRACKINFO_INSERT_CUSTOM3 - Custom field 3
  • CUSTOMNAME1:
  • CUSTOMNAME2:
  • CUSTOMNAME3:

In addition to predefined keywords you can use Track Info commands with the name (predefined or user defined) of the field:

  • TrackInfo_Insert(field name)
  • TrackInfo_IsEmpty(field name)

Examples:

  • TrackInfo_Insert(Artist) will result in the whole string being replaced by artist name.
  • TrackInfo_Insert(Cool New Field) will result in the whole string being replaced by contents of the user created field called Cool New Field.
  • TrackInfo_IsEmpty(Lyrics) will result in the whole string being replaced by TRUE or FALSE depending whether the field is empty or not. TRUE - the field is empty; False - the field is not empty

External Pages

If you want to link to a page which contains Track Info keywords use TRACKINFO_OPENPAGE_ before filename.

Example: <a href="TRACKINFO_OPENPAGE_lyrics.html">LYRICS</a>