summaryrefslogtreecommitdiff
path: root/apps/hosted/notification.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/hosted/notification.c')
-rw-r--r--apps/hosted/notification.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/hosted/notification.c b/apps/hosted/notification.c
index 4df5b9d6d2..faa1247860 100644
--- a/apps/hosted/notification.c
+++ b/apps/hosted/notification.c
@@ -56,13 +56,12 @@ static void track_changed_callback(void *param)
56 56
57 char buf[200]; 57 char buf[200];
58 const char * ptitle = id3->title; 58 const char * ptitle = id3->title;
59 if (!ptitle) 59 if (!ptitle && *id3->path)
60 { /* pass the filename as title if id3 info isn't available */ 60 { /* pass the filename as title if id3 info isn't available */
61 ptitle = 61 ptitle = strip_extension(buf, sizeof(buf), strrchr(id3->path,'/') + 1);
62 strip_extension(buf, sizeof(buf), strrchr(id3->path,'/') + 1);
63 } 62 }
64 63
65 title = e->NewStringUTF(env_ptr, ptitle); 64 title = e->NewStringUTF(env_ptr, ptitle ?: "");
66 artist = e->NewStringUTF(env_ptr, id3->artist ?: ""); 65 artist = e->NewStringUTF(env_ptr, id3->artist ?: "");
67 album = e->NewStringUTF(env_ptr, id3->album ?: ""); 66 album = e->NewStringUTF(env_ptr, id3->album ?: "");
68 67