Closed Hanni007112 closed 8 months ago
I get the same Error while downloading an Album. The download gets to around 80% and then stops with the Error. Downloading the remaining songs on them own via the "list album songs" interface produces the same error in the queue, but the songs get downloaded just fine. Dockerlog:
Downloading 'Julia Quinn - Kapitel 25.28 - Bridgerton - Ein hinreißend verruchter Gentleman (ungekürzt).mp3'
Got an Exception in function download_deezer_song_and_queue with parameters '{'track_id': 1708358797, 'add_to_playlist': False}
worker 1 is done with task: {'track_id': 1708358797, 'add_to_playlist': False} (state=failed)
Worker 1 is waiting for a task
It appears to happen every time the album has more than 256 tracks in it
I did some research. It seems that the struct.pack function is the culprit. https://github.com/kmille/deezer-downloader/blob/b15ac5960b89f6ec0bbb1f178bc4223f83f4e775/deezer_downloader/deezer.py#L166-L175
struct.pack "b" can only store a value <=255 source
If we change this function so it will use a "short" (h) value instead of "char" (b) I would think it would work source Currently i don't have a testing environment available for me to test it. But I think this change alone could make it work
data = struct.pack("3s" "30s" "30s" "30s" "4s" "28sB" "B" "B",
h"TAG", # header
song_get(song, "SNG_TITLE"), # title
song_get(song, "ART_NAME"), # artist
song_get(song, "ALB_TITLE"), # album
album_get("PHYSICAL_RELEASE_DATE"), # year
album_get("LABEL_NAME"), 0, # comment
int(song_get(song, "TRACK_NUMBER")), # tracknum
255 # genre
) ```
I have a simmilar issue described in #85 .
I get the 'DATA_ERROR': 'playlist::getData' if I:
I get the 'ubyte format requires 0 <= numbers <= 255' error if i:
I can download Songs one by one. Playlist in question: 218570552 other playlists work fine