Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
8a07a0f2
Commit
8a07a0f2
authored
Dec 16, 2014
by
Felix Paul Kühne
Browse files
allow sharing audio tracks and show episodes in addition to regular files (close #13170)
parent
8981534e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaylistViewController.m
View file @
8a07a0f2
...
...
@@ -1274,9 +1274,9 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
}
else
{
// Look for at least one MLFile
for
(
NSUInteger
x
=
0
;
x
<
count
;
x
++
)
{
MLFile
*
file
=
_foundMedia
[[
indexPaths
[
x
]
row
]];
id
mediaItem
=
_foundMedia
[[
indexPaths
[
x
]
row
]];
if
([
file
isKindOfClass
:[
MLFil
e
class
]])
{
if
([
mediaItem
isKindOfClass
:[
MLFile
class
]]
||
[
mediaItem
isKindOfClass
:[
MLAlbumTrack
class
]]
|
[
mediaItem
isKindOfClass
:[
MLShowEpisod
e
class
]])
{
_actionBarButtonItem
.
enabled
=
YES
;
return
;
}
...
...
@@ -1304,14 +1304,18 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
NSMutableArray
/* NSURL */
*
fileURLobjects
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
count
];
for
(
NSUInteger
x
=
0
;
x
<
count
;
x
++
)
{
MLFile
*
file
=
_foundMedia
[[
indexPaths
[
x
]
row
]];
if
([
file
isKindOfClass
:[
MLFile
class
]])
{
NSURL
*
fileURL
=
[
NSURL
URLWithString
:[
file
url
]];
if
([
fileURL
isFileURL
])
{
[
fileURLobjects
addObject
:
fileURL
];
}
}
id
mediaItem
=
_foundMedia
[[
indexPaths
[
x
]
row
]];
NSURL
*
fileURL
;
if
([
mediaItem
isKindOfClass
:[
MLFile
class
]])
fileURL
=
[
NSURL
URLWithString
:[(
MLFile
*
)
mediaItem
url
]];
else
if
([
mediaItem
isKindOfClass
:[
MLAlbumTrack
class
]])
fileURL
=
[
NSURL
URLWithString
:[(
MLFile
*
)[[(
MLAlbumTrack
*
)
mediaItem
files
]
anyObject
]
url
]];
else
if
([
mediaItem
isKindOfClass
:[
MLShowEpisode
class
]])
fileURL
=
[
NSURL
URLWithString
:[(
MLFile
*
)[[(
MLShowEpisode
*
)
mediaItem
files
]
anyObject
]
url
]];
if
([
fileURL
isFileURL
])
[
fileURLobjects
addObject
:
fileURL
];
}
if
([
fileURLobjects
count
])
{
...
...
Write
Preview
Supports
Markdown
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