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

Can't create a playlist in Jellyfin #14

Open
mickgotwings opened this issue Feb 9, 2025 · 3 comments
Open

Can't create a playlist in Jellyfin #14

mickgotwings opened this issue Feb 9, 2025 · 3 comments

Comments

@mickgotwings
Copy link

Getting an error message in the logs:

failed to create playlist: createJfPlaylist(): got 400 from https://...

Refreshing library works fine, so it must not be related to auth. Also, it's a 400, not a 401/403.
Explo is the latest version, Jellyfin is 10.10.5.

@LumePart
Copy link
Owner

LumePart commented Feb 10, 2025

Thanks for reporting,
I wasn't able to reproduce this (using 10.10.5 as well), I published a new version which prints out the full response body, when a NOK response code is received. Could you try running Explo again with v0.8.4 and set DEBUG to true in .env

@mickgotwings
Copy link
Author

mickgotwings commented Feb 10, 2025

Sure, here you go:

2025/02/10 23:12:39 using jellyfin
2025/02/10 23:12:48 compiled command: ffmpeg -i /music/explo/You Rock My World-Michael Jackson_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Michael Jackson -metadata title=You Rock My World -metadata album=Invincible /music/explo/You Rock My World-Michael Jackson.mp3 -y
2025/02/10 23:12:54 Using 'test' discovery method. Downloaded 1 song.
2025/02/10 23:12:54 [jellyfin] Refreshing library...
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get You Rock My World-Michael Jackson
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Reflections Laughing feat. Travis Scott, Florence the Machine-The Weeknd
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Étouffée-Vince Staples
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Didn t Cha Know-Erykah Badu
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Human Nature-Michael Jackson
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Niagara Falls-The Weeknd
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Steps Beach-Childish Gambino
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Witchy feat. Childish Gambino-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get In the Night feat. Jorja Smith, Amaarae-Childish Gambino
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Doo Wop That Thing -Lauryn Hill
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Spit It Out feat. Rochelle Jordan-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get P.Y.T. Pretty Young Thing -Michael Jackson
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Survive feat. Chlöe-Childish Gambino
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get A Place Where Love Goes-Childish Gambino
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Still feat. Charlotte Day Wilson-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Enjoy the Show feat. Future-The Weeknd
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get I Killed You-Tyler, The Creator
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Cry for Me-The Weeknd
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Feel a Way feat. Don Toliver-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Leave Me Alone-Michael Jackson
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Perfect Stranger-FKA twigs
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Dance Dance Dance Dance-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Sticky feat. GloRilla, Sexyy Red, Lil Wayne-Tyler, The Creator
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Call U Up feat. Lou Phelps-KAYTRANADA
2025/02/10 23:14:54 DEBUG: /app/src/jellyfin.go:163 could not get Liberian Girl-Michael Jackson
2025/02/10 23:14:54 DEBUG: /app/src/main.go:248 response body: {"type":"https://tools.ietf.org/html/rfc9110#section-15.5.1","title":"One or more validation errors occurred.","status":400,"errors":{"Ids":["The Ids field is required."]},"traceId":"00-4df47b4eed04d2e87ba4b2bca9081ee9-c5d6f169f546b00c-00"}
2025/02/10 23:14:54 failed to create playlist: createJfPlaylist(): got 400 from https://jellyfin.dockervm.local/Playlists

To be fair, I've ran it in test mode, since explo wouldn't find my latest playlist (possible timezone issue or smth).

Also, the output is weird: I haven't got any of those songs neither in my library, nor in my listenbrainz discovery playlist.
I'm pretty sure my .env is valid, but just in case, I'll also put it here for debug:

# Music system you use (emby, jellyfin, mpd, plex or subsonic)
EXPLO_SYSTEM=jellyfin
# Address of music system (required for emby, jellyfin, plex and subsonic)
SYSTEM_URL=https://jellyfin.dockervm.local
# API Key from music server (required for emby, jellyfin)
API_KEY=REDACTED
# Directory where to download tracks (required)
# PS! It's recommended to make a separate directory (under the music library) for Explo
DOWNLOAD_DIR=/music/explo
# Username for ListenBrain recommendations (required)
LISTENBRAINZ_USER=mickgotwings
# Youtube Data API key (required)
YOUTUBE_API_KEY=REDACTED
LIBRARY_NAME=Music

LISTENBRAINZ_DISCOVERY=test
DEBUG=true

Furthermore, I can indeed see the file "You Rock My World-Michael Jackson.mp3" both in the expected folder, and in the Jellyfin library, so it's weird it wasn't found by explo.

UPD: the link to Listenbrainz discovery playlist for convenience: https://listenbrainz.org/playlist/4b2861a7-80e7-448d-ab45-146242b2af8c/

@LumePart
Copy link
Owner

As far as the output goes, the songs are coming from ListenBrainz API, they are still tailored to you, but the API only returns ~25 songs and it updates less often (and test downloads the first available one).

Can you tell me how large your Music library is (approx)? I haven't ran Explo with a large library, so the problem could come from there. Right now Explo (should) query every item in the library and then search for the song based on the output. (tbh I have to come up with a better way to search for songs on Jellyfin).

Could you try making an separate library and change LIBRARY_NAME to the new one. Make sure "Enable real time monitoring" is checked in the library options. After that try running Explo in test mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants