Browse Source

ftp: implement 'isDownloadable' flag

(cherry picked from commit a46cd3a713a646f9b31da89cea0d143600d52509)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 9 years ago
parent
commit
ba3e79752b

+ 1 - 0
SharedSources/ServerBrowsing/FTP/VLCNetworkServerBrowserFTP.h

@@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (instancetype)initWithDictionary:(NSDictionary *)dict baseURL:(NSURL *)baseURL;
 
 @property (nonatomic, readwrite) NSArray<id<VLCNetworkServerBrowserItem>> *items;
+@property (nonatomic, getter=isDownloadable, readonly) BOOL downloadable;
 
 @end
 

+ 6 - 0
SharedSources/ServerBrowsing/FTP/VLCNetworkServerBrowserFTP.m

@@ -155,6 +155,12 @@
     return [[VLCNetworkServerBrowserFTP alloc] initWithURL:self.URL];
 }
 
+- (BOOL)isDownloadable
+{
+    //VLC also needs an extension in the filename for this to work.
+    return YES;
+}
+
 - (VLCMedia *)media
 {
     if (_URL)