Commit 463bbfad authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

web socket: make sure to always return some sort of title

parent dadbff2d
......@@ -119,10 +119,11 @@
VLCMedia *media = player.media;
if (media) {
NSURL *url = media.url;
NSString *mediaTitle = vpc.mediaTitle;
if (!mediaTitle)
mediaTitle = @"";
NSDictionary *mediaDict = @{ @"id" : media.url.absoluteString,
mediaTitle = url.lastPathComponent;
NSDictionary *mediaDict = @{ @"id" : url.absoluteString,
@"title" : mediaTitle,
@"duration" : @(media.length.intValue)};
returnDict = @{ @"currentTime" : @(player.time.intValue),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment