Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Streamrip downloading corrupted files from Deezer #656

Open
backstab5983 opened this issue Mar 25, 2024 · 6 comments
Open

[BUG] Streamrip downloading corrupted files from Deezer #656

backstab5983 opened this issue Mar 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@backstab5983
Copy link

Describe the bug

I should not that I'm using the dev branch as it is a known issue that the latest stable is downloading from Deezer with a missing byte as noted here: #607

Use the command below, then test the file with flac -t and here's the output:

01. Giovanni Allevi - I Need Your Love.flac: *** Got error code 2:FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH


01. Giovanni Allevi - I Need Your Love.flac: ERROR while decoding data
                                             state = FLAC__STREAM_DECODER_ABORTED

Not sure what is causing this, tried to uninstall and reinstall the dev branch of streamrip or a different commit yet still getting this error, though everything is fine with Qobuz files. Even tried to test the files on a different machine yet same error.

Command Used

rip -ndb -vvv url https://www.deezer.com/en/album/393292767

Debug Traceback

[19:10:24] DEBUG    Showing all debug logs                                                                                                                                  cli.py:102
⠏ Resolving URLs...[19:10:28] DEBUG    Pending tracks: [PendingTrack(id=2096230867, album=AlbumMetadata(info=AlbumInfo(id='393292767', quality=2, container='FLAC', label='Bizart S.r.l.',    album.py:92
                    explicit=False, sampling_rate=44100, bit_depth=16, booklets=None), album='I Need Your Love', albumartist='Giovanni Allevi', year='2022',                          
                    genre=['Classical'], covers=Covers(('original',                                                                                                                   
                    'https://e-cdns-images.dzcdn.net/images/cover/614f15a60db47ae4cc758e5962dcfdc2/1000x1000-000000-80-0-0.jpg',                                                      
                    '/nfs/plex/data/torrents/music-uploads/lunaconvert/input/Giovanni Allevi - I Need Your Love (2022) [FLAC]/cover.jpg')                                             
                    ('large', 'https://e-cdns-images.dzcdn.net/images/cover/614f15a60db47ae4cc758e5962dcfdc2/500x500-000000-80-0-0.jpg', None)                                        
                    ('small', 'https://e-cdns-images.dzcdn.net/images/cover/614f15a60db47ae4cc758e5962dcfdc2/250x250-000000-80-0-0.jpg', None)                                        
                    ('thumbnail', 'https://e-cdns-images.dzcdn.net/images/cover/614f15a60db47ae4cc758e5962dcfdc2/56x56-000000-80-0-0.jpg', None)), tracktotal=1,                      
                    disctotal=1, albumcomposer=None, comment=None, compilation=None, copyright=None, date='2022-02-11', description=None, encoder=None, grouping=None,                
                    lyrics=None, purchase_date=None), client=<streamrip.client.deezer.DeezerClient object at 0x792d629f1a20>, config=<streamrip.config.Config object at               
                    0x792d62943040>, folder='/nfs/plex/data/torrents/music-uploads/lunaconvert/input/Giovanni Allevi - I Need Your Love (2022) [FLAC]',                               
                    db=Database(downloads=<streamrip.db.Dummy object at 0x792d629f1f30>, failed=<streamrip.db.Failed object at 0x792d629f1f60>), cover_path=None)]                    
           DEBUG    Fetching deezer url with token                                                                                                                       deezer.py:167
                    AAAAAWYBvhRmAtdU_BuklQ3LbNDpKVMwH-6kgM__d_RY0v8ImYastxS8mrd1s1UUwQYEfOHhxCRCtdYT8pEX6PUxbMIJB-M-nuRBqb3dXizG0_DUpM4YRSgqqT4Lp-uYo5MvW--MMd7UrfcOLTjN              
                    x3eFa3ijDVusZjsPmqSN-P9JXya-GLDjlz_3j6ZFOv_hdYkiF7xGbSQ5CZ1fnzR3mgJ5qkx8akSjV1XyO8fIfeaqnIb0oaiOO718oryuCHnN7_tK3kBCyjcB1fAYFjsxbjRKYkGXm0oxBg                    
