diff --git a/backend/config/management/commands/ta_startup.py b/backend/config/management/commands/ta_startup.py index 57b1691e..a39c5c7f 100644 --- a/backend/config/management/commands/ta_startup.py +++ b/backend/config/management/commands/ta_startup.py @@ -17,6 +17,7 @@ from common.src.env_settings import EnvironmentSettings from common.src.es_connect import ElasticWrap, IndexPaginate from common.src.helper import clear_dl_cache, get_channels from common.src.ta_redis import RedisArchivist +from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils import dateformat from django_celery_beat.models import CrontabSchedule, PeriodicTasks @@ -53,6 +54,10 @@ class Command(BaseCommand): self._update_schedule_tz() self._init_app_config() self._set_ta_startup_time() + + if self.skip_migrations: + return + self._mig_add_default_playlist_sort() self._mig_set_channel_tabs() self._mig_set_video_channel_tabs() @@ -62,6 +67,34 @@ class Command(BaseCommand): self._mig_fix_channel_description() self._mig_fix_video_description() + @property + def skip_migrations(self) -> bool: + """ + check if migrations should be skipped. + Experimental, might get replaced in the future. + """ + current_version = settings.TA_VERSION.rstrip("-unstable").upper() + env_var = f"TA_MIG_SKIP_{current_version}" + skipping = bool(os.environ.get(env_var)) + + self.stdout.write("[MIGRATION] check, experimental") + if skipping: + self.stdout.write( + self.style.SUCCESS( + f" {env_var} is set, skipping migration check" + ) + ) + else: + self.stdout.write( + self.style.SUCCESS( + " Running migrations. " + + "If migrations have run for this release, " + + f"you can set {env_var} to skip the check" + ) + ) + + return skipping + def _make_folders(self): """make expected cache folders""" self.stdout.write("[1] create expected cache folders") diff --git a/backend/requirements.txt b/backend/requirements.txt index 5bde3ac0..9a5f10dd 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -5,7 +5,7 @@ deepdiff==8.6.1 django-auth-ldap==5.3.0 django-celery-beat==2.8.1 django-cors-headers==4.9.0 -Django==5.2.10 +Django==5.2.11 djangorestframework==3.16.1 drf-spectacular==0.28.0 # rc:ignore Pillow==12.1.0 @@ -13,4 +13,4 @@ redis==7.1.0 requests==2.32.5 ryd-client==0.0.6 uvicorn==0.40.0 -yt-dlp[default]==2026.1.29 +yt-dlp[default]==2026.2.4 diff --git a/docker_assets/nginx.conf b/docker_assets/nginx.conf index ee2841ab..75014784 100644 --- a/docker_assets/nginx.conf +++ b/docker_assets/nginx.conf @@ -57,14 +57,13 @@ server { location = /index.html { add_header Cache-Control "no-store, no-cache, must-revalidate"; add_header Pragma "no-cache"; - add_header Expires 0; expires 0; } location / { add_header Cache-Control "no-store, no-cache, must-revalidate"; add_header Pragma "no-cache"; - add_header Expires 0; + expires 0; try_files $uri $uri/ /index.html =404; } } diff --git a/requirements-dev.txt b/requirements-dev.txt index b944b1d3..6f3351d8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -r backend/requirements.txt -ipython==9.9.0 +ipython==9.10.0 pre-commit==4.5.1 pylint-django==2.7.0 pylint==4.0.4