Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
e87d2ff4
Commit
e87d2ff4
authored
Feb 17, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
library: don't show 'have 0 tracks' in the media info but just nothing if there is nothing
parent
4671eed0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
27 deletions
+43
-27
Sources/VLCPlaylistCollectionViewCell.m
Sources/VLCPlaylistCollectionViewCell.m
+22
-13
Sources/VLCPlaylistTableViewCell.m
Sources/VLCPlaylistTableViewCell.m
+21
-14
No files found.
Sources/VLCPlaylistCollectionViewCell.m
View file @
e87d2ff4
...
...
@@ -384,12 +384,13 @@
/* print video info */
trackCount
=
videoTracks
.
count
;
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu video tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 video track"
];
if
(
trackCount
>
0
)
{
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu video tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 video track"
];
[
mediaInfo
appendString
:
@" ("
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
int
fourcc
=
[[
videoTracks
[
x
]
valueForKey
:
@"codec"
]
intValue
];
...
...
@@ -400,16 +401,19 @@
}
[
mediaInfo
appendString
:
@")"
];
}
[
mediaInfo
appendString
:
@"
\n\n
"
];
/* print audio info */
trackCount
=
audioTracks
.
count
;
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu audio tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 audio track"
];
if
(
trackCount
>
0
)
{
if
(
mediaInfo
.
length
>
0
)
[
mediaInfo
appendString
:
@"
\n\n
"
];
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu audio tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 audio track"
];
[
mediaInfo
appendString
:
@":
\n
"
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
NSManagedObject
*
track
=
audioTracks
[
x
];
...
...
@@ -469,12 +473,17 @@
trackCount
++
;
}
}
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu subtitles tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 subtitles track"
];
if
((
trackCount
>
0
)
&&
(
spuTracks
.
count
>
0
))
{
if
(
mediaInfo
.
length
>
0
)
[
mediaInfo
appendString
:
@"
\n\n
"
];
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu subtitles tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 subtitles track"
];
[
mediaInfo
appendString
:
@" ("
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
NSString
*
language
=
[
spuTracks
[
x
]
valueForKey
:
@"language"
];
...
...
Sources/VLCPlaylistTableViewCell.m
View file @
e87d2ff4
...
...
@@ -374,12 +374,13 @@
/* print video info */
trackCount
=
videoTracks
.
count
;
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu video tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 video track"
];
if
(
trackCount
>
0
)
{
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu video tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 video track"
];
[
mediaInfo
appendString
:
@" ("
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
int
fourcc
=
[[
videoTracks
[
x
]
valueForKey
:
@"codec"
]
intValue
];
...
...
@@ -390,16 +391,19 @@
}
[
mediaInfo
appendString
:
@")"
];
}
[
mediaInfo
appendString
:
@"
\n\n
"
];
/* print audio info */
trackCount
=
audioTracks
.
count
;
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu audio tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 audio track"
];
if
(
trackCount
>
0
)
{
if
(
mediaInfo
.
length
>
0
)
[
mediaInfo
appendString
:
@"
\n\n
"
];
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu audio tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 audio track"
];
[
mediaInfo
appendString
:
@":
\n
"
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
NSManagedObject
*
track
=
audioTracks
[
x
];
...
...
@@ -441,7 +445,6 @@
}
}
}
[
mediaInfo
appendString
:
@"
\n\n
"
];
/* SPU */
trackCount
=
spuTracks
.
count
;
...
...
@@ -459,12 +462,16 @@
trackCount
++
;
}
}
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu subtitles tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 subtitles track"
];
if
((
trackCount
>
0
)
&&
(
spuTracks
.
count
>
0
))
{
if
(
mediaInfo
.
length
>
0
)
[
mediaInfo
appendString
:
@"
\n\n
"
];
if
(
trackCount
!=
1
)
[
mediaInfo
appendFormat
:
@"%lu subtitles tracks"
,
(
unsigned
long
)
trackCount
];
else
[
mediaInfo
appendString
:
@"1 subtitles track"
];
[
mediaInfo
appendString
:
@" ("
];
for
(
NSUInteger
x
=
0
;
x
<
trackCount
;
x
++
)
{
NSString
*
language
=
[
spuTracks
[
x
]
valueForKey
:
@"language"
];
...
...
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