[19:10:29] DEBUG    dz track info: {'ALB_ID': '393292767', 'ALB_PICTURE': '614f15a60db47ae4cc758e5962dcfdc2', 'ALB_TITLE': 'I Need Your Love', 'ARTISTS': [{'ART_ID':    deezer.py:190
                    '9036', 'ROLE_ID': '0', 'ARTISTS_SONGS_ORDER': '1', 'ART_NAME': 'Giovanni Allevi', 'ARTIST_IS_DUMMY': False, 'ART_PICTURE':                                       
                    'fc0a8d0312c6b009f132630b5e0be618', 'RANK': '317653', 'LOCALES': {'lang_zh-hant': {'name': '喬凡尼阿樂維'}, 'lang_en': {'name': 'Giovanni Allevi'},               
                    'lang_ko-kor': {'name': '지오바니 알레비'}, 'lang_ko': {'name': '지오바니 알레비'}}, 'SMARTRADIO': 1, '__TYPE__': 'artist'}], 'ART_ID': '9036',                   
                    'ART_NAME': 'Giovanni Allevi', 'ARTIST_IS_DUMMY': False, 'DIGITAL_RELEASE_DATE': '2022-02-11', 'DISK_NUMBER': '1', 'DURATION': '221',                             
                    'EXPLICIT_LYRICS': '0', 'EXPLICIT_TRACK_CONTENT': {'EXPLICIT_LYRICS_STATUS': 0, 'EXPLICIT_COVER_STATUS': 2}, 'GENRE_ID': '0', 'HIERARCHICAL_TITLE':               
                    '', 'ISRC': 'ITAN72100007', 'LYRICS_ID': 0, 'PHYSICAL_RELEASE_DATE': '2022-02-11', 'PROVIDER_ID': '89', 'RANK': '31448', 'SMARTRADIO': 1,                         
                    'SNG_CONTRIBUTORS': {'main_artist': ['Giovanni Allevi'], 'composer': ['Giovanni Allevi']}, 'SNG_ID': '2096230867', 'SNG_TITLE': 'I Need Your Love',               
                    'STATUS': 1, 'TRACK_NUMBER': '1', 'USER_ID': 0, 'VERSION': '', 'MD5_ORIGIN': 'adbd51d37906ed2fcc6a58eea165cf25', 'FILESIZE_AAC_64': '0',                          
                    'FILESIZE_MP3_64': '0', 'FILESIZE_MP3_128': '3539277', 'FILESIZE_MP3_256': '0', 'FILESIZE_MP3_320': '8848195', 'FILESIZE_FLAC': '14768013',                       
                    'FILESIZE': '3539277', 'GAIN': '-15.1', 'MEDIA_VERSION': '2', 'TRACK_TOKEN':                                                                                      
                    'AAAAAWYBvhRmAtdU_BuklQ3LbNDpKVMwH-6kgM__d_RY0v8ImYastxS8mrd1s1UUwQYEfOHhxCRCtdYT8pEX6PUxbMIJB-M-nuRBqb3dXizG0_DUpM4YRSgqqT4Lp-uYo5MvW--MMd7UrfcOLTj              
                    Nx3eFa3ijDVusZjsPmqSN-P9JXya-GLDjlz_3j6ZFOv_hdYkiF7xGbSQ5CZ1fnzR3mgJ5qkx8akSjV1XyO8fIfeaqnIb0oaiOO718oryuCHnN7_tK3kBCyjcB1fAYFjsxbjRKYkGXm0oxBg',                 
                    'TRACK_TOKEN_EXPIRE': 1711462228, 'MEDIA': [{'TYPE': 'preview', 'HREF':                                                                                           
                    'http://cdn-preview-0.deezer.com/stream/c-070e06dd6b4e23febf2e0d04c7031dbc-2.mp3'}], 'RIGHTS': {'STREAM_ADS_AVAILABLE': True, 'STREAM_ADS':                       
                    '2000-01-01', 'STREAM_SUB_AVAILABLE': True, 'STREAM_SUB': '2000-01-01'}, '__TYPE__': 'song'}                                                                      
           DEBUG    Deezer info for downloadable: {'quality': 2, 'id': 2096230867, 'quality_to_size': [3539277, 8848195, 14768013], 'url':                          downloadable.py:95
                    'https://cdnt-proxy-a.dzcdn.net/media/1/05e26eb07169d041e7a4476a9e8e627f0c163ac2541d62780669cccd654e7d9a00e9dae119b1e9293848fa542d07b17e5a873a2                   
                    f9cdac6cd158c25d8f6d9a0e5db912b4b1ceb82143375575917da5d0e?hdnea=exp=1711462228~acl=/media/1/05e26eb07169d041e7a4476a9e8e627f0c163ac2541d6278066                   
                    9cccd654e7d9a00e9dae119b1e9293848fa542d07b17e5a873a2f9cdac6cd158c25d8f6d9a0e5db912b4b1ceb82143375575917da5d0e*~data=user_id=73830861~hmac=2b09b                   
                    7655515b818a4e8e38c169d53d3539423acbbf0f3fad4e2e3719b094101'}                                                                                                     
           DEBUG    Deezer file (id 2096230867) at                                                                                                                 downloadable.py:135
                    https://cdnt-proxy-a.dzcdn.net/media/1/05e26eb07169d041e7a4476a9e8e627f0c163ac2541d62780669cccd654e7d9a00e9dae119b1e9293848fa542d07b17e5a873a2                    
                    f9cdac6cd158c25d8f6d9a0e5db912b4b1ceb82143375575917da5d0e?hdnea=exp=1711462228~acl=/media/1/05e26eb07169d041e7a4476a9e8e627f0c163ac2541d627806                    
                    69cccd654e7d9a00e9dae119b1e9293848fa542d07b17e5a873a2f9cdac6cd158c25d8f6d9a0e5db912b4b1ceb82143375575917da5d0e*~data=user_id=73830861~hmac=2b0                    
                    9b7655515b818a4e8e38c169d53d3539423acbbf0f3fad4e2e3719b094101 is encrypted. Decrypting with b'g2eh2js0e{#01nl9'                                                   
[19:10:39] DEBUG    Tagging with [('TITLE', 'I Need Your Love'), ('ARTIST', 'Giovanni Allevi'), ('ALBUM', 'I Need Your Love'), ('ALBUMARTIST', 'Giovanni Allevi'),       tagger.py:253
                    ('YEAR', '2022'), ('GENRE', 'Classical'), ('TRACKNUMBER', '01'), ('DISCNUMBER', '01'), ('TRACKTOTAL', '01'), ('DISCTOTAL', '01'), ('DATE',                        
                    '2022-02-11'), ('ISRC', 'ITAN72100007')]                                                                                                                          
──────────────────────────────────────────────────────────────────────────── Downloading I Need Your Love ────────────────────────────────────────────────────────────────────────────
           DEBUG    Removing dirs set()                                                                                                                                  artwork.py:19

Config File

[downloads]
# Folder where tracks are downloaded to
folder = "/nfs/plex/data/torrents/music-uploads/lunaconvert/input"
# Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
source_subdirectories = false

# Download (and convert) tracks all at once, instead of sequentially. 
# If you are converting the tracks, or have fast internet, this will 
# substantially improve processing speed.
concurrency = true
# The maximum number of tracks to download at once
# If you have very fast internet, you will benefit from a higher value,
# A value that is too high for your bandwidth may cause slowdowns
# Set to -1 for no limit
max_connections = 10
# Max number of API requests per source to handle per minute
# Set to -1 for no limit
requests_per_minute = 60

[qobuz]
# 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
quality = 4
# This will download booklet pdfs that are included with some albums
download_booklets = false

# Authenticate to Qobuz using auth token? Value can be true/false only
use_auth_token = true
# Enter your userid if the above use_auth_token is set to true, else enter your email
email_or_userid = "REDACTED"
# Enter your auth token if the above use_auth_token is set to true, else enter the md5 hash of your plaintext password
password_or_token = "REDACTED"
# Do not change
app_id = "950096963"
# Do not change
secrets = ["10b251c286cfbf64d6b7105f253d9a2e", "979549437fcc4a3faad4867b5cd25dcb"]

[tidal]
# 0: 256kbps AAC, 1: 320kbps AAC, 2: 16/44.1 "HiFi" FLAC, 3: 24/44.1 "MQA" FLAC
quality = 2
# This will download videos included in Video Albums.
download_videos = false

# Do not change any of the fields below
user_id = ""
country_code = ""
access_token = ""
refresh_token = ""
# Tokens last 1 week after refresh. This is the Unix timestamp of the expiration
# time. If you haven't used streamrip in more than a week, you may have to log
# in again using `rip config --tidal`
token_expiry = ""

[deezer]
# 0, 1, or 2
# This only applies to paid Deezer subscriptions. Those using deezloader
# are automatically limited to quality = 1
quality = 2
# An authentication cookie that allows streamrip to use your Deezer account
# See https://github.com/nathom/streamrip/wiki/Finding-Your-Deezer-ARL-Cookie
# for instructions on how to find this
arl = "REDACTED"
# This allows for free 320kbps MP3 downloads from Deezer
# If an arl is provided, deezloader is never used
use_deezloader = false
# This warns you when the paid deezer account is not logged in and rip falls
# back to deezloader, which is unreliable
deezloader_warnings = true

[soundcloud]
# Only 0 is available for now
quality = 0
# This changes periodically, so it needs to be updated
client_id = ""
app_version = ""

[youtube]
# Only 0 is available for now
quality = 0
# Download the video along with the audio
download_videos = false
# The path to download the videos to
video_downloads_folder = "/home/fra/StreamripDownloads/YouTubeVideos"

[database]
# Create a database that contains all the track IDs downloaded so far
# Any time a track logged in the database is requested, it is skipped
# This can be disabled temporarily with the --no-db flag
downloads_enabled = true
# Path to the downloads database 
downloads_path = "/home/fra/.config/streamrip/downloads.db"
# If a download fails, the item ID is stored here. Then, `rip repair` can be
# called to retry the downloads
failed_downloads_enabled = true
failed_downloads_path = "/home/fra/.config/streamrip/failed_downloads.db"

# Convert tracks to a codec after downloading them.
[conversion]
enabled = false
# FLAC, ALAC, OPUS, MP3, VORBIS, or AAC
codec = "ALAC"
# In Hz. Tracks are downsampled if their sampling rate is greater than this. 
# Value of 48000 is recommended to maximize quality and minimize space
sampling_rate = 48000
# Only 16 and 24 are available. It is only applied when the bit depth is higher
# than this value.
bit_depth = 24
# Only applicable for lossy codecs
lossy_bitrate = 320

# Filter a Qobuz artist's discography. Set to 'true' to turn on a filter.
# This will also be applied to other sources, but is not guaranteed to work correctly
[qobuz_filters]
# Remove Collectors Editions, live recordings, etc.
extras = true
# Picks the highest quality out of albums with identical titles.
repeats = true
# Remove EPs and Singles
non_albums = true
# Remove albums whose artist is not the one requested
features = true
# Skip non studio albums
non_studio_albums = true
# Only download remastered albums
non_remaster = true

[artwork]
# Write the image to the audio file
embed = false
# The size of the artwork to embed. Options: thumbnail, small, large, original.
# "original" images can be up to 30MB, and may fail embedding. 
# Using "large" is recommended.
embed_size = "large"
# If this is set to a value > 0, max(width, height) of the embedded art will be set to this value in pixels
# Proportions of the image will remain the same
embed_max_width = -1
# Save the cover image at the highest quality as a seperate jpg file
save_artwork = true
# If this is set to a value > 0, max(width, height) of the saved art will be set to this value in pixels
# Proportions of the image will remain the same
saved_max_width = -1


[metadata]
# Sets the value of the 'ALBUM' field in the metadata to the playlist's name. 
# This is useful if your music library software organizes tracks based on album name.
set_playlist_to_album = true
# If part of a playlist, sets the `tracknumber` field in the metadata to the track's 
# position in the playlist instead of its position in its album
renumber_playlist_tracks = true
# The following metadata tags won't be applied
# See https://github.com/nathom/streamrip/wiki/Metadata-Tag-Names for more info
exclude = []

# Changes the folder and file names generated by streamrip.
[filepaths]
# Create folders for single tracks within the downloads directory using the folder_format
# template
add_singles_to_folder = true
# Available keys: "albumartist", "title", "year", "bit_depth", "sampling_rate",
# "id", and "albumcomposer"
folder_format = "{albumartist} - {title} ({year}) [{container}]"
# Available keys: "tracknumber", "artist", "albumartist", "composer", "title",
# and "albumcomposer", "explicit"
track_format = "{tracknumber:02}. {artist} - {title}{explicit}"
# Only allow printable ASCII characters in filenames.
restrict_characters = false
# Truncate the filename if it is greater than this number of characters
# Setting this to false may cause downloads to fail on some systems
truncate_to = 120

# Last.fm playlists are downloaded by searching for the titles of the tracks
[lastfm]
# The source on which to search for the tracks.
source = "qobuz"
# If no results were found with the primary source, the item is searched for 
# on this one.
fallback_source = "deezer"

[cli]
# Print "Downloading {Album name}" etc. to screen
text_output = true
# Show resolve, download progress bars
progress_bars = true
# The maximum number of search results to show in the interactive menu
max_search_results = 100

[misc]
# Metadata to identify this config file. Do not change.
version = "2.0.3"
# Print a message if a new version of streamrip is available 
check_for_updates = true

Operating System

Ubuntu 22.04.4 LTS

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

@backstab5983 backstab5983 added the bug Something isn't working label Mar 25, 2024
@rodfeli
Copy link

rodfeli commented May 3, 2024

The same here...

@zedeska
Copy link

zedeska commented May 9, 2024

same

@zedeska
Copy link

zedeska commented May 9, 2024

ok you can switch to the fix_asserts branch it works fine

@rodfeli
Copy link

rodfeli commented May 10, 2024

ok you can switch to the fix_asserts branch it works fine

Not work for me....

flac 1.3.2
Copyright (C) 2000-2009 Josh Coalson, 2011-2016 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

01 - The Lost Chord.flac: testing, 83% complete
01 - The Lost Chord.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_END_OF_STREAM
02 - Knee Deep in Ghosts.flac: testing, 99% complete
02 - Knee Deep in Ghosts.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_END_OF_STREAM

@gdmn
Copy link

gdmn commented May 22, 2024

it seems that files are missing ~150kb from the end

@dobanov
Copy link

dobanov commented May 31, 2024

beta version works fine
pip3 install git+https://github.com/nathom/streamrip.git@dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants