linuxserver / docker-jellyfin

GNU General Public License v3.0
607 stars 91 forks source link

[BUG] JELLYFIN_CACHE_DIR seems to be ignored #189

Closed skwde closed 1 year ago

skwde commented 1 year ago

Is there an existing issue for this?

Current Behavior

Setting JELLYFIN_CACHE_DIR does not write to cache to the configured directory.

Expected Behavior

Cache should go from config/cache to JELLYFIN_CACHE_DIR

Steps To Reproduce

Use the provided docker-compose file from https://docs.linuxserver.io/images/docker-jellyfin and add

- JELLYFIN_CACHE_DIR=/data/cache

to the environment section.

Moreover, add the volume

- /share/cache:/data/cache

Next run docker-compose up -d add some Library and have stuff downloaded. Then check /share/cache and see that its empty. Next check the config/cache and see that there is stuff.

Environment

- OS: `5.10.60-qnap`
- How docker service was installed: Container app
  + Docker version 20.10.17-qnap5, build 0474f29
  + docker-compose version 1.29.2, build 1ca12643

CPU architecture

x86-64

Docker creation

version: "2.1"
services:
  # ## https://docs.linuxserver.io/images/docker-jellyfin
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/London
      #- JELLYFIN_PublishedServerUrl=192.168.0.5 #optional
      # ## https://jellyfin.org/docs/general/administration/configuration/
      # ## https://github.com/jellyfin/jellyfin/issues/3717#issuecomment-665966147
      - JELLYFIN_CACHE_DIR=/data/cache
    volumes:
      - ./jellyfin:/config
      - /share/tvshows/data:/data/tvshows
      - /share/movies/data:/data/movies
      - /share/music/data:/data/music
      - /share/pictures/data:/data/music
      - /share/cache:/data/cache
    ports:
      - 8096:8096
      #- 8920:8920 #optional
      #- 7359:7359/udp #optional
      #- 1900:1900/udp #optional
    restart: always

run via

```sh
docker-compose -f docker-compose.jellyfin.yml up -d

### Container logs

```bash
The relevant log line:

[20:11:47] [INF] [1] Main: Environment Variables: ["[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_DATA_DIR, /config/data]"]
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

Roxedus commented 1 year ago

This is not a bug, this is intentionally overwritten when staring the service. The more supported approach is /share/cache:/config/cache

nodje commented 9 months ago

Hi, stumbling upon this while looking for why my set JELLYFIN_CACHE_DIR var is not taken into account.

Any specific reason why you chose to override it?

I'm being stuck trying to migrate from jellyfin own docker container to this one. I had the following conf:

      - /mnt/data/jellyfin-config:/config
      - /mnt/data/jellyfin-cache:/cache

without having to set any of the JELLYFIN_* vars