Skip to content

Commit

Permalink
Torbox fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pukabyte authored Jul 14, 2024
1 parent 5259785 commit e77f1c7
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 e77f1c7

Please sign in to comment.