Explo icon indicating copy to clipboard operation
Explo copied to clipboard

How to Validate & Debug?

Open timkeefer1 opened this issue 6 months ago • 5 comments

First a huge shout-out for the creativity and ingenuity to create this... Brilliant! I'm using Jellyfin and YouTube, and have validated that my music plays are scrobbling to LB.


It's been about a week and I'm trying to validate my setup. I'm getting some weird results, and I'm not sure how to triage what's going on. Maybe some of this can turn into good Q&A content :)

  1. What Listenbrainz playlist does Explo pull from? Under Dashboard, then the Created for you tab, I have "Weekly Exploration" which has 50 tracks in it (I think this is what it is attempting to use). There's also another possibility - under Explore, Fresh Releases, "For You" <-- but this is empty for me.

  2. How does Explo build the list of tracks to download? I would think it would just use the list from Weekly Exploration. However, in my container log, none of the files that it appears to be adding shows up in the "Weekly Exploration" list? I'll attach both the log and list at the bottom of this issue. It did successfully download some tracks to my /data folder that match the items in the container log, but not the LB list.

  3. What items are added to the "Discover-Weekly-YYYY-WeekWW" playlist? Explo did create a playlist for me in JF named this - but it doesn't contain the items that were downloaded - but it DOES contain other items from my music library.

Just a note too that I found that I can "docker exec -it explo" into the container, and run the command that is from the crontab into the command line to troubleshoot: apk add --upgrade yt-dlp && cd /opt/explo && ./explo >> /proc/1/fd/1 2>&1


My container log:

fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
(1/2) Upgrading libcrypto3 (3.5.0-r0 -> 3.5.1-r0)
(2/2) Upgrading libssl3 (3.5.0-r0 -> 3.5.1-r0)
Executing ca-certificates-20241121-r2.trigger
OK: 201 MiB in 166 packages
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Please Please Please' by 'Sabrina Carpenter' in album 'Short n’ Sweet'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Club classics' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Von dutch' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Apple' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Not Like Us' by 'Kendrick Lamar' in album 'Not Like Us'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Disease' by 'Lady Gaga' in album 'MAYHEM'
2025/07/08 00:15:03 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find '360' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:15:16 compiled command: ffmpeg -i /data/Not_Like_Us-Kendrick_Lamar_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Kendrick Lamar -metadata title=Not Like Us -metadata album=Not Like Us /data/Not_Like_Us-Kendrick_Lamar.mp3 -y
2025/07/08 00:15:16 compiled command: ffmpeg -i /data/Club_classics-Charli_xcx_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Charli xcx -metadata title=Club classics -metadata album=BRAT /data/Club_classics-Charli_xcx.mp3 -y
2025/07/08 00:15:18 compiled command: ffmpeg -i /data/Please_Please_Please-Sabrina_Carpenter_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Sabrina Carpenter -metadata title=Please Please Please -metadata album=Short n’ Sweet /data/Please_Please_Please-Sabrina_Carpenter.mp3 -y
2025/07/08 00:15:18 compiled command: ffmpeg -i /data/Apple-Charli_xcx_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Charli xcx -metadata title=Apple -metadata album=BRAT /data/Apple-Charli_xcx.mp3 -y
2025/07/08 00:15:19 compiled command: ffmpeg -i /data/Von_dutch-Charli_xcx_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Charli xcx -metadata title=Von dutch -metadata album=BRAT /data/Von_dutch-Charli_xcx.mp3 -y
2025/07/08 00:15:25 [youtube] Download finished: Charli xcx - Club classics
2025/07/08 00:15:25 [youtube] Download finished: Charli xcx - Apple
2025/07/08 00:15:26 [youtube] Download finished: Sabrina Carpenter - Please Please Please
2025/07/08 00:15:28 [youtube] Download finished: Charli xcx - Von dutch
2025/07/08 00:15:33 compiled command: ffmpeg -i /data/360-Charli_xcx_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Charli xcx -metadata title=360 -metadata album=BRAT /data/360-Charli_xcx.mp3 -y
2025/07/08 00:15:34 compiled command: ffmpeg -i /data/Disease-Lady_Gaga_TEMP.mp3 -loglevel error -map 0:a -metadata artist=Lady Gaga -metadata title=Disease -metadata album=MAYHEM /data/Disease-Lady_Gaga.mp3 -y
2025/07/08 00:15:35 [youtube] Download finished: Kendrick Lamar - Not Like Us
2025/07/08 00:15:38 [youtube] Download finished: Charli xcx - 360
2025/07/08 00:15:44 [youtube] Download finished: Lady Gaga - Disease
2025/07/08 00:15:44 [youtube] No further monitoring required
2025/07/08 00:15:44 [jellyfin] Refreshing library...
2025/07/08 00:17:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Please Please Please' by 'Sabrina Carpenter' in album 'Short n’ Sweet'
2025/07/08 00:17:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Club classics' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:17:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Von dutch' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:17:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Apple' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:17:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Not Like Us' by 'Kendrick Lamar' in album 'Not Like Us'
2025/07/08 00:17:46 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Disease' by 'Lady Gaga' in album 'MAYHEM'
2025/07/08 00:17:46 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find '360' by 'Charli xcx' in album 'BRAT'
2025/07/08 00:17:46 [jellyfin] Discover-Weekly-2025-Week28 playlist created successfully

