Wiki

Clone wiki

Shampoo / SubsitutableVariables

Substitutable variables

Some textboxes from the Shampoo graphical interface let you specify dynamic portions of text. When read, variable names enclosed between special tags are interpreted and substituted with pieces of text automatically generated by Shampoo. The default definition of a variable is:

${variable}

An optional prefix and suffix can be specified along with the variable to substitute using the following syntax:

${prefix$variable$suffix}

If, and only if, the variable is resolved to some non-empty text, then the pristine prefix and suffix will be added before and after it, respectively. Please note you must both define a prefix and a suffix if you use the latter syntax. Prefixes, suffixes, and variable names cannot contain the $ (dollar sign), { (open curly bracket), and } (close curly bracket) characters.

Valid variable names

The following variable names will be replaced with the corresponding metadata value.

  • playlistLabel, the label of the current playlist
  • playlistDescription, the description of the current playlist
  • playlistID, the identifier of the current playlist
  • timetableSlotID, the identifier of the current timetable slot
  • programmeLabel, the label of the current programme
  • channelLabel, the label of the current channel
  • pegiRatingAge, the restricted age in the PEGI rating of the current item
  • pegiRatingFeatures, the different features of a PEGI rating for the current item
  • authorizedPlayingDuration, the allowed duration, in hours, minutes, and milliseconds, for the current item
  • scheduledStartTime, the start time of the current item, following the full ISO 8601 time format
  • itemID, the identifier of the current music track
  • itemTitle, the title of the current music track, similar to the ID3v1 song title tag
  • itemAuthor, the author of the current music track, similar to the ID3v1 artist tag
  • itemAlbum, the album of the current music track, similar to the ID3v1 album tag
  • itemGenre, the identifier of the current music track, similar to the ID3v1 genre tag
  • itemDateOfRelease, the free-form date of release of the current music track, similar to the ID3v1 year tag
  • itemDescription, the description of the current music track, similar to the ID3v1 comment tag
  • itemType, the type of the current music track, it is either song, jingle, or advert.
  • tag, the free-form tag or tag set of the current item
  • copyright, the free-form copyright notice of the current item
  • programmeRotationCount, the number of times the current music track has been played for a given programme
  • requestAuthor, the name of the user who requested the current music track to be played
  • requestMessage, the message given by the user who requested the current music track to be played

URIs and URLs can only use the following variables:

  • queueID, the queue identifier of the current item
  • playlistID, the identifier of the current playlist
  • timetableSlotID, the identifier of the current timetable slot
  • programmeLabel, the label of the current programme
  • channelLabel, the label of the current channel

Example

[${programmeLabel}] ${$itemAuthor$ - }${itemTitle}${ ($itemDateOfRelease$)}
  • can be rendered as: "[The Italo Disco Session] B.W.H - Stop (1983)" if every variables can be resolved and are not empty,
  • or: "[] Stop (1983)" if both programmeLabel and itemAuthor cannot be resolved or are empty,
  • or "[The Italo Disco Session] B.W.H - Stop" if only itemDateOfRelease cannot be resolved or is empty.

Updated