Skip to content

Title formatting

Alexey Yakovenko edited this page Sep 26, 2019 · 4 revisions

NOTICE

This title formatting syntax is deprecated starting with DeaDBeeF 0.7.0.

Please see Title Formatting 2.0 Page for the new syntax.

However, this title formatting is still present in the code, for backwards compatibility, and at the time of writing was still used by ShellExec plugin.

Intro

Title formatting works by replacing special known characters with some text.

Right now, every conversion starts with % symbol.

For example: %a - %t [%l] will produce something like Artist - Title [1:23]

Predefined conversions

Context-specific

  • %a artist
  • %t title
0.4.4: gives the "title" metadata, which at load time may be set from tags, or from a filename
0.5: gives either "title" metadata if set, or builds from filename
that means 0.4.4 and 0.5 should display the same results for `%t`, but they work differently
in 0.4.4 empty title metadata would be automatically replaced with filename, which would conflict with what is actually in the file
  • %b album
  • %B band / album artist
0.4.4: gives whatever was set as "band" metadata at load time
0.5: gives "band", or "album artist" or "albumartist" or "artist", whichever exists, in this order
  • %n track nr
  • %N numtracks (in album)
  • %l length (duration)
  • %e playback position
  • %y date or year
  • %g genre
  • %c comment
  • %C composer
  • %r copyright
  • %T tags
  • %f filename without path
  • %F full pathname/uri
  • %d directory without path (e.g. /home/user/file.mp3 -> user)
  • %D directory name with full path (e.g. /home/user/file.mp3 -> /home/user)
  • %X total number of selected tracks in current context (e.g. in current playlist)
  • %L total playback length of selected tracks
  • %Z channel configuration (mono/stereo/..)

Global

  • %V deadbeef version number

Direct field access

This is a new feature in v0.5

You may access any metadata field using %@FIELD_NAME@ syntax

For example, %@ALBUM@ will give the album name.

It is also possible to access read-only properties in this way. They are shown in 2nd page of Track Properties dialog. They all start with ":" character. So, to get bitrate - you should write %@:BITRATE@.

Field names are not case sensitive, so you may use %@:bitrate@ as well.

Spaces are allowed in field names, so %@album artist@ is legal syntax.

List of standard editable fields:

  • artist
  • disc
  • title
  • album
  • band
  • copyright
  • genre
  • composer
  • performer
  • year
  • track

List of standard read-only fields:

  • :URI - Location/filepath
  • :TRACKNUM - subtrack index
  • :DURATION - length of track in seconds
  • :TAGS - list of tags in text form, e.g. "ID3v2 | APEv2"
  • :HAS_EMBEDDED_CUESHEET - Yes/No
  • :DECODER - id of the currently selected input/decoder plugin

Most field names are directly corresponding to their names in Track Properties dialog.