Commit aaa97c9c authored by Felix Paul Kühne's avatar Felix Paul Kühne

server browsing: don't filter playlist files

(cherry picked from commit cca8a5d8)
parent 7c8d405b
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
- (BOOL)shouldFilterMedia:(VLCMedia *)media - (BOOL)shouldFilterMedia:(VLCMedia *)media
{ {
return ![media.url.absoluteString isSupportedAudioMediaFormat] && ![media.url.absoluteString isSupportedMediaFormat] && media.mediaType != VLCMediaTypeDirectory; NSString *absoluteString = media.url.absoluteString;
return ![absoluteString isSupportedAudioMediaFormat] && ![absoluteString isSupportedMediaFormat] && ![absoluteString isSupportedPlaylistFormat] && media.mediaType != VLCMediaTypeDirectory;
} }
- (void)_addMediaListRootItemsToList - (void)_addMediaListRootItemsToList
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
- (BOOL)isSupportedMediaFormat; - (BOOL)isSupportedMediaFormat;
- (BOOL)isSupportedAudioMediaFormat; - (BOOL)isSupportedAudioMediaFormat;
- (BOOL)isSupportedSubtitleFormat; - (BOOL)isSupportedSubtitleFormat;
- (BOOL)isSupportedPlaylistFormat;
- (BOOL)isSupportedFormat; - (BOOL)isSupportedFormat;
......
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
return ([self rangeOfString:kSupportedSubtitleFileExtensions options:options].location != NSNotFound); return ([self rangeOfString:kSupportedSubtitleFileExtensions options:options].location != NSNotFound);
} }
- (BOOL)isSupportedPlaylistFormat
{
NSUInteger options = NSRegularExpressionSearch | NSCaseInsensitiveSearch;
return ([self rangeOfString:kSupportedPlaylistFileExtensions options:options].location != NSNotFound);
}
- (BOOL)isSupportedFormat - (BOOL)isSupportedFormat
{ {
NSUInteger options = NSRegularExpressionSearch | NSCaseInsensitiveSearch; NSUInteger options = NSRegularExpressionSearch | NSCaseInsensitiveSearch;
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
#define kSupportedFileExtensions @"\\.(3gp|3gp|3gp2|3gpp|amv|asf|avi|axv|divx|dv|flv|f4v|gvi|gxf|m1v|m2p|m2t|m2ts|m2v|m4v|mks|mkv|moov|mov|mp2v|mp4|mpeg|mpeg1|mpeg2|mpeg4|mpg|mpv|mt2s|mts|mxf|mxg|nsv|nuv|oga|ogg|ogm|ogv|ogx|spx|ps|qt|rec|rm|rmvb|tod|ts|tts|vlc|vob|vro|webm|wm|wmv|wtv|xesc)$" #define kSupportedFileExtensions @"\\.(3gp|3gp|3gp2|3gpp|amv|asf|avi|axv|divx|dv|flv|f4v|gvi|gxf|m1v|m2p|m2t|m2ts|m2v|m4v|mks|mkv|moov|mov|mp2v|mp4|mpeg|mpeg1|mpeg2|mpeg4|mpg|mpv|mt2s|mts|mxf|mxg|nsv|nuv|oga|ogg|ogm|ogv|ogx|spx|ps|qt|rec|rm|rmvb|tod|ts|tts|vlc|vob|vro|webm|wm|wmv|wtv|xesc)$"
#define kSupportedSubtitleFileExtensions @"\\.(srt|sub|cdg|idx|utf|ass|ssa|aqt|jss|psb|rt|smi|txt|smil)$" #define kSupportedSubtitleFileExtensions @"\\.(srt|sub|cdg|idx|utf|ass|ssa|aqt|jss|psb|rt|smi|txt|smil)$"
#define kSupportedAudioFileExtensions @"\\.(aac|aiff|aif|amr|aob|ape|axa|caf|flac|it|m2a|m4a|m4b|mka|mlp|mod|mp1|mp2|mp3|mpa|mpc|mpga|oga|ogg|oma|opus|rmi|s3m|spx|tta|voc|vqf|wav|w64|wma|wv|xa|xm)$" #define kSupportedAudioFileExtensions @"\\.(aac|aiff|aif|amr|aob|ape|axa|caf|flac|it|m2a|m4a|m4b|mka|mlp|mod|mp1|mp2|mp3|mpa|mpc|mpga|oga|ogg|oma|opus|rmi|s3m|spx|tta|voc|vqf|wav|w64|wma|wv|xa|xm)$"
#define kSupportedPlaylistFileExtensions @"\\.(asx|b4s|cue|ifo|m3u|m3u8|pls|ram|rar|sdp|vlc|xspf|wax|wvx|zip|conf)$"
#define kBlobHash @"521923d214b9ae628da7987cf621e94c4afdd726" #define kBlobHash @"521923d214b9ae628da7987cf621e94c4afdd726"
......
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