Here's a public link to the LB Weekly Exploration playlist https://listenbrainz.org/playlist/344e69c7-a63c-4aba-ba96-5daf66eac0fa/

Don't have a great way to share the tracks from the JF playlist, but it's tracks that are not on either list.

timkeefer1 avatar Jul 08 '25 20:07 timkeefer1

Hey!
Thanks for the kind words.

Explo does use Weekly Exploration to pull tracks by default. This behavior is controlled by the LISTENBRAINZ_DISCOVERY environment variable.

If LISTENBRAINZ_DISCOVERY is set to anything other than playlist, Explo will fall back to the ListenBrainz API. However, note that the API provides only 25 tracks (compared to 50 from the playlist) and is rarely updated — so using the playlist is generally the better option.

Explo searches for tracks by title on your music system, then attempts to match them using metadata (album, artist, title, etc.). If a suitable match is found, it's returned and added to the playlist.

What you can do:

  • Make sure LISTENBRAINZ_DISCOVERY is set to playlist (or is commented out).
  • In Jellyfin → Library Management, ensure:
    • Enable real-time monitoring is checked.
    • Under both Album and Artist Metadata Downloaders, MusicBrainz is listed first and enabled.

Once that’s done, rescan your library and try running Explo again.

LumePart avatar Jul 09 '25 14:07 LumePart

Back after a week ;) I was using api for LISTENBRAINZ_DISCOVERY - that's what the issue was with the Weekly Exploration not tying out to the actual downloaded files! So - once I changed it to playlist - everything downloaded as listed! Yay!

Now on to the Jellyfin side... I've got MusicBrainz and Apple Music selected as Metadata providers, but MusicBrainz at the top. No automatic metadata refreshes, no savers. I don't think it matters, but I also have Fanart, TheAudioDB, and Apple music enabled and set as the order for Image Fetchers for Artists & Albums. LrcLib is also running as a Lyric downloader.

The same kind of error log events fired after it downloaded this week's tracks - where Jellyfin isn't finding the Song - Artist - Album matches. And the weekly playlist it creates in Jellyfin are other random tracks from my library.

2025/07/15 00:20:43 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Too Much' by 'Dove Cameron' in album 'Too Much'
2025/07/15 00:20:43 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'I Love Hollywood!' by 'Slayyyter' in album 'STARFUCKER'
2025/07/15 00:20:43 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find '365 feat. shygirl' by 'Charli xcx' in album 'Brat and it’s completely different but also still brat'
2025/07/15 00:20:43 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Motion Sickness' by 'Phoebe Bridgers' in album 'Stranger in the Alps'
... (More of These) ...
2025/07/15 00:20:45 DEBUG: /app/src/client/jellyfin.go:164 [jellyfin] failed to find 'Whiplash' by 'aespa' in album 'Whiplash'
2025/07/15 00:20:45 [jellyfin] Discover-Weekly-2025-Week29 playlist created successfully

