Fix incorrect downloadUrl

This commit is contained in:
ronaldheft 2022-08-14 16:11:22 -04:00
parent 7cc35e4b96
commit 7aae1edf3c

View file

@ -112,9 +112,12 @@ extension DownloadItemPart {
self.episode = episode
let config = Store.serverConfig!
var downloadUrl = "\(config.address)\(serverPath)?token=\(config.token)"
var downloadUrl = ""
if (serverPath.hasSuffix("/cover")) {
downloadUrl += "\(config.address)\(serverPath)?token=\(config.token)"
downloadUrl += "&format=jpeg" // For cover images force to jpeg
} else {
downloadUrl = destination
}
self.uri = downloadUrl
self.destinationUri = destination