From 583ebffc5857883038f2c393497935a5e31f77ae Mon Sep 17 00:00:00 2001 From: tcely Date: Sat, 23 Nov 2024 08:11:23 -0500 Subject: [PATCH 1/2] Spelled firewall correctly Anyone using this to turn off the healthcheck firewall needs to update the variable that they are using. Maybe announce this in the UI if the setting is not true? --- tubesync/tubesync/local_settings.py.container | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index 876d57bc..18b028b3 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -65,7 +65,7 @@ YOUTUBE_DL_TEMPDIR = DOWNLOAD_ROOT / 'cache' COOKIES_FILE = CONFIG_BASE_DIR / 'cookies.txt' -HEALTHCHECK_FIREWALL_STR = str(os.getenv('TUBESYNC_HEALTHCHECK_FIREWAL', 'True')).strip().lower() +HEALTHCHECK_FIREWALL_STR = str(os.getenv('TUBESYNC_HEALTHCHECK_FIREWALL', 'True')).strip().lower() HEALTHCHECK_FIREWALL = True if HEALTHCHECK_FIREWALL_STR == 'true' else False HEALTHCHECK_ALLOWED_IPS_STR = str(os.getenv('TUBESYNC_HEALTHCHECK_ALLOWED_IPS', '127.0.0.1')) HEALTHCHECK_ALLOWED_IPS = HEALTHCHECK_ALLOWED_IPS_STR.split(',') From 37856a75753705dca40c933c5ef7bcffdd7cae3e Mon Sep 17 00:00:00 2001 From: danielmawhirter Date: Thu, 21 Nov 2024 18:33:47 -0600 Subject: [PATCH 2/2] Configure minimum permitted video height with VIDEO_HEIGHT_CUTOFF env var --- README.md | 3 ++- tubesync/tubesync/settings.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f0d259b..b85b2b4a 100644 --- a/README.md +++ b/README.md @@ -368,13 +368,14 @@ useful if you are manually installing TubeSync in some other environment. These | TUBESYNC_DEBUG | Enable debugging | True | | TUBESYNC_WORKERS | Number of background workers, default is 2, max allowed is 8 | 2 | | TUBESYNC_HOSTS | Django's ALLOWED_HOSTS, defaults to `*` | tubesync.example.com,otherhost.com | -| TUBESYNC_RESET_DOWNLOAD_DIR | Toggle resetting `/downloads` permissions, defaults to True | True +| TUBESYNC_RESET_DOWNLOAD_DIR | Toggle resetting `/downloads` permissions, defaults to True | True | | GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 | | LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 | | LISTEN_PORT | Port number for gunicorn to listen on | 8080 | | HTTP_USER | Sets the username for HTTP basic authentication | some-username | | HTTP_PASS | Sets the password for HTTP basic authentication | some-secure-password | | DATABASE_CONNECTION | Optional external database connection details | mysql://user:pass@host:port/database | +| VIDEO_HEIGHT_CUTOFF | Smallest video height in pixels permitted to download | 240 | # Manual, non-containerised, installation diff --git a/tubesync/tubesync/settings.py b/tubesync/tubesync/settings.py index bbb93422..d67d577a 100644 --- a/tubesync/tubesync/settings.py +++ b/tubesync/tubesync/settings.py @@ -150,8 +150,8 @@ MEDIA_THUMBNAIL_WIDTH = 430 # Width in pixels to resize thumbnai MEDIA_THUMBNAIL_HEIGHT = 240 # Height in pixels to resize thumbnails to -VIDEO_HEIGHT_CUTOFF = 240 # Smallest resolution in pixels permitted to download -VIDEO_HEIGHT_IS_HD = 500 # Height in pixels to count as 'HD' +VIDEO_HEIGHT_CUTOFF = int(os.getenv("VIDEO_HEIGHT_CUTOFF", "240")) # Smallest resolution in pixels permitted to download +VIDEO_HEIGHT_IS_HD = 500 # Height in pixels to count as 'HD' YOUTUBE_DL_CACHEDIR = None