From 699708043c376e86cf8c140011b145a9938ccda4 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 15 Oct 2021 11:05:13 +0200 Subject: [PATCH] extractors/collection/youtube: Assign better collection name for YT-channels --- server/entertainment_decider/extractors/collection/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/entertainment_decider/extractors/collection/youtube.py b/server/entertainment_decider/extractors/collection/youtube.py index 24a4611..3ffc7c7 100644 --- a/server/entertainment_decider/extractors/collection/youtube.py +++ b/server/entertainment_decider/extractors/collection/youtube.py @@ -83,10 +83,10 @@ class YouTubeCollectionExtractor(CollectionExtractor[Dict]): def _update_object_raw(self, object: MediaCollection, data: Dict): info = data["info"] - object.title = f"{info['title']} ({info['channel']['name']})" + is_channel = self.__is_channel_id(info["id"]) + object.title = f"Channel: {info['channel']['name']} (YouTube)" if is_channel else f"{info['title']} ({info['channel']['name']})" object.add_uris((info["link"],)) video_list = data["videos"] - is_channel = self.__is_channel_id(info["id"]) if object.watch_in_order_auto: object.watch_in_order = not is_channel len_video_list = len(video_list)