youegraillot / lidarr-on-steroids

Lidarr with some muscles thanks to deemix
396 stars 28 forks source link

Is there a way just to use the patched deemix thats included? #92

Closed jeliastam closed 9 months ago

jeliastam commented 9 months ago

I am on unraid and the general consensus seems to be that lidarr+plugins+deemix is dead unless you have access to a patched deemix container. This repo has the patched deemix that is needed, but is not maintained(apologies if that is insensitive) and lidarr is way behind upstream. I have managed to run this container and ignore the lidarr portion just so I can point my actual lidarr instance at the patched deemix.

What I am getting at is, could you provide either a way to disable the lidarr portion of the container or just provide a container with the patched version of deemix?

Apologies for my ignorance and/or if I offended!

randerson-dev commented 9 months ago

I'm in the exact same position you're in. How did you get a real lidarr instance to interact with the deemix in this container?

jeliastam commented 9 months ago

I didn't do anything too special I don't think. Setup the container like normal, give lidarr a diff port than your viable lidarr instance and thats about it. I did find that you can run s6-rc -d change service-lidarr within the container to kill lidarr, but that will need to be after every container startup.

I had a previous deemix instance so I used that config dir. Oh and I needed to set puig pgid and umask.

image

randerson-dev commented 9 months ago

Thanks! I'm with you so far. How did you get the viable lidarr instance to use this deemix though?

jeliastam commented 9 months ago

just like any other deemix, its available on the port you define. Are you talking about setting up the plugin in lidarr? You need to switch to the plugins branch of whatever container you are using, I believe for unraid hotio is the best choice, this is the repo im using (ghcr.io/hotio/lidarr:pr-plugins). I was able to just replace the repo in my existing config without issue but YMMV. They have instructions pinned on the servarr discord(not sure if this will work, https://discord.gg/RHyG9GwJ) for setting up the plugin.

codefaux commented 9 months ago

So, I'm gonna poke at this a bit because I randomly got inspired. No promises, but I do know more or less the general process here;

https://github.com/youegraillot/lidarr-on-steroids/blob/main/Dockerfile

This builds the entire setup.

RUN git clone --recurse-submodules https://gitlab.com/RemixDev/deemix-gui.git

It's using RemixDev/deemix-gui

# Patching deemix: see issue https://github.com/youegraillot/lidarr-on-steroids/issues/63
RUN sed -i 's/const channelData = await dz.gw.get_page(channelName)/let channelData; try { channelData = await dz.gw.get_page(channelName); } catch (error) { console.error(`Caught error ${error}`); return [];}/' ./server/src/routes/api/get/newReleases.ts

Seems like the patch you need. Anyway, I'm gonna try to see if I can tear this apart and put it back together with just deemix. If I succeed, I'll see about making it pullable, or at least sharing the results. Theoretically, looks pretty easy.

jeliastam commented 9 months ago

Godspeed! That would be great.

codefaux commented 9 months ago

@jeliastam Tell you what - let's trade knowledge. I (apparently) have Deemix extracted from this and running, but can't figure out how to make it talk to a mainline Lidarr. I'm using Unraid, but also deeply familiar with Docker from the CLI, or Compose, or whatever method you've got. If you can point me at a guide to connect Lidarr to this, I can test that it works and release my Docker container.

jeliastam commented 9 months ago

@codefaux I am on board! I see my discord link didn't actually work which explains the HOW TO part not being clear... apologies!

that should be it! Lemme know if you run into any issues and hopefully I can assist.

jeliastam commented 9 months ago

@randerson-dev sorry about the bad link! see above for instructions if you got stuck.

codefaux commented 9 months ago

@jeliastam SUCCESS!

MISSING STEPS AFTER INSTALLING PLUGIN:

https://hub.docker.com/r/codefaux/deemix-for-lidarr

https://github.com/codefaux/deemix-for-lidarr/

https://github.com/codefaux/deemix-for-lidarr/blob/main/docker-compose.yaml

I cannot express how much of this I'm honestly kinda guessing at. I don't know what I'm doing. The image might be bigger than it needs to be, there might be better ways to do this, etc. I'm open to suggestions, commentary, critique, etc.

EDIT: Use the codefaux/deemix-for-lidarr:test2 tag if there isn't a :latest tag, I don't know how all that works lol -- I'm pushing as I type so it'll take a few minutes probably. :test1 works but has extra junk.

jeliastam commented 9 months ago

Go to Lidarr, Profiles, Delay Profiles, click the wrench by Default (or your custom profile(s)) and enable Deemix

haha totally forgot that one and it was a pain to suss out! well done!

I cannot express how much of this I'm honestly kinda guessing at. I don't know what I'm doing. The image might be bigger than it needs to be, there might be better ways to do this, etc. I'm open to suggestions, commentary, critique, etc.

that summarizes most of what I do!

just about to spindown for the night, ill check it out tomorrow. Thanks for getting the inspiration!

codefaux commented 9 months ago

Seems it's working, but it runs as root and all downloaded files are root:root so permission errors come up with Lidarr trying to move the files.

I've tried --user uid:gid and environment variables. I added the s6 overlay and tried s6-setuidgid -- deemix-gui blows up with a permissions error on /config/logs and I can't seem to figure out how to fix it. If anyone has ideas, let me know, mean time I'll mess with it more.

s6 fixed it, I was just using the wrong path because I wasn't paying attention. It's Working for Me(TM)!

jeliastam commented 9 months ago

@codefaux oh right the lidarr-on-steroids container has ENV variables for PUID, PGID and UMASK which I needed to set so lidarr could manage the files... haha

jeliastam commented 9 months ago

@codefaux container is dying immediately for me with the following error:

chown: unknown group 
s6-applyuidgid: usage: s6-applyuidgid [ -z ] [ -u uid ] [ -g gid ] [ -G gidlist ] [ -U ] prog...

looks like you are setting PUID and PGID to 1000. Those should probably be exposed so they can be defined in the template since those are the appropriate values for my system (not that I am special, but they must differ across systems if it works for you!).

tried to post an issue on the actual repo but I think you need to enable Issues first somehow....

jeliastam commented 9 months ago

I tried setting PUID, PGID and UMASK via the template and the error changed, so maybe those ENVs are exposed...

new error:

chown: /deemix-gui/config: No such file or directory
node:internal/fs/utils:345
    throw err;
    ^

Error: EACCES: permission denied, mkdir '/deemix-gui/config/logs'
    at Object.mkdirSync (node:fs:1349:3)
    at Object.mkdirSync (pkg/prelude/bootstrap.js:1639:33)
    at Object._createLogDirIfNotExist (/snapshot/deemix-gui/server/dist/app.js)
    at new <anonymous> (/snapshot/deemix-gui/server/dist/app.js)
    at Object.58976 (/snapshot/deemix-gui/server/dist/app.js)
    at __webpack_require__ (/snapshot/deemix-gui/server/dist/app.js)
    at Object.83020 (/snapshot/deemix-gui/server/dist/app.js)
    at __webpack_require__ (/snapshot/deemix-gui/server/dist/app.js)
    at Object.97728 (/snapshot/deemix-gui/server/dist/app.js)
    at __webpack_require__ (/snapshot/deemix-gui/server/dist/app.js) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/deemix-gui/config/logs'
}
codefaux commented 9 months ago

