Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
b50e950a
Commit
b50e950a
authored
May 12, 2016
by
Pierre SAGASPE
Committed by
Felix Paul Kühne
Jun 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ftp : displaying subtitles files in browser
(cherry picked from commit
2dc59b1b
)
parent
f2525a50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
SharedSources/ServerBrowsing/FTP/VLCNetworkServerBrowserFTP.m
...edSources/ServerBrowsing/FTP/VLCNetworkServerBrowserFTP.m
+21
-2
No files found.
SharedSources/ServerBrowsing/FTP/VLCNetworkServerBrowserFTP.m
View file @
b50e950a
...
...
@@ -100,8 +100,27 @@
for
(
NSUInteger
x
=
0
;
x
<
count
;
x
++
)
{
NSDictionary
*
dict
=
rawList
[
x
];
if
(
!
[[
dict
objectForKey
:(
id
)
kCFFTPResourceName
]
hasPrefix
:
@"."
])
[
filteredList
addObject
:[[
VLCNetworkServerBrowserItemFTP
alloc
]
initWithDictionary
:
dict
baseURL
:
self
.
url
]];
if
([[
dict
objectForKey
:(
id
)
kCFFTPResourceName
]
isSupportedSubtitleFormat
])
[
subtitleList
addObject
:[
dict
objectForKey
:(
id
)
kCFFTPResourceName
]];
}
for
(
NSUInteger
x
=
0
;
x
<
count
;
x
++
)
{
NSDictionary
*
dict
=
rawList
[
x
];
NSString
*
filename
=
[
dict
objectForKey
:(
id
)
kCFFTPResourceName
];
BOOL
container
=
[[
dict
objectForKey
:(
id
)
kCFFTPResourceType
]
intValue
]
==
4
;
if
(
!
[
filename
hasPrefix
:
@"."
])
{
NSURL
*
subtitleURL
=
nil
;
if
([
filename
isSupportedAudioMediaFormat
]
||
[
filename
isSupportedMediaFormat
])
subtitleURL
=
[
self
searchSubtitleForFile
:
filename
inSubtitleList
:
subtitleList
];
else
if
((
!
container
)
&&
!
[
filename
isSupportedSubtitleFormat
])
continue
;
[
filteredList
addObject
:[[
VLCNetworkServerBrowserItemFTP
alloc
]
initWithDictionary
:
dict
baseURL
:
self
.
url
subtitleURL
:
subtitleURL
]];
}
}
[[
NSOperationQueue
mainQueue
]
addOperationWithBlock
:
^
{
@synchronized
(
_items
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment