kalibrado / trailer-finder

Trailer Finder is a tool that automatically searches and downloads movie trailers for your media collection. It integrates with media management tools like Radarr and Sonarr to keep your trailers up-to-date.
MIT License
15 stars 0 forks source link

Config file error. Cannot start container #40

Open ericlay opened 3 weeks ago

ericlay commented 3 weeks ago

I'm sure this is pebkac but, I cannot resolve. Any help would be appreciated. Basically I followed the docs to quickstart ala docker compose. However on start it complains about the config file. I have confirmed that it is mounting and have validated the yaml. So now I am at a loss.

Compose file:

services:
  trailer-finder:
    image: ldfe/trailer-finder:latest
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - /services/trailerfinder/config.yaml:/config/config.yaml
      - /mnt/storage/otherVids/trailers:/downloads
      - /mnt/movies:/movies
      - /mnt/tv:/tv

Config.yaml:

APP_USE_TITLE: "originalTitle"
APP_LOG_DATE_FORMAT: "%Y-%m-%d %H:%M:%S"
APP_LOG_PATH: "logs/trailer_finder.log"
APP_LOG_LEVEL: "INFO"
APP_LOG_MAX_SIZE: 10
APP_LOG_BACKUP_COUNT: 5
APP_ONLY_ONE_TRAILER: true
APP_SLEEP_TIME: 6
APP_FREE_SPACE_GB: 5
APP_TRANSLATE: en
APP_QUIET_MODE: false
APP_DEFAULT_DIR: "backdrops"
APP_CUSTOM_PATH: "/downloads"
APP_CUSTOM_NAME_SHOW: "TV Show Trailer"
APP_CUSTOM_NAME_MOVIE: "Movies Trailers"
SONARR_HOST: "http://192.168.8.<redacted>:8989"
SONARR_API: "<redacted>"
RADARR_HOST: "http://192.168.8.<redacted>:7878"
RADARR_API: "<redacted>"
TMDB_API_KEY: "<redacted>"
TMDB_TYPE_ITEM: "Trailer"
TMDB_OFFICIAL: true
TMDB_SIZE: 1080
TMDB_SOURCE: "YouTube"
TMDB_LANGUAGE_TRAILER: en-US
YT_DLP_BASE_URL: "https://www.youtube.com/watch?v="
YT_DLP_AUTH_USER: "<redacted>"
YT_DLP_AUTH_PASS: "<redacted>"
YT_DLP_NO_WARNINGS: true
YT_DLP_SKIP_INTROS: true
YT_DLP_MAX_LENGTH: 240
YT_DLP_SEARCH_KEYWORD: "official trailer"
YT_SEARCH_PREFIX:
  - ytsearch5
  - gvsearch5
YT_DLP_SEARCH_KEYWORD_SEASON: "{show} Season {season_number}"
YT_DLP_INTERVAL_RESQUESTS: 6
YT_DLP_FORMAT: "bestvideo+bestaudio"
YT_DLP_SPONSORS_BLOCK:
  - "sponsor"
  - "intro"
  - "outro"
  - "selfpromo"
  - "preview"
  - "filler"
  - "interaction"
FFMPEG_THREAD_COUNT: 4
FFMPEG_BUFFER_SIZE: "1M"
FFMPEG_FILE_TYPE: "mkv"
FFMPEG_COMMAND_TEMPLATE: "ffmpeg -i '{path}' -threads {thread} -c:v copy -c:a aac -af volume=-7dB -bufsize {buffer} -preset slow -y '{path_file}'"

Container error:

trailerfinder-trailer-finder-1  | The configuration file is not found or is poorly defined in config/config.yml
trailerfinder-trailer-finder-1  | For information on using this script, please refer to the documentation. => https://kalibrado.github.io/trailer-finder/ 
trailerfinder-trailer-finder-1 exited with code 1
trailerfinder-trailer-finder-1  | The configuration file is not found or is poorly defined in config/config.yml
trailerfinder-trailer-finder-1  | For information on using this script, please refer to the documentation. => https://kalibrado.github.io/trailer-finder/ 
trailerfinder-trailer-finder-1 exited with code 1
trailerfinder-trailer-finder-1 exited with code 0

If I'm fast enough I can inspect the restarting container and confirm the config file is mounted:

"HostConfig": {
        "Binds": [
            "/services/trailerfinder/config.yaml:/config/config.yaml:rw",
            "/mnt/storage/otherVids/trailers:/downloads:rw",
            "/mnt/movies:/movies:rw",
            "/mnt/tv:/tv:rw"
        ],

and here again:

    "Mounts": [
        {
            "Type": "bind",
            "Source": "/services/trailerfinder/config.yaml",
            "Destination": "/config/config.yaml",
            "Mode": "rw",
            "RW": true,
            "Propagation": "rprivate"
        },

I'm also not sure if it has any effect to my situation but the example config has a possible typo in a tag. "RESQUESTS" instead of "REQUESTS" on config docs. I have left it as is in my config as it doesn't seem to solve the issue either spelling...

# Set this for waiting time between yt_dlp requests (seconds)
YT_DLP_INTERVAL_RESQUESTS: 6
kalibrado commented 2 weeks ago

Hi,

Thank you so much for pointing out the typo in the documentation. I’ll get that fixed right away.

As for the issue you’re encountering, I understand how frustrating that can be. To help diagnose the problem, could you try running the program in DEBUG mode? You can enable this by setting APP_LOG_LEVEL: "DEBUG" in your config.yaml file. This should provide us with more detailed information on the error.

Please don’t hesitate to reach out if you need further assistance. Thanks again for your feedback, and I hope we can resolve this quickly!

ericlay commented 2 weeks ago

Ufortunately, the output doesn't appear to be much different under DEBUG.

 /services   cd trailerfinder 

 /services/trailerfinder   ls                                                                                                                                            
    config.yaml  docker-compose.yml  ex.config.yaml

 /services/trailerfinder  head -n 5 config.yaml                                                                                                                                    
APP_USE_TITLE: "originalTitle"
APP_LOG_DATE_FORMAT: "%Y-%m-%d %H:%M:%S"
APP_LOG_PATH: "logs/trailer_finder.log"
APP_LOG_LEVEL: "DEBUG"
APP_LOG_MAX_SIZE: 10

 /services/trailerfinder  dc up                                                                                                                                         
    [+] Running 1/1
Container trailerfinder-trailer-finder-1  Recreated                                                                                                                                                0.3s 
Attaching to trailer-finder-1
trailer-finder-1  | The configuration file is not found or is poorly defined in config/config.yml
trailer-finder-1  | For information on using this script, please refer to the documentation. => https://kalibrado.github.io/trailer-finder/ 
trailer-finder-1 exited with code 0

 /services/trailerfinder   dcdnro                                                                                                                                       
    [+] Running 1/0
 ✔ Container trailerfinder-trailer-finder-1  Removed                                                                                                                                           0.1s 

/services/trailerfinder  dcup                                                                                                                                         
    [+] Running 1/1
 ✔ Container trailerfinder-trailer-finder-1  Created                                                                                                                                           0.3s 
Attaching to trailer-finder-1
trailer-finder-1  | The configuration file is not found or is poorly defined in config/config.yml
trailer-finder-1  | For information on using this script, please refer to the documentation. => https://kalibrado.github.io/trailer-finder/ 
trailer-finder-1 exited with code 0