8000 Playlist downloads fail when tracks are unavailable for streaming · Issue #57 · cstaelen/tidarr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Playlist downloads fail when tracks are unavailable for streaming #57

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

Closed
Fonta opened this issue Jan 4, 2025 · 28 comments
Closed

Playlist downloads fail when tracks are unavailable for streaming #57

Fonta opened this issue Jan 4, 2025 · 28 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Fonta
Copy link
Fonta commented Jan 4, 2025

When tracks are unavailable for streaming, the downloading of the playlist fails.
It should either simply skip the unavailable tracks or continue with the rest of the list when tiddl fails to download a single track.
Perhaps this could even be a setting, like fail on x download failures?
Either way it should notify about the tracks being unavailable for download.

Within Tidal the unavailable tracks look like this:

image

image

@cstaelen
Copy link
Owner
cstaelen commented Jan 5, 2025

Hello @Fonta.
Could you please try to download the playlist with CLI ?

docker compose exec -it tidarr tiddl <playlist-url>

Does the process reach the end ?

Thanks for your feedback 🙏

@Fonta
Copy link
Author
Fonta commented Jan 5, 2025

That also doesn't work.
Guess it's a tiddl issue?

Screenshot 2025-01-05 at 14 35 40@2x

@cstaelen
Copy link
Owner
cstaelen commented Jan 5, 2025

Thanks for reporting 👍
Indeed you are right.

I'll open a tiddl issue for this point.
In the same time i will adapt UI to discriminate unvailable tracks.

@cstaelen
Copy link
Owner
cstaelen commented Jan 5, 2025

For the records : oskvr37/tiddl#66

@cstaelen cstaelen self-assigned this Jan 6, 2025
@cstaelen cstaelen added the bug Something isn't working label Jan 6, 2025
@cstaelen cstaelen added this to the 0.1.12 milestone Jan 6, 2025
cstaelen added a commit that referenced this issue Jan 15, 2025
@cstaelen
Copy link
Owner

Hello @Fonta

This issue should be fixed in latest release : 0.1.12. (Thanks to Tiddl author)

Let me know if all is fine :)

Regards.

@Fonta
Copy link
Author
Fonta commented Jan 15, 2025

@cstaelen Tested 0.1.12.
Unfortunately every download now gives the following error immediately after starting a download.
Screenshot 2025-01-16 at 00 40 17@2x
=== Tiddl ===,Executing: tiddl http://www.tidal.com/album/334813836 -q master -p /home/app/standalone/download/incomplete -o {album}/{artist} - {title} -s -e flac,Tiddl Error: Error: spawn tiddl ENOENT,Tiddl process exited with code -2

If I open a bash shall, it's unable to find the tiddl command.
Screenshot 2025-01-16 at 00 23 33@2x

tiddl is available within the venv though.
Screenshot 2025-01-16 at 00 26 22@2x

But I don't know if this is causing the error.

@cstaelen
Copy link
Owner
cstaelen commented Jan 16, 2025

Seems weird, I made 2 fresh install, docker pull and stuff, and I've got no issue, no clue 🤔
Could you please try :

docker compose stop tidarr
docker stop <tidarr-container-id-if-exists>
docker image rm cstaelen/tidarr
docker compose pull tidarr
docker compose up -d tidarr

@Fonta
Copy link
Author
Fonta commented Jan 17, 2025

@cstaelen Think I found the issue. Recreated the container and found that the value for the PATH environment variable changed.
Was:
/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And now is:
/root/.venvs/bin:/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
The new value adds the path to the tiddl executable (/root/.venvs/bin).

@Fonta
Copy link
Author
Fonta commented Jan 17, 2025

@cstaelen Running into something else. Some track downloads give an error module 'ffmpeg' has no attribute 'input'
Can you try downloading this track (forcing flac as file extension)?
https://tidal.com/browse/track/339078049
I also tried without forcing flac, but had the same error.

