Skip to content

Commit

Permalink
fix: I fixed it I think guys
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jul 16, 2024
1 parent 63508d1 commit 86ea5d5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions comet/api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async def stream(request: Request, b64config: str, type: str, id: str):
index_less = 0
for hash in torrent_hashes:
if hash[1] is None:
del torrents[hash[0] - index_less] # fix?
del torrents[hash[0] - index_less]
index_less += 1
continue

Expand Down Expand Up @@ -260,7 +260,6 @@ async def stream(request: Request, b64config: str, type: str, id: str):
torrents_by_hash = {
torrent["InfoHash"]: torrent
for torrent in torrents
if hash in sorted_ranked_files
}
for hash in sorted_ranked_files: # needed for caching
sorted_ranked_files[hash]["data"]["title"] = files[hash]["title"]
Expand Down
2 changes: 1 addition & 1 deletion comet/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@
return {
indexers: indexers,
maxResults: parseInt(maxResults),
maxSize: parseFloat(maxSize) * 1073741824,
maxSize: parseFloat(maxSize * 1073741824),
resolutions: selectedResolutions,
languages: selectedLanguages,
debridService: debridService,
Expand Down
7 changes: 0 additions & 7 deletions comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,9 @@ async def get_indexer_manager(

for result in response:
result["InfoHash"] = result["infoHash"]
del result["infoHash"]

result["Title"] = result["title"]
del result["title"]

result["Link"] = result["downloadUrl"]
del result["downloadUrl"]

result["Tracker"] = result["indexer"]
del result["indexer"]

results.append(result)
except Exception as e:
Expand Down

0 comments on commit 86ea5d5

Please sign in to comment.