[DOCKER] Make default paths same as docker defaults (#1332)

Changes documentation and default configs to use the `/tv_shows` default path shown in the docker compose setup.
Also changes working directory and file lock directory to not be in /tmp, which often causes permission issues.
This commit is contained in:
Jesse Bannon 2025-09-05 22:50:47 -07:00 committed by GitHub
parent b9aefb4bea
commit a7cf361821
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 8 deletions

View file

@ -19,4 +19,4 @@ configuration:
# Avoid unnecessarily long large file renames, set this to a path on the same # Avoid unnecessarily long large file renames, set this to a path on the same
# filesystem as the destination for downloaded files in the `overrides: / # filesystem as the destination for downloaded files in the `overrides: /
# *_directory:` paths: # *_directory:` paths:
working_directory: "/media/Library/tmp/.ytdl-sub-working-directory" working_directory: ".ytdl-sub-working-directory"

View file

@ -6,13 +6,13 @@
__preset__: __preset__:
overrides: overrides:
# Root folder of all ytdl-sub TV Shows # Root folder of all ytdl-sub TV Shows
tv_show_directory: "/media/Library/Videos/Series" tv_show_directory: "/tv_shows"
# Root folder of all ytdl-sub Music # Root folder of all ytdl-sub Music
music_directory: "/media/Library/Music" music_directory: "/music"
# Root folder of all ytdl-sub Music Videos # Root folder of all ytdl-sub Music Videos
music_video_directory: "/media/Library/Videos/Music" music_video_directory: "/music_videos"
# For 'Only Recent' preset, only keep vids within this range and limit # For 'Only Recent' preset, only keep vids within this range and limit
# only_recent_date_range: "2months" # only_recent_date_range: "2months"

View file

@ -15,7 +15,7 @@ Below is a common configuration:
:linenos: :linenos:
configuration: configuration:
working_directory: "/media/Library/tmp/.ytdl-sub-working-directory" working_directory: ".ytdl-sub-working-directory"
presets: presets:
TV Show: TV Show:
@ -37,7 +37,7 @@ Below is a common configuration:
max: 36 max: 36
overrides: overrides:
tv_show_directory: "/media/Library/Videos/Series" tv_show_directory: "/tv_shows"
TV Show Only Recent: TV Show Only Recent:
preset: preset:
@ -59,7 +59,7 @@ filesystem as your library in the ``overrides: / *_directory:`` paths:
:lineno-start: 1 :lineno-start: 1
configuration: configuration:
working_directory: "/media/Library/tmp/.ytdl-sub-working-directory" working_directory: ".ytdl-sub-working-directory"
Preset Section Preset Section

View file

@ -22,7 +22,7 @@ if IS_WINDOWS:
MAX_FILE_NAME_BYTES = 255 MAX_FILE_NAME_BYTES = 255
else: else:
DEFAULT_LOCK_DIRECTORY = "/tmp" DEFAULT_LOCK_DIRECTORY = ".ytdl-sub-lock"
DEFAULT_FFMPEG_PATH = os.getenv( DEFAULT_FFMPEG_PATH = os.getenv(
"YTDL_SUB_FFMPEG_PATH", _existing_path("/usr/bin/ffmpeg", "/usr/local/bin/ffmpeg") "YTDL_SUB_FFMPEG_PATH", _existing_path("/usr/bin/ffmpeg", "/usr/local/bin/ffmpeg")
) )

View file

@ -45,6 +45,7 @@ else:
) )
try: try:
os.makedirs(os.path.dirname(lock_file_path), exist_ok=True)
lock_file = open(lock_file_path, "w", encoding="utf-8") lock_file = open(lock_file_path, "w", encoding="utf-8")
except FileNotFoundError as exc: except FileNotFoundError as exc:
# pylint: disable=line-too-long # pylint: disable=line-too-long