BUT - it IS adding putting all these tracks in the BRAT / Charli xcx album. It's sort of like the first track that was added to the folder that explo is storing the files in - is being used as the metadata information for all files in that folder. If I used metadata-remote, I can see that the files themselves have the correct metadata on them... but when populating the Jellyfin library - that's where things are getting confused.

I'm not sure this is an explo issue... it's downloading files correctly. Only thing I can think of is a need to update the folder structure to be more like /artist/album/track.mp3 ?

timkeefer1 avatar Jul 16 '25 18:07 timkeefer1

Sounds like Jellyfin itself messes up the metadata, I doubt it happens with the MusicBrainz metadata, maybe Apple Music somehow overrides that? If Explo has downloaded the track during the same run, it also checks the filename and track length, in case the track can't be matched by metadata alone - this should get the correct track 99% of the time (only requirement is the correct title).

You can try creating an new library for Explo, and only enable the settings I recommended earlier (then change the LIBRARY_NAME variable as well)

In Jellyfin → Library Management, ensure:

  • Enable real-time monitoring is checked.
  • Under both Album and Artist Metadata Downloaders, MusicBrainz is listed first and enabled.

Also, the items which get added to the playlist, do they have any similarities to your LB playlist tracks? (title is similar or contains the same word, artist matches etc...)

I have tried running with my Jellyfin test instance and I can't reproduce the problem

LumePart avatar Jul 17 '25 15:07 LumePart

So I've done some additional troubleshooting and wanted to follow up. I created an entirely separate "Music Discovery" media library in Jellyfin. This is separate from the "Music" library. Metadata source (Artists/Albums) is just MuiscBrainz.

Folder structures on the host are - (Music) - /mnt/truenas-media/media/music/aa-CoreMusic (Music Discovery) - /mnt/truenas-media/media/music/aa-explo

In explo I'm mounting the Music Discovery folder path into the container in my docker compose file as - /mnt/truenas-media/media/music/aa-explo:/data/

Still didn't work.

Changed my .env file to using my Subsonic server. I did upgrade to 0.58.0 which support multiple libraries, went through the upgrade DB update and full scan, added the second library. Fired off explo, and it downloaded to the /mnt/truenas-media/media/music/aa-explo folder (yay!) It also populated the playlist (yay!) So I think I'm good to go on Subsonic, and just can't get things to work on Jellyfin. This isn't the end of the world - I like Manet/Discrete better than I do Play:Sub, Of course, since Jellyfin can also see this library, it does add the downloaded items to its (Music Discovery) library as well... just with no playlist.

I'm starting to think the core issue I am/was facing is maybe file/folder pathing? I poked around the jellyfin.go for a bit, so I'm not very sure of myself here... my guess would be that it's trying to setup a playlist using the file/folder pathing that explo knows, which is different from what Jellyfin knows? IDK...

timkeefer1 avatar Aug 05 '25 18:08 timkeefer1

Explo doesn't really use pathing to set up playlists, in almost all cases Explo relies on the Music system's API (and the returned track metadata). If it can't match by metadata, it tries to match by filename (if it was recently downloaded and the Music system can return the filename).

A simpler explanation would be:

  1. Search song by Music systems API
  2. Try to find match via metadata from the returned results (if found save the track ID)
  3. Repeat 1 and 2, until all tracks are processed
  4. Create playlist with the saved track IDs (via the Music systems API)

If the track isn't available after the library scan, Explo can't find it (even though it knows where it is).

If you're up for some troubleshooting, then it would be good to know if the tracks become visible in the music system during the library scan and if you can search for the tracks in jellyfin itself

LumePart avatar Aug 06 '25 18:08 LumePart