fix query playlist API

This commit is contained in:
Simon
2025-02-13 21:31:05 +07:00
parent 88132fef3c
commit ad7af09159

View File

@@ -23,7 +23,7 @@ class QueryBuilder:
must_list = []
channel = self.request_params.get("channel")
if channel:
must_list.append({"match": {"playlist_channel_id": channel[0]}})
must_list.append({"match": {"playlist_channel_id": channel}})
subscribed = self.request_params.get("subscribed")
if subscribed:
@@ -31,7 +31,7 @@ class QueryBuilder:
playlist_type = self.request_params.get("type")
if playlist_type:
type_list = self.parse_type(playlist_type[0])
type_list = self.parse_type(playlist_type)
must_list.append(type_list)
query = {"bool": {"must": must_list}}