mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 06:37:16 +02:00
Fix data model issues
This commit is contained in:
@@ -121,6 +121,14 @@ extension DownloadItemPart {
|
||||
}
|
||||
|
||||
func mimeType() -> String? {
|
||||
audioTrack?.mimeType ?? episode?.audioTrack?.mimeType
|
||||
if let track = audioTrack {
|
||||
return track.mimeType
|
||||
} else if let podcastTrack = episode?.audioTrack {
|
||||
return podcastTrack.mimeType
|
||||
} else if serverPath?.hasSuffix("/cover") ?? false {
|
||||
return "image/jpg"
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user