Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genre split and podcast download issue #473

Closed
mattiasghodsian opened this issue Feb 20, 2024 · 12 comments
Closed

Genre split and podcast download issue #473

mattiasghodsian opened this issue Feb 20, 2024 · 12 comments

Comments

@mattiasghodsian
Copy link

gonic version: 0.16.2
type: docker
image: sentriz/gonic:nightly

I currently have 2 problems with my gonic setup.

  1. I cant seem to get genre to split using comma, When adding GONIC_MULTI_VALUE_GENRE="delim ," i get a warning in the log that its not set
  2. podcasts cant be downloaded and stored in path.
gonic_1  | 2024/02/20 13:21:45 failed to download podcast: do download: create audio file: open /podcasts/DavidBombal/1749519044100234930668013b2.mp3: no such file or directory
gonic_1  | 2024/02/20 13:21:49 failed to download podcast: do download: create audio file: open /podcasts/DavidBombal/17630949441002b9fda5039d3ac.mp3: no such file or directory
gonic_1  | 2024/02/20 13:21:55 failed to download podcast: do download: create audio file: open /podcasts/DavidBombal/18217555441002b1804b5719f9b.mp3: no such file or directory
gonic_1  | 2024/02/20 13:21:59 failed to download podcast: do download: create audio file: open /podcasts/DavidBombal/182182394410023dc1df6b3c49.mp3: no such file or directory
gonic_1  | 2024/02/20 13:22:04 failed to download podcast: do download: create audio file: open /podcasts/DavidBombal/183981114410023c3fb629d92f3.mp3: no such file or directory

gonic directory files from host view

drwxr-xr-x  5 root  root   5 Feb 20 12:45 ./
drwxr-xr-x 12 user1 user1 12 Feb 20 12:45 ../
drwxr-xr-x  4 root  root   4 Feb 20 12:45 cache/
drwxr-xr-x  2 root  root   2 Feb 20 12:45 playlists/
drwxr-xr-x  2 root  root   2 Feb 20 12:45 podcasts/

start up log

gonic_1  | 2024/02/20 13:21:39 starting gonic v0.16.2
gonic_1  | 2024/02/20 13:21:39 provided config
gonic_1  | 2024/02/20 13:21:39     cache-path                /cache
gonic_1  | 2024/02/20 13:21:39     config-path               
gonic_1  | 2024/02/20 13:21:39     db-path                   /data/gonic.db
gonic_1  | 2024/02/20 13:21:39     exclude-pattern           
gonic_1  | 2024/02/20 13:21:39     expvar                    false
gonic_1  | 2024/02/20 13:21:39     genre-split               
gonic_1  | 2024/02/20 13:21:39     http-log                  true
gonic_1  | 2024/02/20 13:21:39     jukebox-enabled           false
gonic_1  | 2024/02/20 13:21:39     jukebox-mpv-extra-args    
gonic_1  | 2024/02/20 13:21:39     listen-addr               :80
gonic_1  | 2024/02/20 13:21:39     multi-value-album-artist  multi
gonic_1  | 2024/02/20 13:21:39     multi-value-artist        multi
gonic_1  | 2024/02/20 13:21:39     multi-value-genre         multi
gonic_1  | 2024/02/20 13:21:39     music-path                /music
gonic_1  | 2024/02/20 13:21:39     playlists-path            /playlists
gonic_1  | 2024/02/20 13:21:39     podcast-path              /podcasts
gonic_1  | 2024/02/20 13:21:39     podcast-purge-age         0
gonic_1  | 2024/02/20 13:21:39     pprof                     false
gonic_1  | 2024/02/20 13:21:39     proxy-prefix              /
gonic_1  | 2024/02/20 13:21:39     scan-at-start-enabled     false
gonic_1  | 2024/02/20 13:21:39     scan-interval             5
gonic_1  | 2024/02/20 13:21:39     scan-watcher-enabled      true
gonic_1  | 2024/02/20 13:21:39     tls-cert                  
gonic_1  | 2024/02/20 13:21:39     tls-key                   
gonic_1  | 2024/02/20 13:21:39     version                   false

docker-compose.yml

