Fixed lib not decrypting tracks
This commit is contained in:
parent
7536597495
commit
d0cf20db8f
|
@ -43,7 +43,7 @@ def streamTrack(outputStream, track, start=0, downloadObject=None, listener=None
|
|||
if downloadObject.isCanceled: raise DownloadCanceled
|
||||
headers= {'User-Agent': USER_AGENT_HEADER}
|
||||
chunkLength = start
|
||||
isCryptedStream = "/mobile/" in track.downloadUrl
|
||||
isCryptedStream = "/mobile/" in track.downloadURL or "/media/" in track.downloadURL
|
||||
|
||||
itemData = {
|
||||
'id': track.id,
|
||||
|
@ -52,7 +52,7 @@ def streamTrack(outputStream, track, start=0, downloadObject=None, listener=None
|
|||
}
|
||||
|
||||
try:
|
||||
with get(track.downloadUrl, headers=headers, stream=True, timeout=10) as request:
|
||||
with get(track.downloadURL, headers=headers, stream=True, timeout=10) as request:
|
||||
request.raise_for_status()
|
||||
if isCryptedStream:
|
||||
blowfish_key = generateBlowfishKey(str(track.id))
|
||||
|
|
|
@ -361,7 +361,7 @@ class Downloader:
|
|||
if not trackAlreadyDownloaded or self.settings['overwriteFile'] == OverwriteOption.OVERWRITE:
|
||||
if formatsName[track.bitrate] not in track.urls:
|
||||
track.urls[formatsName[track.bitrate]] = generateCryptedStreamURL(track.id, track.MD5, track.mediaVersion, track.bitrate)
|
||||
track.downloadUrl = track.urls[formatsName[track.bitrate]]
|
||||
track.downloadURL = track.urls[formatsName[track.bitrate]]
|
||||
|
||||
try:
|
||||
with open(writepath, 'wb') as stream:
|
||||
|
|
Loading…
Reference in New Issue