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

Album downloads as stereo FLAC instead of Atmos #25

Closed
mrmatteastwood opened this issue Nov 8, 2022 · 7 comments
Closed

Album downloads as stereo FLAC instead of Atmos #25

mrmatteastwood opened this issue Nov 8, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@mrmatteastwood
Copy link

Describe the bug
When attempting to download https://listen.tidal.com/album/232719542, a stereo FLAC version is downloaded.

To Reproduce
Steps to reproduce the behavior:

  1. Use command 'python orpheus.py https://listen.tidal.com/album/232719542' with this config: https://gist.github.com/mrmatteastwood/5b8eb19b01241397d566d522fad14764
  2. Observe downloaded folder name and contents

Expected behavior
The Atmos version of the album shold be downloaded and stored as .m4a files.

Desktop (please complete the following information):

  • OS: Linux Mint 21
  • Python version 3.10.6

Additional context
My settings.json is set to put the suffix "[Dolby Atmos]" into the folder name for albums that are encoded as such. That suffix is missing from the folder title created for this album, suggesting it might not be properly recognized.
Haven't experienced this with any other Dolby Atmos encoded albums.

@mrmatteastwood mrmatteastwood added the bug Something isn't working label Nov 8, 2022
@Dniel97
Copy link
Owner

Dniel97 commented Nov 8, 2022

Just checked that link and it works fine for me, do you have a TIDAL HiFi Plus account? If you have one, I'd try deleting config/loginstorage.bin and try again.

@mrmatteastwood
Copy link
Author

mrmatteastwood commented Nov 8, 2022

Thanks for your quick reply! That is odd. Yes, I do have a Hifi Plus account and haven't encountered this issue with other albums so far. I deleted loginstorage.bin and went through both login steps - TV session and mobile session.

Is there a chance it has something to do with the token settings toward the end of the settings.json file? I left them on default because I couldn't figure out how to obtain "personal" tokens or whether it was necessary. So far, it hasn't interfered with downloads either way.

Terminal output:

$ python orpheus.py https://listen.tidal.com/album/232719542

   ____             _                    _____  _      
  / __ \           | |                  |  __ \| |     
 | |  | |_ __ _ __ | |__   ___ _   _ ___| |  | | |     
 | |  | | '__| '_ \| '_ \ / _ \ | | / __| |  | | |     
 | |__| | |  | |_) | | | |  __/ |_| \__ \ |__| | |____ 
  \____/|_|  | .__/|_| |_|\___|\__,_|___/_____/|______|
             | |                                       
             |_|                                       
             

 "enable_mobile" is enabled but no MOBILE session was found. Do you want to create a MOBILE session (used for AC-4/360RA) [Y/n]? y
 TIDAL: Creating a TV session
Opening https://link.tidal.com/OSAMW, log in or sign up to TIDAL.
Checking link      
Successfully linked!
 TIDAL: Creating a Mobile session
 TIDAL: Enter your Tidal username and password:
 Username: [redacted]
 Password: 
 Successfully logged in, using MOBILE_DEFAULT token!
 Successfully logged in, using MOBILE_ATMOS token!