=== Tiddl ===,Executing: tiddl http://www.tidal.com/track/339078049 -q master -p /home/app/standalone/download/incomplete -o {album}/{artist} - {title} -s -e flac,Tiddl: �[0;32m[ TIDDL ] �[0msaving new settings...�[0m
,Current Settings:
> DOWNLOAD_PATH "/home/app/standalone/download/incomplete"
> TRACK_QUALITY "HI_RES_LOSSLESS"
> TRACK_TEMPLATE "{album}/{artist} - {title}"
> ALBUM_TEMPLATE "{artist}/{album}/{title}"
> PLAYLIST_TEMPLATE "{playlist}/{title}"
> FILE_EXTENSION "flac",
,Tiddl: �[0;32m[ TIDDL ] �[0msaved settings to /root/.tiddl_config.json�[0m
,Tiddl: �[0;32m[ TIDDL ] �[0mAriana Grande - yes, and_ :: Max Quality - 24 bit 48.0 kHz�[0m
,threaded download ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%
,Tiddl: Traceback (most recent call last):
  File "/root/.venvs/bin/tiddl", line 8, in <module>
,Tiddl:     sys.exit(main())
             ^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 270, in main
,Tiddl:     downloadTrack(
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 184, in downloadTrack
    track_data, extension = downloadTrackStream(
                            ^^,Tiddl: ^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/download.py", line 209, in downloadTrackStream
,Tiddl:     track_data = toFlac(track_data)
,Tiddl:                  ^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/download.py", line 174, in toFlac
,Tiddl:     ffmpeg.input("pipe:0")
    ^^^^^^^^^^,Tiddl: ^^
AttributeError: module 'ffmpeg' has no attribute 'input'
,Tiddl process exited with code  1

@cstaelen
Copy link
Owner

Thanks for the feedback.
It seems to be also an issue with binary location.
I investigate 👍

@Fonta
Copy link
Author
Fonta commented Jan 17, 2025

Perhaps, but ffmpeg is in /usr/bin and that path is in the environment variable.
Could it be the wrong ffmpeg?
Googling show a ffmpeg-python package which could be used instead.

Image

@Fonta
Copy link
Author
Fonta commented Jan 17, 2025

@cstaelen After executing "pip install ffmpeg-python" in "/root/.venvs" the downloading works.

Within container:
Image

Console output:
Image

@cstaelen
Copy link
Owner
cstaelen commented Jan 17, 2025

Ok great !
I get it too 👍
It happens using TIDDL_QUALITY=master and TIDDL_FORCE_EXT=flac.

You're right, about ffmpeg-python, it's a python binding for ffmpeg, both seem to be necessary (apk + pip binary).

I'll fix soon in next release 0.1.13.

Thank you so much for your help 🙌

@cstaelen cstaelen reopened this Jan 17, 2025
@cstaelen
Copy link
Owner

@Fonta i wait for your feedback before closing this issue :)

@Fonta
Copy link
Author
Fonta commented Jan 18, 2025

@cstaelen All seems to work now! Awesome job 💯

@Fonta Fonta closed this as completed Jan 18, 2025
@rusty1281
Copy link

Sorry for opening the ticket again, but I have just tried to download some albums both in high or master quality, and always getting the same error:

MASTER

  File "/root/.venvs/bin/tiddl", line 8, in <module>
,Tiddl:     sys.exit(main())
             ^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 281, in main
,Tiddl:     downloadAlbum(input_id, skip_existing)
,Tiddl:   File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 212, in downloadAlbum
    ,Tiddl: album = api.getAlbum(album_id)
   ,Tiddl:          ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/api.py", line 88, in getAlbum
,Tiddl:     return self._request(f"albums/{id}", {"countryCode": self.country_code})
,Tiddl:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/api.py", line 52, in _request
,Tiddl:     raise ApiError(req.text, data)
,Tiddl: tiddl.api.ApiError: {"status":404,"subStatus":2001,"userMessage":"Album [288984589] not found"}
,Tiddl process exited with code  1

HIGH

,Tiddl: �[0;32m[ TIDDL ] �[0msaved settings to /root/.tiddl_config.json�[0m
,Tiddl: Traceback (most recent call last):
  File "/root/.venvs/bin/tiddl", line 8, in <module>
,Tiddl:     sys.exit(main())
             ^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 281, in main
,Tiddl:     downloadAlbum(input_id, skip_existing)
,Tiddl:   File "/root/.venvs/lib/python3.12/site-packages/tiddl/__init__.py", line 212, in downloadAlbum
,Tiddl:     album = api.getAlbum(album_id)
,Tiddl:             ^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/api.py", line 88, in getAlbum
,Tiddl:     return self._request(f"albums/{id}", {"countryCode": self.country_code})
,Tiddl:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,Tiddl: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.venvs/lib/python3.12/site-packages/tiddl/api.py", line 52, in _request
,Tiddl:     raise ApiError(req.text, data)
,Tiddl: tiddl.api.ApiError: {"status":404,"subStatus":2001,"userMessage":"Album [288984589] not found"}
,Tiddl process exited with code  1

The manual install of ffmpeg-python has no effect as I am already on the latest image version.

Any idea?

Thanks!!

@cstaelen
Copy link
Owner

Hello @rusty1281

Could please give me the url of the content you try to DL please ?

Thank you :)

@Fonta
Copy link
Author
Fonta commented Jan 18, 2025

@cstaelen It's 72 Seasons by Metallica. Don't know why Tidarr is unable to find https://tidal.com/browse/album/288984589

It gives an empty page:
Image

While browsing to the address does work:
Image

@rusty1281 try https://tidal.com/browse/album/288627595

Which seems to work:
Image

@rusty1281
Copy link

Hello @rusty1281

Could please give me the url of the content you try to DL please ?

Thank you :)

Yes, that was 72S by Metallica but it seems to fail for all their albums for some reason?

@Fonta
Copy link
Author
Fonta commented Jan 18, 2025
8000

@rusty1281 Did you try the url I gave you?
Otherwise it might be good to open your own issue as it's unrelated to the issue this thread was opened for.

@rusty1281
Copy link

I just got back and tested with a few other artists and it all works fine. Not sure what the deal is with Metallica.

@rusty1281
Copy link

@rusty1281 Did you try the url I gave you? Otherwise it might be good to open your own issue as it's unrelated to the issue this thread was opened for.

I did, loads up grey thumbnails as well. No matter, it clearly has nothing to do with this issue at least not in this updated version.

Tnx for the assist

@cstaelen
Copy link
Owner

Weird 🤔
Just to be sure, is your REACT_APP_TIDAL_COUNTRY_CODE same as your Tidal regular account ?

@cstaelen
Copy link
Owner

Ok I got the same issue.
It's weird because, when you search for this album https://listen.tidal.com/search?q=72%20Seasons
The album ID you linked does not exists in results 🤔 (seems to be the MAX version ?).

Does it happen with other MAX album ?
Need more time to investigate :)

@cstaelen
Copy link
Owner
cstaelen commented Jan 20, 2025

Seems to be related to #62 (pls continue the discussion in this new issue)

Tidarr allow us to download content available in your logged in Tidal player.

Both albums (https://tidal.com/browse/track/339078049 and http://www.tidal.com/album/33969843) are accessible on the public Tidal album page, but in my logged in Tidal player, they aren't.

Are you able to find those albums in your logged-in Tidal player ?

Thanks for your feedback :)

@Fonta
Copy link
Author
Fonta commented Jan 20, 2025

@cstaelen
The first link just works and is only a single track.

The second link to the album though:
When I login on the Tidal website and visit the links you provided, the page loads without issue.
Then clicking Play on TIDAL, it shows an error.

Image

Gives:
Image

In my opinion this is an Tidal issue.

@cstaelen
Copy link
Owner

My bad, there was a typo in first URL, I wanted to talk about this one : https://tidal.com/browse/album/288984589
It does not appear in my logged in player.

@Fonta
Copy link
Author
Fonta commented Jan 21, 2025

Yep, that album link gives the exact same error.

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

3 participants
0