summaryrefslogtreecommitdiff
path: root/cmp3.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmp3.c')
-rw-r--r--cmp3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmp3.c b/cmp3.c
index 13e7bf97..17b41edf 100644
--- a/cmp3.c
+++ b/cmp3.c
@@ -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;
}