Mercurial > audlegacy
diff src/audacious/playlist.c @ 4532:97b29dec6c6b
moved away some stuff from main.c
author | mf0102 <0102@gmx.at> |
---|---|
date | Thu, 08 May 2008 22:49:52 +0200 |
parents | 16466c2624b2 |
children | d4c5719d30d1 |
line wrap: on
line diff
--- a/src/audacious/playlist.c Mon May 05 07:48:56 2008 -0500 +++ b/src/audacious/playlist.c Thu May 08 22:49:52 2008 +0200 @@ -142,6 +142,17 @@ #define EXT_HAVE_SUBTUNE 2 #define EXT_CUSTOM 3 +const gchar *aud_titlestring_presets[] = { + "${title}", + "${?artist:${artist} - }${title}", + "${?artist:${artist} - }${?album:${album} - }${title}", + "${?artist:${artist} - }${?album:${album} - }${?track-number:${track-number}. }${title}", + "${?artist:${artist} }${?album:[ ${album} ] }${?artist:- }${?track-number:${track-number}. }${title}", + "${?album:${album} - }${title}" +}; +const guint n_titlestring_presets = G_N_ELEMENTS(aud_titlestring_presets); + + static gint filter_by_extension(const gchar *filename); static gboolean is_http(const gchar *filename); static gboolean do_precheck(Playlist *playlist, const gchar *uri, ProbeResult **pr); @@ -3324,3 +3335,14 @@ return rv; } + +const gchar * +get_gentitle_format(void) +{ + guint titlestring_preset = cfg.titlestring_preset; + + if (titlestring_preset < n_titlestring_presets) + return aud_titlestring_presets[titlestring_preset]; + + return cfg.gentitle_format; +}