diff --git a/docker_assets/run.sh b/docker_assets/run.sh index b03c520..e4bdf1f 100644 --- a/docker_assets/run.sh +++ b/docker_assets/run.sh @@ -25,6 +25,11 @@ if [[ -n "$TA_UWSGI_PORT" ]]; then sed -i "s/8080/$TA_UWSGI_PORT/g" /app/uwsgi.ini fi +# disable auth on static files for cast support +if [[ -n "$ENABLE_CAST" ]]; then + sed -i "/auth_request/d" /etc/nginx/sites-available/default +fi + # wait for elasticsearch counter=0 until curl -u "$ELASTIC_USER":"$ELASTIC_PASSWORD" "$ES_URL" -fs; do diff --git a/tubearchivist/home/src/frontend/forms.py b/tubearchivist/home/src/frontend/forms.py index 79cecbe..ba37626 100644 --- a/tubearchivist/home/src/frontend/forms.py +++ b/tubearchivist/home/src/frontend/forms.py @@ -68,12 +68,6 @@ class ApplicationSettingsForm(forms.Form): ("1", "enable sponsorblock integration"), ] - CAST_CHOICES = [ - ("", "-- change Cast integration --"), - ("0", "disable Cast"), - ("1", "enable Cast"), - ] - SNAPSHOT_CHOICES = [ ("", "-- change snapshot settings --"), ("0", "disable system snapshots"), @@ -139,9 +133,6 @@ class ApplicationSettingsForm(forms.Form): downloads_integrate_sponsorblock = forms.ChoiceField( widget=forms.Select, choices=SP_CHOICES, required=False ) - application_enable_cast = forms.ChoiceField( - widget=forms.Select, choices=CAST_CHOICES, required=False - ) application_enable_snapshot = forms.ChoiceField( widget=forms.Select, choices=SNAPSHOT_CHOICES, required=False ) diff --git a/tubearchivist/home/src/ta/config.py b/tubearchivist/home/src/ta/config.py index f25c9e6..e6d4eb3 100644 --- a/tubearchivist/home/src/ta/config.py +++ b/tubearchivist/home/src/ta/config.py @@ -47,18 +47,6 @@ class AppConfig: @staticmethod def get_config_env(): """read environment application variables""" - host_uid_env = os.environ.get("HOST_UID") - if host_uid_env: - host_uid = int(host_uid_env) - else: - host_uid = False - - host_gid_env = os.environ.get("HOST_GID") - if host_gid_env: - host_gid = int(host_gid_env) - else: - host_gid = False - es_pass = os.environ.get("ELASTIC_PASSWORD") es_user = os.environ.get("ELASTIC_USER", default="elastic") @@ -66,8 +54,9 @@ class AppConfig: "REDIS_HOST": os.environ.get("REDIS_HOST"), "es_url": os.environ.get("ES_URL"), "es_auth": (es_user, es_pass), - "HOST_UID": host_uid, - "HOST_GID": host_gid, + "HOST_UID": int(os.environ.get("HOST_UID", False)), + "HOST_GID": int(os.environ.get("HOST_GID", False)), + "enable_cast": bool(os.environ.get("ENABLE_CAST")), } return application diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index 4a12ab6..95e2d6c 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -165,11 +165,6 @@ Before activating that, make sure you have a scraping sleep interval of at least 3 secs set to avoid ratelimiting issues.
{{ app_form.downloads_integrate_sponsorblock }} -
-

Current Cast integration: {{ config.application.enable_cast }}

- Enabling Cast will load an additional JS library from Google. HTTPS and a supported browser are required for this integration.
- {{ app_form.application_enable_cast }} -

Snapshots