Look to the docker-compose.yaml on my repo for usage. I suspect you're not providing /deemix-gui/config as a mount. I'm not 'awake' yet, that comes in a few hours, but I bet you have it working by then. If not, I'll be around. And I'll see why issues can't be raised on my repo lol Issues were disabled, not sure why, but it's fixed now

jeliastam commented 9 months ago

you were not wrong! had to make a few guesses and I have a doubly mapped path, but it seems like everything is working. I lost some deemix settings so im not sure where that happened, but it was trivial.

image

ad-on-is commented 9 months ago

May I chime into this conversation. Just decided to try out Lidarr and deemix, and stumbled upon this one :-D @codefaux, I think something's wrong with the latest tag, as I get the same error

chown: unknown group 
s6-applyuidgid: usage: s6-applyuidgid [ -z ] [ -u uid ] [ -g gid ] [ -G gidlist ] [ -U ] prog...

but it works on test2

Any hint whats wrong?

codefaux commented 9 months ago

@ad-on-is I just pushed :test3 and a new :latest (clarity: they're the same image) with some changes, give that a try and let me know how it goes.

@jeliastam My container doesn't use most of the things in that template. I can't speak to how overriding NODE_VERSION and YARN_VERSION (or any of the other changes) will behave. Please try using an empty template, based off my Docker Compose example instead of swapping my image in someone else's template.

I've also opened issues on my repo, so feel free to file there if anything doesn't work as expected. I'll look into how to publish an Unraid template for it -- but let's move discussions off this repo

ad-on-is commented 9 months ago

@codefaux Unfortunatelly, it now stops the container without any log output. Btw. I'm using it in a docker-compose with the docker-compose.yml from your repo.

codefaux commented 9 months ago

@ad-on-is Yeah I noticed right after I told you it was ready lol, I pulled a stupid. That's fixed now. Please communicate further on my repo if required.

jeliastam commented 9 months ago

I can't speak to how overriding NODE_VERSION and YARN_VERSION (or any of the other changes) will behave

yeah, I was throwing shit at the wall to see what stuck for the unmapped path issue I was having and hadn't cleaned anything up (like the path I mapped to two locations or those version envs). Those are the values pulled from the container, so they are the same. Mine is working after setting the PGID, PUID and UMASK envs and mapping /deemix-gui/config/ as you suggested.