redsudo / RedSea

Music downloader for Tidal, depecrated (again)
84 stars 22 forks source link

Getting 'is not a valid FLAC file' (decryption failure?) #49

Closed 19h closed 5 years ago

19h commented 5 years ago

Hi,

I tried downloading a Jon Hopkins album to look into the audio spectrum but couldn't get it to run anymore.

Command: python3 redsea.py -p best_available https://tidal.com/album/87742374

Output:

#<<< Downloading album: 9 track(s) in total >>>
=== Downloading track ID 87742375 ===
    Track: 01
    Title: Singularity
    Artist: Jon Hopkins
    Album: Singularity
    ----
    Grabbing stream URL...
    Download progress: 579%
    Looks like file is encrypted. Decrypting...
    Tagging media file...
Traceback (most recent call last):
  File "redsea.py", line 225, in <module>
    main()
  File "redsea.py", line 169, in main
    md.download_media(track, preset['quality'], media_info)
  File "/Volumes/void/user/RedSea/redsea/mediadownloader.py", line 196, in download_media
    self.tm.tag_flac(temp_file, track_info, album_info, aa_location)
  File "/Volumes/void/user/RedSea/redsea/tagger.py", line 87, in tag_flac
    tagger = FLAC(file_path)
  File "/Library/Python/3.7/site-packages/mutagen/_file.py", line 49, in __init__
    self.load(*args, **kwargs)
  File "/Library/Python/3.7/site-packages/mutagen/_util.py", line 169, in wrapper
    return func(*args, **kwargs)
  File "/Library/Python/3.7/site-packages/mutagen/_util.py", line 140, in wrapper
    return func(self, h, *args, **kwargs)
  File "/Library/Python/3.7/site-packages/mutagen/flac.py", line 789, in load
    self.__check_header(fileobj, filething.name)
  File "/Library/Python/3.7/site-packages/mutagen/flac.py", line 911, in __check_header
    "%r is not a valid FLAC file" % name)
mutagen.flac.FLACNoHeaderError: './Jon Hopkins - Singularity/01 - Singularity.flac' is not a valid FLAC file

I'll investigate further when I'm home, but I'm just putting it here in case you have an idea.

Thanks

dawidziaja commented 5 years ago

Try pip install -r requirements.txt again. This seemed to fix the issue for me.

19h commented 5 years ago

That fixed it, thanks a bunch!