Merge branch 'Jellyfin/main' into PangMo5/refactoring
This commit is contained in:
commit
50ff0ceac8
|
@ -299,6 +299,12 @@ class PlayerViewController: UIViewController, VLCMediaDelegate, VLCMediaPlayerDe
|
||||||
print(result)
|
print(result)
|
||||||
}, receiveValue: { [self] response in
|
}, receiveValue: { [self] response in
|
||||||
playSessionId = response.playSessionId ?? ""
|
playSessionId = response.playSessionId ?? ""
|
||||||
|
|
||||||
|
if(response.mediaSources == nil) {
|
||||||
|
delegate?.exitPlayer(self)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let mediaSource = response.mediaSources!.first.self!
|
let mediaSource = response.mediaSources!.first.self!
|
||||||
if mediaSource.transcodingUrl != nil {
|
if mediaSource.transcodingUrl != nil {
|
||||||
// Item is being transcoded by request of server
|
// Item is being transcoded by request of server
|
||||||
|
@ -498,7 +504,7 @@ class PlayerViewController: UIViewController, VLCMediaDelegate, VLCMediaPlayerDe
|
||||||
self.videoControlsView.isHidden = true
|
self.videoControlsView.isHidden = true
|
||||||
self.videoControlsView.alpha = 1
|
self.videoControlsView.alpha = 1
|
||||||
})
|
})
|
||||||
controlsAppearTime = 10000000000000000000000
|
controlsAppearTime = 999_999_999_999_999
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
paused = true
|
paused = true
|
||||||
|
|
|
@ -107,7 +107,7 @@ extension BaseItemDto {
|
||||||
|
|
||||||
// MARK: Calculations
|
// MARK: Calculations
|
||||||
func getItemRuntime() -> String {
|
func getItemRuntime() -> String {
|
||||||
let seconds: Int = Int(self.runTimeTicks!) / 10_000_000
|
let seconds: Int = Int(self.runTimeTicks ?? 0) / 10_000_000
|
||||||
let hours = (seconds / 3600)
|
let hours = (seconds / 3600)
|
||||||
let minutes = ((seconds - (hours * 3600)) / 60)
|
let minutes = ((seconds - (hours * 3600)) / 60)
|
||||||
if hours != 0 {
|
if hours != 0 {
|
||||||
|
@ -122,7 +122,7 @@ extension BaseItemDto {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
let remainingSecs = Int(self.runTimeTicks! - (self.userData?.playbackPositionTicks!)!) / 10_000_000
|
let remainingSecs = Int(self.runTimeTicks ?? 0 - (self.userData?.playbackPositionTicks ?? 0)) / 10_000_000
|
||||||
let proghours = Int(remainingSecs / 3600)
|
let proghours = Int(remainingSecs / 3600)
|
||||||
let progminutes = Int((Int(remainingSecs) - (proghours * 3600)) / 60)
|
let progminutes = Int((Int(remainingSecs) - (proghours * 3600)) / 60)
|
||||||
if proghours != 0 {
|
if proghours != 0 {
|
||||||
|
|
Loading…
Reference in New Issue