diff --git a/addon.xml b/addon.xml index ccb082774..d4a20c55c 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 021e6acf8..9bc326504 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,4 @@ -## v7.1.1.5 +## v7.1.1.6 ### Fixed - Fix http server not listening on any interface if listen IP is 0.0.0.0 #927 - Standardise return type of LoginClient.refresh_token #932 @@ -43,6 +43,7 @@ - Fix errors with progress dialogs in Kodi 18 #1000 - Fix remote watch history not updating #1008 - Fix API requests when not signed in #1013 +- Fix playback not working when no API key is provided #1018 ### Changed - Improve display and update of bookmarks diff --git a/resources/lib/youtube_plugin/youtube/client/youtube.py b/resources/lib/youtube_plugin/youtube/client/youtube.py index e16fa080b..20249be96 100644 --- a/resources/lib/youtube_plugin/youtube/client/youtube.py +++ b/resources/lib/youtube_plugin/youtube/client/youtube.py @@ -2225,6 +2225,8 @@ def api_request(self, abort = False params['key'] = key else: + if not client['_has_auth']: + abort = True del params['key'] client['params'] = params diff --git a/resources/lib/youtube_plugin/youtube/helper/resource_manager.py b/resources/lib/youtube_plugin/youtube/helper/resource_manager.py index 377e7d974..dd3b13033 100644 --- a/resources/lib/youtube_plugin/youtube/helper/resource_manager.py +++ b/resources/lib/youtube_plugin/youtube/helper/resource_manager.py @@ -341,7 +341,14 @@ def get_videos(self, notify=notify_and_raise, raise_exc=notify_and_raise) for list_of_50 in self._list_batch(to_update, n=50)] - if not any(new_data): + if any(new_data): + new_data = { + yt_item['id']: yt_item + for batch in new_data + for yt_item in batch.get('items', []) + if yt_item + } + else: new_data = None else: new_data = None @@ -353,12 +360,6 @@ def get_videos(self, '\n\tVideo IDs: {ids}' .format(ids=to_update) ) - new_data = { - yt_item['id']: yt_item - for batch in new_data - for yt_item in batch.get('items', []) - if yt_item - } new_data = dict(dict.fromkeys(to_update, {'_unavailable': True}), **new_data) result.update(new_data)