Commit bc429621 authored by Pierre SAGASPE's avatar Pierre SAGASPE

SharedLibrary: implement 'isDownloadable' flag

parent ac4618de
......@@ -2,7 +2,7 @@
* VLCNetworkServerBrowserSharedLibrary.h
* VLC for iOS
*****************************************************************************
* Copyright (c) 2015 VideoLAN. All rights reserved.
* Copyright (c) 2015-2017 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Tobias Conradi <videolan # tobias-conradi.de>
......@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly, nullable) NSURL *subtitleURL;
@property (nonatomic, readonly, nullable) NSString *duration;
@property (nonatomic, readonly, nullable) NSURL *thumbnailURL;
@property (nonatomic, getter=isDownloadable, readonly) BOOL downloadable;
@end
......
......@@ -2,7 +2,7 @@
* VLCNetworkServerBrowserSharedLibrary.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2015 VideoLAN. All rights reserved.
* Copyright (c) 2015-2017 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Tobias Conradi <videolan # tobias-conradi.de>
......@@ -107,6 +107,12 @@
return nil;
}
- (BOOL)isDownloadable
{
//VLC also needs an extension in the filename for this to work.
return YES;
}
- (VLCMedia *)media
{
if (!_URL)
......@@ -114,4 +120,4 @@
return [VLCMedia mediaWithURL:_URL];
}
@end
\ No newline at end of file
@end
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