Skip to content

Add automatic Lidarr downloading triggered by Plex track ratings#123

Open
nironics wants to merge 5 commits into
LumePart:devfrom
nironics:lidarr-rating
Open

Add automatic Lidarr downloading triggered by Plex track ratings#123
nironics wants to merge 5 commits into
LumePart:devfrom
nironics:lidarr-rating

Conversation

@nironics
Copy link
Copy Markdown

Title explains the core of the idea. Here is my vision and how I've been using it myself when testing

  1. I have a large, hifi music library with music I like
  2. I want to discover new music, but dont necessarily want to commit to adding full Albums for artists I dont know if I'll like
  3. ListenBrainz generates playlist recommendations every week with new tracks on it
  4. Thanks to Explo, I can now generate these playlists in Plex, downloading missing tracks from Youtube to a separate "Explo" music library in Plex. All of my music library remains untouched
  5. If I discover a new song that I like, I can just rate it in the Plexamp UI with any number of stars.
  6. This triggers a Plex webhook (if you have Plex pass) that adds that album to Lidarr and automatically downloads it
  7. If you dont have plex pass, you can use a 15min cron schedule to check for newly rated tracks and theyll get added to Lidarr that way

What this achieves:
a) A high quality library of music I enjoy, archived in full complete albums
b) The ability to discover new tracks without needing to download more albums than I actually need/want

Changes

  • Adds the following env vars:
LIDARR_URL=http://lidarr:8686
LIDARR_API_KEY=...
LIDARR_ROOT_FOLDER=/music
LIDARR_QUALITY_PROFILE_ID=1
LIDARR_METADATA_PROFILE_ID=1
LIDARR_POLL_INTERVAL=1h   # optional, 0 to disable
  • Adds UI wizard page for filling in info (only if Plex was selected media library option. I dont use Jellyfin/Navidrome, but if people want compatibility for that they can make a PR or lmk)

Testing

I tested locally a bunch, and it seems pretty solid. I did find one other bug that I think is unrelated to my changes, it seems that the Plex search function was searching all Plex libraries, not just music libraries. And it has a limit in the response. So my ListenBrainz playlist had "Something" by the Beatles, and since that word is common in many TV and movie titles, it kept getting marked as missing from my music library because the search response would max out with all of the tv/movie library data. I updated the logic to restrict to only Music libraries, and cleaned up a bit to match the typing I needed for the Lidarr sync anyway

I know this is a big PR, and I did use Claude to help a bit with scaffolding and debugging, but I did not "vibe code". I am an experienced software engineer and I reviewed everything Claude gave back to me.

Post-merge

It might make sense to update the docs a bit to explain this, but I dont want to overstep @LumePart. I think in particular, my setup requires setting the LIBRARY_NAME to not the main music library, but instead to a new unique "Explo" library. And DOWNLOAD_DIR to the dir of the that Explo library. Dont even need to mount the main music library, since Plex API will create the playlists and search just fine without the actual track files

@DannyTheHeretic
Copy link
Copy Markdown

Any chance you plan to add tautalli support?

@nironics
Copy link
Copy Markdown
Author

nironics commented May 1, 2026

Any chance you plan to add tautalli support?

In what way? Tautulli tracks user history, I don't see what that would add to Explo really

@DannyTheHeretic
Copy link
Copy Markdown

For webhook support? I can filter tracks much better and only send events related to music, ignore tracks listened between times, and more. Also, it feels more stable that plex webhooks.

@nironics
Copy link
Copy Markdown
Author

nironics commented May 1, 2026

For webhook support? I can filter tracks much better and only send events related to music, ignore tracks listened between times, and more. Also, it feels more stable that plex webhooks.

Ah I see. I dont see a Tautulli trigger equivalent for media.rate though, which is what this PR is built around.
https://support.plex.tv/articles/115002267687-webhooks/

What trigger were you thinking of utilizing?

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

Successfully merging this pull request may close these issues.

2 participants