Commit 45da7268 authored by Soomin Lee's avatar Soomin Lee

VideoModel: Format getter: Remove unnecessary parameter

parent 3f7a8e08
......@@ -54,12 +54,12 @@ extension VideoModel: MediaLibraryObserver {
}
extension VLCMLMedia {
@objc func formatDuration(ofMedia media: VLCMLMedia) -> String {
return String(format: "%@", VLCTime(int: Int32(media.duration())))
@objc func formatDuration() -> String {
return String(format: "%@", VLCTime(int: Int32(duration())))
}
@objc func formatSize(ofMedia media: VLCMLMedia) -> String {
return ByteCountFormatter.string(fromByteCount: Int64(media.mainFile().size()),
@objc func formatSize() -> String {
return ByteCountFormatter.string(fromByteCount: Int64(mainFile().size()),
countStyle: .file)
}
}
......@@ -65,8 +65,8 @@ extension VLCEditController: UICollectionViewDataSource {
for: indexPath) as? VLCMediaViewEditCell {
if let media = category.anyfiles[indexPath.row] as? VLCMLMedia {
cell.titleLabel.text = media.title
cell.subInfoLabel.text = media.formatDuration(ofMedia: media)
cell.sizeLabel.text = media.formatSize(ofMedia: media)
cell.subInfoLabel.text = media.formatDuration()
cell.sizeLabel.text = media.formatSize()
}
return cell
}
......
......@@ -211,8 +211,8 @@
{
_titleLabel.text = _media.title;
_subtitleLabel.text = [NSString stringWithFormat:@"%@ - %@",
[_media formatDurationOfMedia:_media],
[_media formatSizeOfMedia:_media]];
[_media formatDuration],
[_media formatSize]];
}
- (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