From 42f16795021ce1ce252b4628651e921e03c90103 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 21 Dec 2024 09:57:48 +0700 Subject: [PATCH] fix channel overwrite playlist refresh missing task --- backend/channel/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/channel/views.py b/backend/channel/views.py index c6fc2b70..ce514d8b 100644 --- a/backend/channel/views.py +++ b/backend/channel/views.py @@ -6,7 +6,7 @@ from common.src.urlparser import Parser from common.views_base import AdminWriteOnly, ApiBaseView from download.src.subscriptions import ChannelSubscription from rest_framework.response import Response -from task.tasks import subscribe_to +from task.tasks import index_channel_playlists, subscribe_to class ChannelApiListView(ApiBaseView): @@ -97,6 +97,9 @@ class ChannelApiView(ApiBaseView): try: json_data = channel_overwrites(channel_id, overwrites) + if overwrites.get("index_playlists"): + index_channel_playlists.delay(channel_id) + except ValueError as err: return Response({"error": str(err)}, status=400)