RandomNinjaAtk / arr-scripts

Extended Container Scripts - Automation scripts to make life easier!
GNU General Public License v3.0
560 stars 56 forks source link

[FEATURE] - Lidarr - Better release selection and management #254

Open Kamology opened 2 months ago

Kamology commented 2 months ago

This is half a question, and depending on the answer to the question, a feature request.

How does matching/grabbing work on the scripts end? I see that Lidarr tends to automatically select a "Release" (Automatically Switch Release in the album Edit menu). In the case of one album, a weird special version of the album was grabbed and downloaded (the "nightcore version" for this release) while the normal explicit version that I would expect it to download wasn't, and it exists in Musicbrainz with a matching title, and even a link to Deezer which is what I'm using. Is this Lidarrs fault? My interpretation is that it isn't, and rather Lidarr just automatically matches to whatever is grabbed, which in this case was the weird version that the script grabbed.

So my feature request (if this is a quirk of the script) would be to allow some granularity/customization/better selection in how release versions are chosen. For example, prioritize albums without (super duper special version) parenthesis or something to try and cut down on weird versions. Open to other suggestions if there's a smarter way to do this, just what came off the top of my head.

I also may just be wrong and something may be configured wrong to have caused it to grab the weird version, but as far as I can tell the title and all the information in Musicbrainz is correct and should've resulted in a match for the default version.

As I'm typing this it actually just grabbed ANOTHER weird version of the album, this time the "slowed down" one after I deleted and manually selected the normal version in Lidarr. I imagine it'll grab the "sped up" version next lol. Does it just go down the list bottom to top?

Kamology commented 2 months ago

Lidarr does actually seem to be refusing import after manually specifying the release and the script then, seemingly, moved onto the "sped up" version as I predicted. Which is... good behavior, in a sense, but also not exactly my desired outcome as I'd really prefer the proper album being grabbed in the first place and also not having to manually intervene.

image

RandomNinjaAtk commented 2 months ago

The script has a very simple logic for matching releases.

  1. Filter by language (explicit/clean)
  2. Filter by all releases, min and max track count
  3. Sort the releases available by max track count first
  4. Match via release title by starting at the top of the list.

The script then goes through the list and pulls the first match, regardless of the Release Title... So it prioritizes releases by highest track count first, which is more likely to be a deluxe or special edition in most cases....

You can clearly see this process if you read the logs....

Other than reversing the order, prioritize lowest track count first, I'm not really sure what could be done to improve it....

I welcome any ideas, assuming they're actually implementable, but I don't have much free time on my hands these days to re-write it and I'm not sure how it could be done differently...

Killface1980 commented 3 weeks ago

I'm having a similar issue, with the script preferring re-releases of classic albums, which tend to have the original recording, a modern remix, a live version and then - demo versions. While it's good to have the selection, propping up a 40 minutes album from the 70/80/90s to 4+ hours is far too much (looking at you, Nirvana ;-) For my last download I've added the following lines to the audio script in order to skip the bloats.

        if [[ "$deezerAlbumTitle" == *"Deluxe"* || "$deezerAlbumTitle" == *"Special Edition"* || "$deezerAlbumTitle" == *"Anniversary"* || "$deezerAlbumTitle" == *"Instrumental"* ]]; then
            log "$1 :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Artist Search :: Deezer :: $type :: $lidarrReleaseTitle :: Deluxe/special/anniversary unwanted."
            continue
        fi

You could maybe filter out those keywords, and add them to a list. After processing the regular albums, the script could look for the filtered ones.