From 836057578fe111addfe125da5436ecffbde3fbb0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 2 Apr 2022 14:34:06 +0200 Subject: [PATCH] Minor changes --- Extensions/NSTextField+FocusRingType.swift | 2 +- Shared/Player/PlaybackBar.swift | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Extensions/NSTextField+FocusRingType.swift b/Extensions/NSTextField+FocusRingType.swift index 1fb58d54..603c5879 100644 --- a/Extensions/NSTextField+FocusRingType.swift +++ b/Extensions/NSTextField+FocusRingType.swift @@ -3,6 +3,6 @@ import AppKit extension NSTextField { override open var focusRingType: NSFocusRingType { get { .none } - set {} // swiftlint:disable:this unused_setter_value + set {} } } diff --git a/Shared/Player/PlaybackBar.swift b/Shared/Player/PlaybackBar.swift index 589f348c..e27e80cd 100644 --- a/Shared/Player/PlaybackBar.swift +++ b/Shared/Player/PlaybackBar.swift @@ -103,12 +103,13 @@ struct PlaybackBar: View { return "loading..." } - guard let video = player.currentVideo else { + guard let video = player.currentVideo, + let time = player.time else { return "" } let videoLengthAtRate = video.length / Double(player.currentRate) - let remainingSeconds = videoLengthAtRate - player.time!.seconds + let remainingSeconds = videoLengthAtRate - time.seconds if remainingSeconds < 60 { return "less than a minute"