Skip to content

Commit

Permalink
Merge pull request #20 from Pukabyte/patch-4
Browse files Browse the repository at this point in the history
Torbox fix
  • Loading branch information
westsurname authored Jul 15, 2024
2 parents 92da762 + e77f1c7 commit 40aec84
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions shared/debrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ def _getInstantAvailability(self, refresh=False):

instantAvailabilities = instantAvailabilityRequest.json()
self.print('instantAvailabilities:', instantAvailabilities)
self._instantAvailability = instantAvailabilities['data']['data'] if 'data' in instantAvailabilities and 'data' in instantAvailabilities['data'] and instantAvailabilities['data']['data'] is not False else None

# Check if 'data' exists and is not None or False
if instantAvailabilities and 'data' in instantAvailabilities and instantAvailabilities['data']:
self._instantAvailability = instantAvailabilities['data']
else:
self._instantAvailability = None

return self._instantAvailability

Expand Down Expand Up @@ -518,4 +523,4 @@ class TorboxTorrent(Torbox, Torrent):
pass

class TorboxMagnet(Torbox, Magnet):
pass
pass

0 comments on commit 40aec84

Please sign in to comment.