diff --git a/resources/lib/api.py b/resources/lib/api.py index 485d5c3..5730e8d 100644 --- a/resources/lib/api.py +++ b/resources/lib/api.py @@ -123,7 +123,7 @@ def search(self, term: str)-> list: }) # Return only allowed items (tvshows, movies...) - return filter(lambda item: 'type' in item, res['data']) + return [item for item in res['data'] if 'type' in item] def purchased(self)-> list: res = self.makeRequest(endpoint='/user/purchased/medias') diff --git a/resources/lib/player/Handler.py b/resources/lib/player/Handler.py index eb86b10..0cec7d5 100644 --- a/resources/lib/player/Handler.py +++ b/resources/lib/player/Handler.py @@ -32,7 +32,7 @@ def versionPicker(self)-> dict: """ versions_api = self.item['versions']['data'] # Exclude offline versions - versions_filtered = list(filter(lambda version: not version['offline'], versions_api)) + versions_filtered = [version for version in versions_api if not version['offline']] versions_show = [] for version_temp in versions_filtered: label = '{0} - {1}'.format(version_temp['name'], version_temp['rightType']['name'])