nandyalu / trailarr

Trailarr is a Docker application to download and manage trailers for your media library. It integrates with your existing services, such as Plex, Radarr, and Sonarr!
GNU General Public License v3.0
94 stars 7 forks source link

[Bug] Trailer Video Format not persisting across container instances #40

Open Andrewpaps opened 7 hours ago

Andrewpaps commented 7 hours ago

Describe the bug When selecting Trailer Video format other than default (h264) to something else (eg. av1), settings do not seem to persist across container restarts.

Not sure if I need to specify the GPU as a variable in the container perhaps.

May also occur with other settings, not sure.

Steps To Reproduce Steps to reproduce the behavior:

  1. Go to Settings
  2. Change Trailer Video Format from h264
  3. Restart container

Actual behavior Setting reverts to default.

Expected behavior Settings are saved between container instances.

nandyalu commented 6 hours ago

Trailarr saves it's app data including settings and database in /data by default which can be changed by modifying APP_DATA_DIR env variable, and map that folder to a local folder for persisting the data.

I know you had issues with your config from issue #38. Can you open /mnt/cache/appdata/trailarr in your system and check if there is a .env file in there and post the contents of that file?

Andrewpaps commented 4 hours ago

Sure. There is a .env file.

The contents before restart are:

API_KEY='c21d21be5091648d1cd6e9e9dd15824b' DEBUG='False' TESTING='False' DATABASE_URL='sqlite:////config/trailarr.db' MONITOR_ENABLED='True' MONITOR_INTERVAL='60' WAIT_FOR_MEDIA='True' TRAILER_FOLDER_MOVIE='True' TRAILER_FOLDER_SERIES='True' TRAILER_RESOLUTION='2160' TRAILER_AUDIO_FORMAT='aac' TRAILER_VIDEO_FORMAT='av1' TRAILER_SUBTITLES_ENABLED='True' TRAILER_SUBTITLES_LANGUAGE='en' TRAILER_FILE_FORMAT='mkv' TRAILER_EMBED_METADATA='True' TRAILER_REMOVE_SPONSORBLOCKS='True' TRAILER_WEB_OPTIMIZED='True'

And after:

API_KEY='c21d21be5091648d1cd6e9e9dd15824b' DEBUG='False' TESTING='False' DATABASE_URL='sqlite:////config/trailarr.db' MONITOR_ENABLED='True' MONITOR_INTERVAL='60' WAIT_FOR_MEDIA='True' TRAILER_FOLDER_MOVIE='True' TRAILER_FOLDER_SERIES='True' TRAILER_RESOLUTION='2160' TRAILER_AUDIO_FORMAT='aac' TRAILER_VIDEO_FORMAT='srt' TRAILER_SUBTITLES_ENABLED='True' TRAILER_SUBTITLES_LANGUAGE='en' TRAILER_FILE_FORMAT='mkv' TRAILER_EMBED_METADATA='True' TRAILER_REMOVE_SPONSORBLOCKS='True' TRAILER_WEB_OPTIMIZED='True'

Some of these settings are persisting no problem. Just "TRAILER_VIDEO_FORMAT" looks to be getting removed.

nandyalu commented 3 hours ago

There is a bug in code that is saving trailer_subtitle_format to TRAILER_VIDEO_FORMAT. Will fix this, to make it work for now, just update the Trailer Video Format option and it should override it.