[O] Better torrent caching

This commit is contained in:
2026-03-09 00:58:31 -04:00
parent 747c5f69c6
commit 51284967fb
4 changed files with 49 additions and 24 deletions
+2 -1
View File
@@ -3,7 +3,7 @@ import requests
import tomllib
from pathlib import Path
from utils import with_disk_cache
from utils import with_disk_cache, with_binary_disk_cache
config = tomllib.loads(Path("config.toml").read_text())
@@ -74,6 +74,7 @@ def mteam_imdb_info(id: str) -> dict:
return response.json()
@with_binary_disk_cache('generate_mteam_download_token', ext=".torrent")
def generate_mteam_download_token(torrent_id: str) -> bytes:
"""
Generate an M-Team download token for a specific torrent ID and download the torrent content.