From bb82661d7e85aa45e07f8ac4e555a44a0c885ac3 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 11 Jan 2025 18:07:55 +0700 Subject: [PATCH] fix redundant playlist item remove --- backend/playlist/src/index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/playlist/src/index.py b/backend/playlist/src/index.py index fe990ae6..387c213c 100644 --- a/backend/playlist/src/index.py +++ b/backend/playlist/src/index.py @@ -147,6 +147,9 @@ class YoutubePlaylist(YouTubeItem): "query": {"match": {"playlist": self.youtube_id}}, "_source": ["youtube_id"], } + data = { + "query": {"term": {"playlist.keyword": {"value": self.youtube_id}}} + } result = IndexPaginate("ta_video", data).get_results() to_remove = [ i["youtube_id"] for i in result if i["youtube_id"] not in needed