diff options
author | waker <wakeroid@gmail.com> | 2011-03-24 21:30:11 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-03-24 21:30:11 +0100 |
commit | fd04c7a395f4ac26942222e29e2dd9a8901bff41 (patch) | |
tree | 0ed33d33f0171603c7f6503b52f5512770e59fcd /plugins/gtkui/gtkui.c | |
parent | 2278425be18b7600c055e54e5777b44858e1af4e (diff) |
got rid of filetype field in playitem structure
Diffstat (limited to 'plugins/gtkui/gtkui.c')
-rw-r--r-- | plugins/gtkui/gtkui.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 15afcf6b..f2c6d30d 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -190,7 +190,11 @@ update_songinfo (gpointer ctx) { } } const char *spaused = deadbeef->get_output ()->state () == OUTPUT_STATE_PAUSED ? _("Paused | ") : ""; - snprintf (sbtext_new, sizeof (sbtext_new), _("%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d tracks | %s total playtime"), spaused, track->filetype ? track->filetype:"-", sbitrate, samplerate, bitspersample, mode, minpos, secpos, t, deadbeef->pl_getcount (PL_MAIN), totaltime_str); + const char *filetype = deadbeef->pl_find_meta (track, ":FILETYPE"); + if (!filetype) { + filetype = "-"; + } + snprintf (sbtext_new, sizeof (sbtext_new), _("%s%s %s| %dHz | %d bit | %s | %d:%02d / %s | %d tracks | %s total playtime"), spaused, filetype, sbitrate, samplerate, bitspersample, mode, minpos, secpos, t, deadbeef->pl_getcount (PL_MAIN), totaltime_str); } if (strcmp (sbtext_new, sb_text)) { |