marinofaggiana 4 år sedan
förälder
incheckning
9a3aca28db

+ 1 - 1
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -146,7 +146,7 @@
 "_automatic_Download_Image_" = "Use images in full resolution";
 "_automatic_Download_Image_footer_" = "When viewing images always download, if not available locally, the images in full resolution";
 "_size_"                    = "Size";
-"_dim_"                     = "Dimensions";
+"_dimension_"               = "Dimension";
 "_duration_"                = "Duration";
 
 // App

+ 6 - 5
iOSClient/Viewer/NCViewerImage/NCViewerImageDetailView.swift

@@ -140,15 +140,16 @@ class NCViewerImageDetailView: UIView {
         // Dimensions / Durations
         if metadata?.typeFile == k_metadataTypeFile_image {
             if let image = self.image {
-                dimLabel.text = NSLocalizedString("_dim_", comment: "")
+                dimLabel.text = NSLocalizedString("_dimension_", comment: "")
                 dimValue.text = "\(Int(image.size.width)) x \(Int(image.size.height))"
             }
         } else if metadata?.typeFile == k_metadataTypeFile_video {
             if let url = NCKTVHTTPCache.shared.getVideoURL(metadata: metadata!) {
-                let player = AVPlayer(url: url)
-                if let duration = player.currentItem?.duration {
-                    let timer = secondsToHoursMinutesSeconds(seconds: Int(CMTimeGetSeconds(duration)))
-                    dimLabel.text = NSLocalizedString("_durations_", comment: "")
+                let playerVideo = AVPlayer(url: url)
+                if let duration = playerVideo.currentItem?.asset.duration {
+                    let durationVideo = Int(CMTimeGetSeconds(duration))
+                    let timer = secondsToHoursMinutesSeconds(seconds: durationVideo)
+                    dimLabel.text = NSLocalizedString("_duration_", comment: "")
                     dimValue.text = "\(timer.0):\(timer.1):\(timer.2)"
                 }
             }