fix channel overwrite playlist refresh missing task

This commit is contained in:
Simon 2024-12-21 09:57:48 +07:00
parent 9e796019d2
commit 42f1679502
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -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)