Skip to content

Commit a302dab

Browse files
committed
Fix download quality.
1 parent 8b4a1de commit a302dab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TidalSwiftLib/Download.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class Download {
7171
}
7272
let filename = formFileName(track)
7373
print("Downloading: \(filename)")
74-
let optionalPath = buildPath(baseLocation: .downloads, parentFolder: parentFolder, name: filename, pathExtension: session.pathExtension(for: session.config.offlineAudioQuality))
74+
let optionalPath = buildPath(baseLocation: .downloads, parentFolder: parentFolder, name: filename, pathExtension: session.pathExtension(for: audioQuality))
7575
guard var path = optionalPath else {
7676
displayError(title: "Error while downloading track", content: "Couldn't build path for track: \(track.title) - \(track.artists.formArtistString())")
7777
downloadStatus.finishTask()
@@ -83,7 +83,7 @@ public class Download {
8383
response = Network.download(url, path: path, overwrite: true)
8484
} while response.statusCode == 1001
8585

86-
if session.config.offlineAudioQuality == .hifi || session.config.offlineAudioQuality == .master {
86+
if audioQuality == .hifi || audioQuality == .master {
8787
// Has to be done, as Tidal sometimes serves the files in a strange QuickTime container (qt), which doesn't support metadata tags.
8888
// Or it's just flac and therefore doesn't work.
8989
convertToALAC(path: path)

0 commit comments

Comments
 (0)