youegraillot / lidarr-on-steroids

Lidarr with some muscles thanks to deemix
333 stars 26 forks source link

Empty folders being removed from downloads #59

Closed SickProdigy closed 1 year ago

SickProdigy commented 1 year ago

Describe the bug Folder in /downloads/ that are empty are automatically removed. I think it is mainly due to deemix. Just wondering if anyone has a workaround.

To Reproduce Steps to reproduce the behavior:

  1. Run Lidarr-on-steroids
  2. Add empty folders inside of /downloads/ location
  3. Import music from deemix
  4. Wait for it to scan empty folders and delete all inside of downloads location mount.

Expected behavior [Error] clean-downloads.sh: Info|Lidarr event: AlbumDownload [Error] clean-downloads.sh: Info|Cleaning empty folders [Error] clean-downloads.sh: /downloads/nzbget/completed/Lidarr-music [Error] clean-downloads.sh: /downloads/deemix/50 Cent/50 Cent - Best Friend (Remix) [Error] clean-downloads.sh: /downloads/_torrent/watched [Error] clean-downloads.sh: find: cannot delete ‘/downloads/_torrent/watched’: Permission denied

Was hoping that folders outside of /downloads/deemix would stay and anything inside would do it's thing. I've changed the folder inside of deemix to this location. Additional information below.

System info (please complete the following information):

docker-compose.yml (please complete the following information):

version: "3"
services:
  lidarr:
    image: youegraillot/lidarr-on-steroids
    restart: unless-stopped
    ports:
      - "8686:8686" # Lidarr web UI
      - "6595:6595" # Deemix web UI
    volumes:
      - /home/user/Documents/docker-containers/lidarr-on-steroids:/config
      - /home/user/Documents/docker-containers/lidarr-on-steroids/deemix:/config_deemix
      - /srv/samba/media/unsorted:/downloads
      - /srv/samba/media/Music/Music-Library:/music
    networks:
      homelab:
        aliases:
          - lidarr
          - deemix
networks:
  homelab:
    name: homelab
    external: true

Additional context I've also tried mounting the deemix folder directly, but it has issues with my other download clients. Can't find their download location if I narrow it too far. Although I guess I wouldn't need them as long as deemix could find everything. Just kind of stuck with what I should do here. It keeps deleting empty folders inside of /downloads/nzbget/completed/ which causes errors with arr clients using nzbget at the moment. If deemix could just not clean all empty folders would be perfect.

gir42 commented 1 year ago

So I'm having the same issue and just ssh into the server and used sudo to touch an empty file inside each folder under the downloads/completed folder, music, tv, movies. Just a work around until a proper fix.

SickProdigy commented 1 year ago

So I'm having the same issue and just ssh into the server and used sudo to touch an empty file inside each folder under the downloads/completed folder, music, tv, movies. Just a work around until a proper fix.

Yeah I ended up just creating text files in every folder just in case they happen to clean out. Was hoping someone might have a mount solution I just wasn't thinking about right. But we make do until a proper fix comes along.

youegraillot commented 1 year ago

this is the expected behavior, I wrote a script that clean the downloads folder as it bothered me to have empty folders there I added an option to disable this with the environment variable CLEAN_DOWNLOADS=false