From 3e8e8ccb319f09bf2b12e1ccea5b350885cb0220 Mon Sep 17 00:00:00 2001 From: anxdpanic Date: Sun, 2 Apr 2023 12:28:07 -0400 Subject: [PATCH 1/2] remove toggle follow --- addon.xml | 4 +--- resources/lib/twitch_addon/addon/converter.py | 17 ----------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/addon.xml b/addon.xml index eeca259b..8c07fe40 100644 --- a/addon.xml +++ b/addon.xml @@ -15,9 +15,7 @@ resources/media/fanart.jpg -[rem] removed support for versions of Kodi pre-Nexus v20 -[rem] removed support for python 2 -[rem] removed dependency on six +[rem] toggle follow [lang] updated translations from Weblate all diff --git a/resources/lib/twitch_addon/addon/converter.py b/resources/lib/twitch_addon/addon/converter.py index e88dff0b..d7183e94 100644 --- a/resources/lib/twitch_addon/addon/converter.py +++ b/resources/lib/twitch_addon/addon/converter.py @@ -55,9 +55,6 @@ def game_to_listitem(self, game): image = self.get_boxart(game.get(Keys.BOX_ART_URL), Images.BOXART) context_menu = list() context_menu.extend(menu_items.refresh()) - if self.has_token: - context_menu.extend(menu_items.edit_follow_game(game[Keys.ID], name, follow=True)) - context_menu.extend(menu_items.edit_follow_game(game[Keys.ID], name, follow=False)) plot = '{name}'.format(name=name) return {'label': name, 'path': kodi.get_plugin_url({'mode': MODES.GAMELISTS, 'game_name': name, 'game_id': game[Keys.ID]}), @@ -75,8 +72,6 @@ def followed_game_to_listitem(self, game): image = self.get_boxart(game['boxArtURL'], Images.BOXART) context_menu = list() context_menu.extend(menu_items.refresh()) - if self.has_token: - context_menu.extend(menu_items.edit_follow_game(game['id'], name, follow=False)) plot = '{name}\r\n{viewers}:{viewer_count}' \ .format(name=name, viewers=i18n('viewers'), viewer_count=viewer_count) return {'label': name, @@ -91,8 +86,6 @@ def channel_to_listitem(self, channel): context_menu = list() context_menu.extend(menu_items.refresh()) name = channel.get(Keys.DISPLAY_NAME) if channel.get(Keys.DISPLAY_NAME) else channel.get(Keys.LOGIN) - if self.has_token: - context_menu.extend(menu_items.edit_follow(channel[Keys.ID], name)) return {'label': name, 'path': kodi.get_plugin_url({'mode': MODES.CHANNELVIDEOS, 'channel_id': channel[Keys.ID], 'channel_name': channel[Keys.LOGIN], 'display_name': name}), @@ -110,8 +103,6 @@ def clip_to_listitem(self, clip): context_menu = list() context_menu.extend(menu_items.refresh()) display_name = to_string(clip.get(Keys.BROADCASTER_NAME)) - if self.has_token: - context_menu.extend(menu_items.edit_follow(clip[Keys.BROADCASTER_ID], display_name)) context_menu.extend(menu_items.channel_videos(clip[Keys.BROADCASTER_ID], display_name, display_name)) context_menu.extend(menu_items.set_default_quality('clip', clip[Keys.BROADCASTER_ID], display_name, clip_id=clip[Keys.ID])) @@ -139,8 +130,6 @@ def video_list_to_listitem(self, video): context_menu.extend(menu_items.refresh()) display_name = to_string(video.get(Keys.USER_NAME) if video.get(Keys.USER_NAME) else video.get(Keys.USER_LOGIN)) channel_name = to_string(video[Keys.USER_LOGIN]) - if self.has_token: - context_menu.extend(menu_items.edit_follow(video[Keys.USER_ID], display_name)) context_menu.extend(menu_items.channel_videos(video[Keys.USER_ID], channel_name, display_name)) context_menu.extend(menu_items.set_default_quality('video', video[Keys.USER_ID], video[Keys.USER_LOGIN], video[Keys.USER_ID])) @@ -172,8 +161,6 @@ def search_stream_to_listitem(self, search): context_menu.extend(menu_items.refresh()) channel_name = to_string(search[Keys.DISPLAY_NAME]) game_name = to_string(search[Keys.GAME_NAME]) - if self.has_token: - context_menu.extend(menu_items.edit_follow(search[Keys.ID], display_name)) context_menu.extend(menu_items.channel_videos(search[Keys.ID], channel_name, display_name)) if search[Keys.GAME_NAME]: context_menu.extend(menu_items.go_to_game(game_name, search[Keys.GAME_ID])) @@ -203,8 +190,6 @@ def search_channel_to_listitem(self, search): context_menu = list() context_menu.extend(menu_items.refresh()) channel_name = to_string(search[Keys.DISPLAY_NAME]) - if self.has_token: - context_menu.extend(menu_items.edit_follow(search[Keys.ID], display_name)) context_menu.extend(menu_items.channel_videos(search[Keys.ID], channel_name, display_name)) return {'label': title, @@ -234,8 +219,6 @@ def stream_to_listitem(self, stream): display_name = to_string(stream.get(Keys.USER_NAME) if stream.get(Keys.USER_NAME) else stream.get(Keys.USER_LOGIN)) channel_name = to_string(stream[Keys.USER_NAME]) game_name = to_string(stream[Keys.GAME_NAME]) - if self.has_token: - context_menu.extend(menu_items.edit_follow(stream[Keys.USER_ID], display_name)) context_menu.extend(menu_items.channel_videos(stream[Keys.USER_ID], channel_name, display_name)) if stream[Keys.GAME_NAME]: context_menu.extend(menu_items.go_to_game(game_name, stream[Keys.GAME_ID])) From eada1147579156984b22f90a5e4ef49797c65840 Mon Sep 17 00:00:00 2001 From: anxdpanic Date: Sun, 2 Apr 2023 12:39:23 -0400 Subject: [PATCH 2/2] 3.0.1 --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 8c07fe40..e8a442b7 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - +