Johannes Weißl
2011-01-24 08:51:25 UTC
Hello!
with the recent request for codec/bitrate information, I remembered a
cmus! For example I would like to display replaygain information, but I
can't think of a good way to map it to short characters. Also I have
to change many format options (format_playlist, format_playlist_va,
altformat_playlist) at once to get a consistent output.
So I thought maybe we can have a discussion if we want something like
this for cmus and how it should potentially look like (syntax)!
There is already a pretty popular format syntax used in the foobar2000
player and MusicBrainz Picard:
http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference
http://musicbrainz.org/doc/Picard_Qt/Scripting
The downside of a language like this is that we loose
backwards-compatibility and the c-like formating. Also the strings tend
to get really lengthy. The advantage is the great expressiveness and the
descriptive names (not too many special characters).
What are your comments / suggestions on this?
Greetings,
Johannes
with the recent request for codec/bitrate information, I remembered a
I don't like adding more format options, there are too many of them
already. But I've been planning to add conditionals support for format
" %02n. %(A%a / %t%:%t%)%= %y %d "
which would become
if (%A is set) {
" %02n. %a / %t%= %y %d "
} else {
" %02n. %t%= %y %d "
}
We could then even deprecate altformat_* options. I'm not sure about the
syntax, comments?
cmus does not support %A (albumartist) but it could be added. There are
also compilation, artistsort, albumartistsort keys so we should probably
allow long tag names, e.g. %{albumartist}, instead of adding more format
characters. Also %u or %{url} would be useful because I want to use
different format for streams.
I think conditionals and long tag names would be a great improvement toalready. But I've been planning to add conditionals support for format
" %02n. %(A%a / %t%:%t%)%= %y %d "
which would become
if (%A is set) {
" %02n. %a / %t%= %y %d "
} else {
" %02n. %t%= %y %d "
}
We could then even deprecate altformat_* options. I'm not sure about the
syntax, comments?
cmus does not support %A (albumartist) but it could be added. There are
also compilation, artistsort, albumartistsort keys so we should probably
allow long tag names, e.g. %{albumartist}, instead of adding more format
characters. Also %u or %{url} would be useful because I want to use
different format for streams.
cmus! For example I would like to display replaygain information, but I
can't think of a good way to map it to short characters. Also I have
to change many format options (format_playlist, format_playlist_va,
altformat_playlist) at once to get a consistent output.
So I thought maybe we can have a discussion if we want something like
this for cmus and how it should potentially look like (syntax)!
There is already a pretty popular format syntax used in the foobar2000
player and MusicBrainz Picard:
http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference
http://musicbrainz.org/doc/Picard_Qt/Scripting
The downside of a language like this is that we loose
backwards-compatibility and the c-like formating. Also the strings tend
to get really lengthy. The advantage is the great expressiveness and the
descriptive names (not too many special characters).
What are your comments / suggestions on this?
Greetings,
Johannes