migz93 / lidarr-download-automation Goto Github PK
View Code? Open in Web Editor NEWBash script to download artists in Lidarr using smloadr or d-Fi
License: GNU General Public License v3.0
Bash script to download artists in Lidarr using smloadr or d-Fi
License: GNU General Public License v3.0
Is it possible for the script to run in both missing and cutoff mode?
Problem:
Added Ladytron album Best of 00–10 as wanted in Lidarr.
Run script and no match found through perfect or fuzzy matching. There is a perfect match however on deezer except for one character.
The hyphen (not really hyphen, but looks like it) in the album title is a non-standard character in musicbrainz, and is used by Lidarr. Not sure if this is allowed or is a bug on either musicbrainz or Lidarr's part.
Desired solution:
I edited the script to strip - and – from the deezer and lidarr album titles and got a perfect match and it imported correctly. It would be nice to have the script updated to eliminate or ignore non-standard characters when matching.
hello,it's possible to have a qobuz intégration
with this tool https://github.com/Sorrow446/Qo-DL ?
or with the api qobuz https://github.com/Qobuz/api-documentation
thank's a lot.
See SMLoadr issue #72
Probably best to recommend compiling SMLoadr 1.9.5 until then. It seems the dev has removed the release for it.
No artists are pulled from Lidarr, and as such, the script doesn't work. Bash script
I got several "iconv illegal input sequence" errors - basically, the the queried results were not UTF-8
Following this post, I was able work around, this problem
https://unix.stackexchange.com/questions/141539/iconv-illegal-input-sequence-why
This is how the code looks in my patched version:
alias ICONV_CMD_LATIN1="iconv -f latin1 -t ascii//TRANSLIT"
alias ICONV_CMD_UTF8="iconv -f UTF-8 -t ASCII/TRANSLIT"
ICONV_CMD=${ICONV_CMD_LATIN1}
The caveat here is that using latin1 will probably not work for non-latin1 encoding, so the correct solution is probably to either use it as a fallback when this error is detected, or as a user option (force-ascii?)
I was just wondering, does this just download what albums/EPs/singles are wanted in Lidarr, or does it just download everything? For example, my lidarr setup only wants albums and EPs. Does this download the singles as well?
Hello there,
First of all, thank you very much for your script, it works realy great at least for me.
I would like to ask if you can make your script compatible with d-fi, a new smloadr style deezer downloader.
https://notabug.org/sayem314/d-fi
The way d-fi work is pretty much the same as smloadr, but i found that d-fi is more reliable (smloadr get stuck alot if you use it to download a lot of music at the same time).
Thanks
Hello. Hoping someone might be able to point me in the right direction. I have Lidarr running on Windows 10, and lidarr_smloadr_script running inside of Bash on the same machine.
Everything seems to work perfectly except for when I have EnableLidarrProcess set to True, which is because the Windows path will be different than the linux mount location.
To overcome this obstacle, I added another variable in the config DownloadDirWin, and changed this in the script to use this path to pass to Lidarr, and Lidarr seems to accept this (and I confirmed that it's showing up in the events under Lidarr) but never actually finds any new files (confirmed there are files being written.)
So in the config I now have:
downloadDir="/mnt/d/Lidarr/"
downloadDirWin="D:\\Lidarr"
Thought it worth noting that I escaped this backslash in this variable (so written with 4 backslashes) after some trial and error as I'm not all that familiar with what JSON accepts.
And in the script I did :
dlloc=${downloadDirWin}
Anyone have any ideas? I'm in over my head on this one.
ALSO: thanks so much to the original author of this script, and the other contributors. Awesome work.
This is probably a stupid question (sorry) but I run Lidarr in a docker container. This means it doesn't have full access to the file system. So when the script tells Lidarr to pick up a downloaded album from, say "/volume1/unsorted/unsortedmusic/artist", Lidarr can't see that folder.
There's an option in Lidarr to work around this, where you can set directory aliases (so it'll look for "/volume1/Unsorted/unsortedmusic/" as "/Unsorted/unsortedmusic/" for example.) But this only works for download clients, and the smloadr script isn't treated in the same way.
Would it be possible to add a config option to set a second path, so when the post-processing request goes to Lidarr it's sent with a different path name?
Something like:
DownloadDir="/volume1/Unsorted/unsortedmusic/"
LidarrDownloadDir="/Unsorted/unsortedmusic/"
Or is it something I can hard code into my version of the script? I assume I could change something in the below, but those sed commands are way beyond my limited bash skills!
LidarrProcess(){ logit "Sending to Lidarr for post processing" dlloc=($(find "${DownloadDir}" -maxdepth 1 -type d -not -path "${DownloadDir}")) for d in "${dlloc[@]}"; do if [ "${EnableWSLMode}" = True ];then dwrap=($( echo "${d}"|sed -e 's/mnt\///' -e 's/^\///' -e 's/^./\0:/' -e 's/\//\\\\/g' -e 's/^/\"/g' -e 's/$/\"/g')) else dwrap=($( echo "${d}"|sed -e 's/^/\"/g' -e 's/$/\"/g')) fi LidarrProcessIt=$(curl -s "$LidarrUrl/api/v1/command" --header "X-Api-Key:"${LidarrApiKey} --data '{"name":"DownloadedAlbumsScan", "path":'"${dwrap}"'}' ); done sleep 3s }
Thanks in advance for your help - and thanks for tm the great script!
I believe that adding beets as a post-processing option can be beneficial for the script users.
What do you think?
Hi there,
I've setup the dremix branch so that its mostly working with deezloader 4.3.0.
One thing I noticed is that the recommended naming from the config.sample file has the (%artist_id%) variable for the album template.
(%artist_id%) is not a valid variable for album template so it does not populate.
Hi,
I am on arch-linux in a docker container from lidarr.
The script pulls artist from lidarr but then I get a syntax error
https://gyazo.com/217d604adfe4808e5e65940e7e349812
Can this be resolved?
Would it be possible to get a guide for using this script with Windows? I am familiar with SMLoadr and have it set up and downloading files properly. I have my config file placed in the same folder as SMLoadr except, i am not sure of what extension to use for the config file.
Thanks in advance
I am getting this error when trying to run the script:
https://bss.nz/i/09-11-2019-c59OTBAmTQ.png
Hello there,
Firt, let me thank you for this wondefull script.
I would like to ask if there is a way to make this script usable with Headphones (https://github.com/rembo10/headphones)
Thanks
A few people have mentioned that they'd like docker support. Raising this to track it.
It's on the list of things to do, just waiting for @RandomNinjaAtk to get to a stable state with his wonderful behind the scenes work on the script and then need to get the wiki up to an acceptable standard.
Any chance you could implement curl to plex autoscan on completion of an artist download?
Tried changing the LidarrProcessIt to
LidarrProcessIt=$(curl -d "eventType=Manual&filepath=/mnt/unionfs/Media/Music/${LidArtistName}" $PlexAutoScanURL);
but that just results in Autoscan getting spammed by requests rather than one request.
Every once in a while I'll run into an issue where the SMLoader indicates it's connecting to the Deezer API, or it'll say something about processing or I've one where it just hangs at 99% and nothing else happens and I've left it there for hours with no avail. Starting the script over again isn't ideal in my case (processing thousands of artists), so in case it helps someone else out, I added this workaround which seems to work at line 96 of my script:
timeout 900s ./SMLoadr-linux-x64 -q ${quality} -p "${downloadDir}" "${DLURL}"
I made the timeout quite large as I have run into a couple situations where a couple of artist had something like 5000 tracks? and it took some serious time and I didn't want it to kill the script prematurely, and for me waiting 15 minutes is still much better than starting over from scratch and spending something like 24 hours to catch back up to where I left off.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.