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
97c47963
Commit
97c47963
authored
Oct 10, 2013
by
Felix Paul Kühne
Browse files
Library collection view: split position display code
parent
b4a41a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCPlaylistCollectionViewCell.m
View file @
97c47963
...
...
@@ -141,11 +141,7 @@
MLFile
*
anyFileFromTrack
=
albumTrack
.
files
.
anyObject
;
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
[
VLCTime
timeWithNumber
:[
anyFileFromTrack
duration
]]];
CGFloat
position
=
anyFileFromTrack
.
lastPosition
.
floatValue
;
self
.
progressView
.
progress
=
position
;
self
.
progressView
.
hidden
=
((
position
<
.
1
f
)
||
(
position
>
.
95
f
))
?
YES
:
NO
;
[
self
.
progressView
setNeedsDisplay
];
self
.
mediaIsUnreadView
.
hidden
=
!
anyFileFromTrack
.
unread
.
intValue
;
[
self
_showPositionOfItem
:
anyFileFromTrack
];
}
-
(
void
)
_configureForAlbum
:(
MLAlbum
*
)
album
...
...
@@ -172,11 +168,7 @@
}
else
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"S%02dE%02d — %@"
,
showEpisode
.
episodeNumber
.
intValue
,
showEpisode
.
seasonNumber
.
intValue
,
[
VLCTime
timeWithNumber
:[
anyFileFromEpisode
duration
]]];
CGFloat
position
=
anyFileFromEpisode
.
lastPosition
.
floatValue
;
self
.
progressView
.
progress
=
position
;
self
.
progressView
.
hidden
=
((
position
<
.
1
f
)
||
(
position
>
.
95
f
))
?
YES
:
NO
;
[
self
.
progressView
setNeedsDisplay
];
self
.
mediaIsUnreadView
.
hidden
=
!
showEpisode
.
unread
.
intValue
;
[
self
_showPositionOfItem
:
anyFileFromEpisode
];
}
-
(
void
)
_configureForMLFile
:(
MLFile
*
)
mediaFile
...
...
@@ -207,11 +199,16 @@
}
}
CGFloat
position
=
mediaFile
.
lastPosition
.
floatValue
;
[
self
_showPositionOfItem
:
mediaFile
];
}
-
(
void
)
_showPositionOfItem
:(
MLFile
*
)
mediaItem
{
CGFloat
position
=
mediaItem
.
lastPosition
.
floatValue
;
self
.
progressView
.
progress
=
position
;
self
.
progressView
.
hidden
=
((
position
<
.
1
f
)
||
(
position
>
.
95
f
))
?
YES
:
NO
;
[
self
.
progressView
setNeedsDisplay
];
self
.
mediaIsUnreadView
.
hidden
=
!
media
File
.
unread
.
intValue
;
self
.
mediaIsUnreadView
.
hidden
=
!
media
Item
.
unread
.
intValue
;
}
@end
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