diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-07 22:49:11 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-07 22:49:11 +0200 |
commit | 92debcdb77488c3350324c7ebd765aa250d55287 (patch) | |
tree | bdaa8188851bb9f9faf53a0c055f4787e0112586 | |
parent | 8a3ba0253ad9b38510447263d2b81378dcd0465e (diff) |
add vorbis file name if no vorbis comment found
-rw-r--r-- | cvorbis.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -120,6 +120,7 @@ cvorbis_insert (playItem_t *after, const char *fname) { it->timeend = 0; // metainfo + int title_added = 0; vorbis_comment *vc = ov_comment (&vorbis_file, -1); if (vc) { ps_add_meta (it, "vendor", vc->vendor); @@ -129,12 +130,16 @@ cvorbis_insert (playItem_t *after, const char *fname) { } else if (!strncmp (vc->user_comments[i], "title=", 6)) { ps_add_meta (it, "title", vc->user_comments[i] + 6); + title_added = 1; } else if (!strncmp (vc->user_comments[i], "date=", 5)) { ps_add_meta (it, "date", vc->user_comments[i] + 5); } } } + if (!title_added) { + ps_add_meta (it, "title", NULL); + } ov_clear (&vorbis_file); after = ps_insert_item (after, it); return after; |