Fix data model issues

This commit is contained in:
ronaldheft
2022-08-10 22:17:12 -04:00
parent e275aa1699
commit 446e54cb91
6 changed files with 65 additions and 69 deletions
+9 -1
View File
@@ -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
}
}
}