=== Downloading album Heroes (232719542) ===
        Artist: The Midnight (6065221)
        Year: 2022
        Number of tracks: 13
        Service: TIDAL
        Downloading album cover

        Track 1/13
        === Downloading track Golden Gate (232719543) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28.1M/28.1M [00:01<00:00, 23.3MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719543 downloaded ===

        Track 2/13
        === Downloading track Brooklyn. Friday. Love. (232719544) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 24.1M/24.1M [00:01<00:00, 23.5MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719544 downloaded ===

        Track 3/13
        === Downloading track Heartbeat (232719545) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 27.2M/27.2M [00:01<00:00, 23.5MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719545 downloaded ===

        Track 4/13
        === Downloading track A Place of Her Own (232719546) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 33.7M/33.7M [00:01<00:00, 23.5MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719546 downloaded ===

        Track 5/13
        === Downloading track Heroes (232719547) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.7M/34.7M [00:01<00:00, 19.9MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719547 downloaded ===

        Track 6/13
        === Downloading track Heart Worth Breaking (232719548) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31.9M/31.9M [00:01<00:00, 22.8MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719548 downloaded ===

        Track 7/13
        === Downloading track Loved by You (232719549) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23.2M/23.2M [00:01<00:00, 23.4MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719549 downloaded ===

        Track 8/13
        === Downloading track Aerostar (232719550) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 28.5M/28.5M [00:01<00:00, 23.5MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719550 downloaded ===

        Track 9/13
        === Downloading track Change Your Heart or Die (232719551) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22.6M/22.6M [00:01<00:00, 23.4MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719551 downloaded ===

        Track 10/13
        === Downloading track Avalanche (232719552) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30.5M/30.5M [00:01<00:00, 23.4MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719552 downloaded ===

        Track 11/13
        === Downloading track Souvenir (232719553) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 22.6M/22.6M [00:01<00:00, 23.2MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719553 downloaded ===

        Track 12/13
        === Downloading track Photograph (232719554) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 13.6M/13.6M [00:00<00:00, 23.5MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719554 downloaded ===

        Track 13/13
        === Downloading track Energy Never Dies, It Just Transforms (232719555) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Codec: FLAC, bitrate: 1411kbps, bit depth: 16bit, sample rate: 44.1kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19.6M/19.6M [00:00<00:00, 23.4MB/s]
                Downloading artwork
                Retrieving credits
                Tagging file
        === Track 232719555 downloaded ===
=== Album Heroes downloaded ===

@Dniel97
Copy link
Owner

Dniel97 commented Nov 8, 2022

No the default tokens are just fine, they are used for all devices anyway. That is indeed really odd... Can you tr searching for that specific album and see if OrpheusDL detects it as "Dolby Atmos". Also make sure you are using the latest OrpheusDL and OrpheusDL-tidal master commit.

@mrmatteastwood
Copy link
Author

I deleted the whole orpheusdl folder just now and installed the latest versions of both orpheusdl and the TIDAL module from scratch, following the installations instructions from both readmes. Re-did my settings.json file and now it downloads one track (Atmos works!) and then aborts. If I run the same command again, it downloads the second track and then aborts. Terminal output:

$ python orpheus.py search tidal album Heroes Midnight

   ____             _                    _____  _      
  / __ \           | |                  |  __ \| |     
 | |  | |_ __ _ __ | |__   ___ _   _ ___| |  | | |     
 | |  | | '__| '_ \| '_ \ / _ \ | | / __| |  | | |     
 | |__| | |  | |_) | | | |  __/ |_| \__ \ |__| | |____ 
  \____/|_|  | .__/|_| |_|\___|\__,_|___/_____/|______|
             | |                                       
             |_|                                       
             

1. Heroes - The Midnight [E] [56m:58s] [2022] [Dolby Atmos]
2. Heroes (& Instrumentals) - The Midnight [E] [01h:49m:42s] [2022] [Dolby Atmos]
3. Midnight Steppers: 70 Masterpieces by 34 Blues Piano Heroes - Various Artists [03h:24m:34s] [2013] [HiFi]
4. Rock N' Roll Heroes - Midnight Wankers [E] [18m:55s] [2009] [HiFi]
Selection: 1

=== Downloading album Heroes (232719542) ===
        Artist: The Midnight (6065221)
        Year: 2022
        Duration: 56m:58s
        Number of tracks: 13
        Service: TIDAL
        Downloading album cover

        Track 1/13
        === Downloading track Golden Gate (232719543) ===
                Artists: The Midnight (6065221)
                Release year: 2022
                Duration: 06m:05s
                Codec: E-AC-3 JOC, bitrate: 768kbps, sample rate: 48kHz

                Downloading track file
                100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 33.4M/33.4M [00:01<00:00, 23.1MB/s]
                Downloading artwork
Traceback (most recent call last):
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/orpheus.py", line 226, in <module>
    main()
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/orpheus.py", line 221, in main
    orpheus_core_download(orpheus, media_to_download, tpm, sdm, path)
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/orpheus/core.py", line 397, in orpheus_core_download
    downloader.download_album(media_id, extra_kwargs=media.extra_kwargs)
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/orpheus/music_downloader.py", line 224, in download_album
    self.download_track(track_id, album_location=album_path, track_index=index, number_of_tracks=number_of_tracks, main_artist=artist_name, cover_temp_location=cover_temp_location, indent_level=indent_level+1, extra_kwargs=album_info.track_extra_kwargs)
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/orpheus/music_downloader.py", line 440, in download_track
    download_file(track_info.cover_url, cover_temp_location, artwork_settings=self._get_artwork_settings())
  File "/home/thebrightside/Appdata/Linux-Apps/orpheusdl/utils/utils.py", line 76, in download_file
    im = im.resize((new_resolution, new_resolution), Image.Resampling.BICUBIC)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 65, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'PIL.Image' has no attribute 'Resampling'

Can you make heads or tails of these error messages?

@Dniel97
Copy link
Owner

Dniel97 commented Nov 8, 2022

Which version of Pillow is installed? Check it with pip list or pip3 list.

@mrmatteastwood
Copy link
Author

9.0.1

@mrmatteastwood
Copy link
Author

Updating Pillow fixed the issue :-) Thanks for your help!

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

2 participants