mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Fix reporting player item duration to Now Playing
This commit is contained in:
parent
89957e3b56
commit
149607efbc
@ -670,8 +670,8 @@ final class PlayerModel: ObservableObject {
|
||||
}
|
||||
|
||||
if !currentItem.video.live {
|
||||
let itemDuration = currentItem.videoDuration ?? 0
|
||||
let duration = itemDuration.isFinite ? Int(itemDuration) : nil
|
||||
let itemDuration = currentItem.videoDuration ?? currentItem.duration
|
||||
let duration = itemDuration.isFinite ? Double(itemDuration) : nil
|
||||
|
||||
if !duration.isNil {
|
||||
nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = duration as AnyObject
|
||||
|
Loading…
Reference in New Issue
Block a user