Small fixes

This commit is contained in:
Rasmus Krämer 2022-03-09 20:20:47 +01:00
parent f9be51184d
commit f76128c2b3
2 changed files with 2 additions and 3 deletions

View file

@ -183,7 +183,7 @@ class AudioPlayer: NSObject {
}
func invokeMetadataUpdate() {
if !shouldFetchCover() && audiobook.artworkUrl != nil {
if !shouldFetchCover() || audiobook.artworkUrl == nil {
setMetadata(nil)
return
}
@ -234,7 +234,6 @@ class AudioPlayer: NSObject {
guard let playerStatus = AVPlayerItem.Status(rawValue: (change?[.newKey] as? Int ?? -1)) else { return }
if playerStatus == .readyToPlay {
NSLog("pain \(self.audiobook.startTime)")
updateNowPlaying()
self.status = 0

View file

@ -142,7 +142,7 @@ public class MyNativeAudio: CAPPlugin {
}
@objc func getStreamSyncData(_ call: CAPPluginCall) {
if self.currentPlayer == nil {
call.resolve([ "isPlaying": false as Any, "lastPauseTime": 0, "id": nil ])
call.resolve([ "isPlaying": false, "lastPauseTime": 0, "id": nil ])
return
}