-
- # determine if we found something
- if 'search' in search_results_raw['value']:
- for key in search_results_raw['value']['search'].keys():
- if self.netflix_session._is_size_key(key=key) == False:
- has_search_results = search_results_raw['value']['search'][key]['titles']['length'] > 0
- if has_search_results == False:
- for entry in search_results_raw['value']['search'][key]['suggestions']:
- if self.netflix_session._is_size_key(key=entry) == False:
- if search_results_raw['value']['search'][key]['suggestions'][entry]['relatedvideos']['length'] > 0:
- has_search_results = True
-
-
- # display that we haven't found a thing
- if has_search_results == False:
- return self.kodi_helper.build_no_search_results_available(build_url=self.build_url, action='search')
-
- # list the search results
- search_results = self.netflix_session.parse_search_results(response_data=search_results_raw)
- # add more menaingful data to the search results
- raw_search_contents = self.netflix_session.fetch_video_list_information(video_ids=search_results.keys())
- # check for any errors
- if self._is_dirty_response(response=raw_search_contents):
- return False
- search_contents = self.netflix_session.parse_video_list(response_data=raw_search_contents)