lardbit / nefarious

Web application for automatically downloading TV & Movies (w/ VPN)

Home Page:https://lardbit.github.io/nefarious/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Ability to change host download file from settings

ouattararomuald opened this issue · comments

I wanted to change the "host download path" setting, but I had to recreate the image or restart after modifying the .env file. It should be possible to select the download folder from the settings.

I've thought a lot about this and couldn't come up with a clean solution, mainly due to how the docker environment works. When the user initially creates all the services via docker-compose, transmission + celery + nefarious all need to know the download path. If the user changes that setting in the nefarious UI, it would need to communicate to the other services as well. This may be possible for transmission via it's API set_session , set_session(download_dir='/path/to/somewhere'). It would be easy to communicate it to celery since it's using the same db (sqlite) as nefarious.

What I don't like about that solution is that once the user changed the download path, it would be out of sync with what they have in the .env file and that would be confusing.

I'm open to completely changing how it all works if we can come up with a clean solution.

What I don't like about that solution is that once the user changed the download path, it would be out of sync with what they have in the .env file and that would be confusing.

On my side I see the .env as the initial startup config. Not as something that should stay up-to-date with actual config. But I understand and I'll continue to think about it.

It just occurred to me that if you change the HOST_DOWNLOAD_PATH from /media/drive1 to /media/drive2, then you'd have to restart all the services anyway to tell it to mount that updated path to /media/drive2 since it currently will only see the previous mount /dev/drive1.

Here's the volume/mount logic in docker-compose.base.yml for transmission (same for nefarious & celery):

volumes:
      - ${HOST_DOWNLOAD_PATH:-/tmp}:/downloads

I like where you're going with this but I am at a loss of how to handle this with docker and pre-defined mount points.

then you'd have to restart all the services anyway

Yes, I can confirm that!

Quick question, most of your users clone the project and launch it themselves or do you have an install setup that does everything automatically? Also, who is the target audience (people with technical knowledge or even amateurs)?

The current process is that new users must clone the repository, which has the docker related files in there, and then they just have to run the docker-compose up -d command (after setting up the .env file). Technically, users only need those docker files and not the entire repo source code.

I wanted the target audience to be the general public, but as it stands it's definitely more for power users who are comfortable on the linux command line.

Docker offers a lot of convenience but it has some drawbacks. I've tried to consider other alternatives but couldn't think of anything that solved all the pain points.