From f501b8fcfdcb62d5966bec2c8a85838c2d82b728 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:56:16 +0200 Subject: [PATCH] yes --- comet/debrid/realdebrid.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/comet/debrid/realdebrid.py b/comet/debrid/realdebrid.py index a79b4da..96dab37 100644 --- a/comet/debrid/realdebrid.py +++ b/comet/debrid/realdebrid.py @@ -12,21 +12,21 @@ class RealDebrid: def __init__(self, session: aiohttp.ClientSession, debrid_api_key: str): session.headers["Authorization"] = f"Bearer {debrid_api_key}" self.session = session + self.api_url = "https://api.real-debrid.com/rest/1.0" async def check_premium(self): try: check_premium = await self.session.get(f"{self.api_url}/user") check_premium = await check_premium.text() - if '"type": "premium"' not in check_premium: - return False - - return True + if '"type": "premium"' in check_premium: + return True except Exception as e: logger.warning( f"Exception while checking premium status on Real Debrid: {e}" ) - return False + + return False async def get_instant(self, hash: str): try: