diff options
author | 2009-07-19 17:03:25 +0200 | |
---|---|---|
committer | 2009-07-19 17:03:25 +0200 | |
commit | 98748e25707b9b688a8ea15ed5eef035e23dd0c8 (patch) | |
tree | 026d4f6574a8e7b3968c5782a9533ee68a67692c /playlist.c | |
parent | f87672ba62ec14a91f16a801e5fd019d1f4dcf59 (diff) |
added ogg metainfo
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -518,7 +518,19 @@ ps_format_item_display_name (playItem_t *it) { const char *artist = ps_find_meta (it, "artist"); const char *album = ps_find_meta (it, "album"); const char *title = ps_find_meta (it, "title"); - snprintf (it->displayname, MAX_DISPLAY_NAME, "%s. %s - %s - %s", track, artist, album, title); + if (*track == '?' && *album == '?' && *artist != '?' && *title != '?') { + snprintf (it->displayname, MAX_DISPLAY_NAME, "%s - %s", artist, title); + } + else if (*artist == '?' && *track != '?' && *album != '?') { + snprintf (it->displayname, MAX_DISPLAY_NAME, "%s. %s", track, album); + } + else if (*artist != '?' && *track != '?' && *album != '?') { + snprintf (it->displayname, MAX_DISPLAY_NAME, "%s. %s - %s", track, artist, album); + } + else { + //snprintf (it->displayname, MAX_DISPLAY_NAME, "%s", title); + strncpy (it->displayname, it->fname, MAX_DISPLAY_NAME); + } } const char * |