mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +00:00
fix channel info for playlistid view to use actual owner
This commit is contained in:
parent
295ea0cde0
commit
64c9269ee2
@ -613,24 +613,21 @@ class PlaylistIdView(View):
|
|||||||
for i in playlist_info["playlist_entries"]
|
for i in playlist_info["playlist_entries"]
|
||||||
}
|
}
|
||||||
playlist_name = playlist_info["playlist_name"]
|
playlist_name = playlist_info["playlist_name"]
|
||||||
url = view_config["es_url"] + "/ta_video/_search"
|
|
||||||
data = self.build_data(
|
data = self.build_data(
|
||||||
pagination_handler, playlist_id_detail, view_config, sort
|
pagination_handler, playlist_id_detail, view_config, sort
|
||||||
)
|
)
|
||||||
|
search = SearchHandler(
|
||||||
search = SearchHandler(url, data)
|
view_config["es_url"] + "/ta_video/_search", data
|
||||||
|
)
|
||||||
videos_hits = search.get_data()
|
videos_hits = search.get_data()
|
||||||
max_hits = search.max_hits
|
channel_info = self.get_channel_info(
|
||||||
|
playlist_info["playlist_channel_id"], view_config["es_url"]
|
||||||
|
)
|
||||||
|
|
||||||
if max_hits:
|
if search.max_hits:
|
||||||
source = videos_hits[0]["source"]
|
pagination_handler.validate(search.max_hits)
|
||||||
channel_info = source["channel"]
|
|
||||||
pagination_handler.validate(max_hits)
|
|
||||||
pagination = pagination_handler.pagination
|
pagination = pagination_handler.pagination
|
||||||
else:
|
else:
|
||||||
channel_info = self.get_channel_info(
|
|
||||||
playlist_info["playlist_channel_id"], view_config["es_url"]
|
|
||||||
)
|
|
||||||
videos_hits = False
|
videos_hits = False
|
||||||
pagination = False
|
pagination = False
|
||||||
|
|
||||||
@ -639,7 +636,7 @@ class PlaylistIdView(View):
|
|||||||
"playlist_name": playlist_name,
|
"playlist_name": playlist_name,
|
||||||
"channel_info": channel_info,
|
"channel_info": channel_info,
|
||||||
"videos": videos_hits,
|
"videos": videos_hits,
|
||||||
"max_hits": max_hits,
|
"max_hits": search.max_hits,
|
||||||
"pagination": pagination,
|
"pagination": pagination,
|
||||||
"title": "Playlist: " + playlist_name,
|
"title": "Playlist: " + playlist_name,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user