Commit c90b9e4b authored by Tobias's avatar Tobias

fix download file name for some services

parent f0336695
......@@ -104,7 +104,15 @@
- (void)_downloadItem:(id<VLCNetworkServerBrowserItem>)item
{
[[VLCDownloadViewController sharedInstance] addURLToDownloadList:item.URL fileNameOfMedia:[item.name stringByAppendingPathExtension:item.URL.pathExtension]];
NSString *filename = item.name;
if (filename.pathExtension.length == 0) {
/* there are few crappy UPnP servers who don't reveal the correct file extension, so we use a generic fake (#11123) */
NSString *urlExtension = item.URL.pathExtension;
NSString *extension = urlExtension.length!=0 ? urlExtension : @"vlc";
filename = [filename stringByAppendingPathExtension:extension];
}
[[VLCDownloadViewController sharedInstance] addURLToDownloadList:item.URL
fileNameOfMedia:filename];
}
- (void)_streamFileForItem:(id<VLCNetworkServerBrowserItem>)item
......
Markdown is supported
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