mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +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 {
|
if !currentItem.video.live {
|
||||||
let itemDuration = currentItem.videoDuration ?? 0
|
let itemDuration = currentItem.videoDuration ?? currentItem.duration
|
||||||
let duration = itemDuration.isFinite ? Int(itemDuration) : nil
|
let duration = itemDuration.isFinite ? Double(itemDuration) : nil
|
||||||
|
|
||||||
if !duration.isNil {
|
if !duration.isNil {
|
||||||
nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = duration as AnyObject
|
nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = duration as AnyObject
|
||||||
|
Loading…
Reference in New Issue
Block a user