Commit ab560409 authored by Soomin Lee's avatar Soomin Lee

VideoModel: Adjust format getter

parent b2e3ad49
......@@ -55,9 +55,11 @@ extension VideoModel: MediaLibraryObserver {
extension VLCMLMedia {
@objc func formatDuration(ofMedia media: VLCMLMedia) -> String {
return String(format: "%@ - %@",
VLCTime(int: Int32(media.duration())),
ByteCountFormatter.string(fromByteCount: Int64(media.mainFile().size()),
countStyle: .file))
return String(format: "%@", VLCTime(int: Int32(media.duration())))
}
@objc func formatSize(ofMedia media: VLCMLMedia) -> String {
return ByteCountFormatter.string(fromByteCount: Int64(media.mainFile().size()),
countStyle: .file)
}
}
......@@ -210,7 +210,9 @@
- (void)_updateDisplayedInformations
{
_titleLabel.text = _media.title;
_subtitleLabel.text = [_media formatDurationOfMedia:_media];
_subtitleLabel.text = [NSString stringWithFormat:@"%@ - %@",
[_media formatDurationOfMedia:_media],
[_media formatSizeOfMedia:_media]];
}
- (void)_updatedDisplayedInformationForKeyPath:(NSString *)keyPath
......
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