Skip to content

Commit

Permalink
feat: remove the sketchy one
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Nov 28, 2024
1 parent b93a973 commit d692201
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 214 deletions.
6 changes: 1 addition & 5 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def stream(
config["debridApiKey"] = settings.PROXY_DEBRID_STREAM_DEBRID_DEFAULT_APIKEY

if config["debridApiKey"] == "":
services = ["realdebrid", "alldebrid", "premiumize", "torbox", "debridlink", "easydebrid"]
services = ["realdebrid", "alldebrid", "premiumize", "torbox", "debridlink"]
debrid_emoji = "⬇️"
else:
services = [config["debridService"]]
Expand Down Expand Up @@ -462,10 +462,6 @@ async def stream(
torrent_size = torrents_by_hash[hash]["Size"]
sorted_ranked_files[hash]["data"]["size"] = (
files[hash]["size"]
if config["debridService"] != "easydebrid"
else torrent_size
if torrent_size
else 0
)
sorted_ranked_files[hash]["data"]["torrent_size"] = (
torrent_size if torrent_size else files[hash]["size"]
Expand Down
184 changes: 0 additions & 184 deletions comet/debrid/easydebrid.py

This file was deleted.

5 changes: 1 addition & 4 deletions comet/debrid/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .premiumize import Premiumize
from .torbox import TorBox
from .debridlink import DebridLink
from .easydebrid import EasyDebrid


def getDebrid(session: aiohttp.ClientSession, config: dict, ip: str):
Expand All @@ -20,6 +19,4 @@ def getDebrid(session: aiohttp.ClientSession, config: dict, ip: str):
elif debrid_service == "torbox":
return TorBox(session, debrid_api_key)
elif debrid_service == "debridlink":
return DebridLink(session, debrid_api_key)
elif debrid_service == "easydebrid":
return EasyDebrid(session, debrid_api_key, ip)
return DebridLink(session, debrid_api_key)
19 changes: 0 additions & 19 deletions comet/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@
<div class="form-item">
<sl-select id="debridService" value="torbox" label="Debrid Service" placeholder="Select debrid service">
<sl-option value="torbox">TorBox</sl-option>
<sl-option value="easydebrid">EasyDebrid</sl-option>
<sl-option value="debridlink">Debrid-Link</sl-option>
<sl-option value="alldebrid">All-Debrid</sl-option>
<sl-option value="premiumize">Premiumize</sl-option>
Expand All @@ -554,8 +553,6 @@
<label for="debridService">
Debrid API Key -
<a id="apiKeyLink" href="https://torbox.app/settings" target="_blank">Get It Here</a>
<a id="support"></a>
<a id="warning" href="https://rentry.co/easydebrid" target="_blank"></a>
</label>
<sl-input id="debridApiKey" placeholder="Enter API key" help-text="If no key is specified, you'll get direct torrents!"></sl-input>
</div>
Expand All @@ -573,33 +570,17 @@
document.getElementById("debridService").addEventListener("sl-change", function(event) {
const selectedService = event.target.value;
const apiKeyLink = document.getElementById("apiKeyLink");
support = document.getElementById("support");
warning = document.getElementById("warning");

if (selectedService === "realdebrid") {
apiKeyLink.href = "https://real-debrid.com/apitoken";
support.textContent = "";
warning.textContent = "";
} else if (selectedService === "alldebrid") {
apiKeyLink.href = "https://alldebrid.com/apikeys";
support.textContent = "";
warning.textContent = "";
} else if (selectedService === "premiumize") {
apiKeyLink.href = "https://premiumize.me/account";
support.textContent = "";
warning.textContent = "";
} else if (selectedService === "torbox") {
apiKeyLink.href = "https://torbox.app/settings";
support.textContent = "";
warning.textContent = "";
} else if (selectedService === "debridlink") {
apiKeyLink.href = "https://debrid-link.com/webapp/apikey";
support.textContent = "";
warning.textContent = "";
} else if (selectedService === "easydebrid") {
apiKeyLink.href = "https://paradise-cloud.com/products/easydebrid";
support.textContent = " - Support me by using promo code 'goldy'! (5% OFF) - ";
warning.textContent = "warning";
}
});
</script>
Expand Down
1 change: 0 additions & 1 deletion comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def get_debrid_extension(debridService: str, debridApiKey: str = None):
"premiumize": "PM",
"torbox": "TB",
"debridlink": "DL",
"easydebrid": "ED",
}

return debrid_extensions.get(debridService, None)
Expand Down
2 changes: 1 addition & 1 deletion comet/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def check_max_size(cls, v):

@field_validator("debridService")
def check_debrid_service(cls, v):
if v not in ["realdebrid", "alldebrid", "premiumize", "torbox", "debridlink", "easydebrid"]:
if v not in ["realdebrid", "alldebrid", "premiumize", "torbox", "debridlink"]:
raise ValueError("Invalid debridService")
return v

Expand Down

0 comments on commit d692201

Please sign in to comment.