undo unneeded playlist matching

This commit is contained in:
Simon 2024-03-10 16:53:16 +01:00
parent 8b332566d4
commit 62489905f8
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 5 additions and 8 deletions

View File

@ -761,16 +761,13 @@ class PlaylistIdView(ArchivistResultsView):
+ "{return params.scores[doc['youtube_id'].value];} "
+ "return 100000;"
)
if playlist_info["playlist_type"] == "custom":
video_ids = [
i["youtube_id"] for i in playlist_info["playlist_entries"]
]
must_clause = {"ids": {"values": video_ids}}
else:
must_clause = {"match": {"playlist.keyword": playlist_id}}
self.data.update(
{
"query": {"bool": {"must": [must_clause]}},
"query": {
"bool": {
"must": [{"match": {"playlist.keyword": playlist_id}}]
}
},
"sort": [
{
"_script": {