From f08b44fdcde5403719848fbe80b94efa8417ab57 Mon Sep 17 00:00:00 2001 From: Sebastian Golasch Date: Thu, 9 Mar 2017 12:47:22 +0100 Subject: [PATCH] fix(my-list): Fixes that not all videos have been shown on the list --- resources/lib/KodiHelper.py | 31 +++++++++++++++---------------- resources/lib/NetflixSession.py | 3 +-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/resources/lib/KodiHelper.py b/resources/lib/KodiHelper.py index 4407b87..7519c99 100644 --- a/resources/lib/KodiHelper.py +++ b/resources/lib/KodiHelper.py @@ -430,22 +430,21 @@ class KodiHelper: """ for video_list_id in video_list: video = video_list[video_list_id] - if type != 'queue' or (type == 'queue' and video['in_my_list'] == True): - li = xbmcgui.ListItem(label=video['title']) - # add some art to the item - li = self._generate_art_info(entry=video, li=li) - # it´s a show, so we need a subfolder & route (for seasons) - isFolder = True - url = build_url({'action': actions[video['type']], 'show_id': video_list_id}) - # lists can be mixed with shows & movies, therefor we need to check if its a movie, so play it right away - if video_list[video_list_id]['type'] == 'movie': - # it´s a movie, so we need no subfolder & a route to play it - isFolder = False - url = build_url({'action': 'play_video', 'video_id': video_list_id}) - # add list item info - li = self._generate_entry_info(entry=video, li=li) - li = self._generate_context_menu_items(entry=video, li=li) - xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=li, isFolder=isFolder) + li = xbmcgui.ListItem(label=video['title']) + # add some art to the item + li = self._generate_art_info(entry=video, li=li) + # it´s a show, so we need a subfolder & route (for seasons) + isFolder = True + url = build_url({'action': actions[video['type']], 'show_id': video_list_id}) + # lists can be mixed with shows & movies, therefor we need to check if its a movie, so play it right away + if video_list[video_list_id]['type'] == 'movie': + # it´s a movie, so we need no subfolder & a route to play it + isFolder = False + url = build_url({'action': 'play_video', 'video_id': video_list_id}) + # add list item info + li = self._generate_entry_info(entry=video, li=li) + li = self._generate_context_menu_items(entry=video, li=li) + xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=li, isFolder=isFolder) xbmcplugin.addSortMethod(handle=self.plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_LABEL) xbmcplugin.addSortMethod(handle=self.plugin_handle, sortMethod=xbmcplugin.SORT_METHOD_TITLE) diff --git a/resources/lib/NetflixSession.py b/resources/lib/NetflixSession.py index df57382..3743ed2 100644 --- a/resources/lib/NetflixSession.py +++ b/resources/lib/NetflixSession.py @@ -1563,8 +1563,6 @@ class NetflixSession: }) params = { - 'withSize': True, - 'materialize': True, 'model': self.user_data['gpsModel'] } @@ -1919,6 +1917,7 @@ class NetflixSession: start = time() response = self.session.get(url=url, verify=self.verify_ssl, params=params) end = time() + print params self.log('[GET] Request for "' + url + '" took ' + str(end - start) + ' seconds') return response -- 2.30.2