diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-07 22:37:32 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-07 22:37:32 +0200 |
commit | 4fa0d0375913a45ae93103ce6f006f8fa134357b (patch) | |
tree | ae8621292e93fefe963c433d191384daa1a36668 /cmp3.c | |
parent | 403128abb088f8db7d64ef00b965198192194e4a (diff) |
added flac vorbiscomment metadata support
Diffstat (limited to 'cmp3.c')
-rw-r--r-- | cmp3.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -753,6 +753,7 @@ cmp3_read_id3v1 (playItem_t *it, FILE *fp) { int cmp3_read_id3v2 (playItem_t *it, FILE *fp) { + int title_added = 0; if (!it || !fp) { printf ("bad call to cmp3_read_id3v2!\n"); return -1; @@ -872,6 +873,7 @@ cmp3_read_id3v2 (playItem_t *it, FILE *fp) { memcpy (str, readptr, sz); str[sz] = 0; ps_add_meta (it, "title", convstr (str, sz)); + title_added = 1; } readptr += sz; } @@ -910,10 +912,14 @@ cmp3_read_id3v2 (playItem_t *it, FILE *fp) { memcpy (str, readptr, sz); str[sz] = 0; ps_add_meta (it, "title", convstr (str, sz)); + title_added = 1; } readptr += sz; } } + if (!title_added) { + ps_add_meta (it, "title", NULL); + } return 0; } |