version: "2.4"
services:
  gonic:
    image: sentriz/gonic:nightly
    command: sh -c "while :; do sleep 3600; find /cache -type f -atime +90 -delete; done & gonic"
    ports:
      - 4533:80
    volumes:
      - ./data:/data 
      - /tattoine/media/music:/music:ro 
      - /tattoine/gonic/podcasts:/podcasts
      - /tattoine/gonic/playlists:/playlists 
      - /tattoine/gonic/cache:/cache
    environment:
      - TZ=Europe/Stockholm
      - GONIC_SCAN_INTERVAL=5
      - GONIC_GENRE_SPLIT=,
      - GONIC_SCAN_WATCHER_ENABLED=1
      - GONIC_MULTI_VALUE_ARTIST=multi
      - GONIC_MULTI_VALUE_ALBUM_ARTIST=multi
      #- GONIC_MULTI_VALUE_GENRE="delim ,"
    group_add:
      - audio
    devices:
      - /dev/snd:/dev/snd

    restart: unless-stopped
@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

I cant seem to get genre to split using comma, When adding GONIC_MULTI_VALUE_GENRE="delim ," i get a warning in the log that its not set

what is the error that you get?

@mattiasghodsian
Copy link
Author

mattiasghodsian commented Feb 20, 2024

I cant seem to get genre to split using comma, When adding GONIC_MULTI_VALUE_GENRE="delim ," i get a warning in the log that its not set

what is the error that you get?

- GONIC_MULTI_VALUE_GENRE="delim ,"

gonic_1  | 2024/02/20 14:17:00 error parsing args: error parsing env vars: error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": unknown multi value mode "\"delim". should be "none" | "multi" | "delim <delim>"; error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": unknown multi value mode "\"". should be "none" | "multi" | "delim <delim>"

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

can you try this in your docker compose instead

environment:
- "GONIC_MULTI_VALUE_GENRE=delim ,"

@mattiasghodsian
Copy link
Author

- "GONIC_MULTI_VALUE_GENRE=delim ,"

same issue

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

whats the error message this time?

maybe try just

environment:
- GONIC_MULTI_VALUE_GENRE=delim ,

@mattiasghodsian
Copy link
Author

whats the error message this time?

maybe try just

environment:
- GONIC_MULTI_VALUE_GENRE=delim ,

i did that previews with same result

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

with the same error message? are you sure you did a docker compose up?

@mattiasghodsian
Copy link
Author

- GONIC_MULTI_VALUE_GENRE=delim ,
user1@tattoine:~/docker/app/gonic$ docker-compose up
Starting gonic_gonic_1 ... done
Attaching to gonic_gonic_1
gonic_1  | 2024/02/20 15:19:21 error parsing args: error parsing env vars: error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": no delimiter provided for delimiter mode; error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": unknown multi value mode "". should be "none" | "multi" | "delim <delim>"
gonic_1  | 2024/02/20 15:19:22 error parsing args: error parsing env vars: error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": no delimiter provided for delimiter mode; error setting flag "multi-value-genre" from env var "GONIC_MULTI_VALUE_GENRE": unknown multi value mode "". should be "none" | "multi" | "delim <delim>"
gonic_gonic_1 exited with code 1

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

what is the output of docker inspect <gonic container name> | jq ".[].Config.Env"

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

ohh, i know what the issue is

@mattiasghodsian
Copy link
Author

docker inspect | jq ".[].Config.Env"

[
  "TZ=Europe/Stockholm",
  "GONIC_SCAN_INTERVAL=5",
  "GONIC_GENRE_SPLIT=,",
  "GONIC_SCAN_WATCHER_ENABLED=1",
  "GONIC_MULTI_VALUE_GENRE=delim ,",
  "GONIC_MULTI_VALUE_ARTIST=multi",
  "GONIC_MULTI_VALUE_ALBUM_ARTIST=multi",
  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  "GONIC_DB_PATH=/data/gonic.db",
  "GONIC_LISTEN_ADDR=:80",
  "GONIC_MUSIC_PATH=/music",
  "GONIC_PODCAST_PATH=/podcasts",
  "GONIC_CACHE_PATH=/cache",
  "GONIC_PLAYLISTS_PATH=/playlists"
]

@sentriz
Copy link
Owner

sentriz commented Feb 20, 2024

hi, the issue is that the config parser gonic uses treats , as a multi item delimiter (for example multiple music dirs)

i've just updated it to a version that supprots escapting the delimiter with \

so you should be able to write

GONIC_MULTI_VALUE_GENRE=delim \,

as for the podcast issue, as fix was pushed

unfortunately the nightly builds are broken since #467 so you'll have to wait for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants