1
0
Fork 0

Remove srrdb.com (again!)

A LOT of +10-year-old releases are returned by their API, but with a current date.
This commit is contained in:
Casper V. Kristensen 2022-06-26 14:51:55 +02:00
parent 6c5d80cc3e
commit 1a0f0349c8

View file

@ -18,7 +18,7 @@ def get_pres() -> List[Pre]:
logger.info("Getting pres from predbs")
# PreDBs in order of preference
predbs = (get_xrel, get_predbde, get_srrdb, get_predbovh)
predbs = (get_xrel, get_predbde, get_predbovh)
pres = {}
for get in reversed(predbs):
try:
@ -100,18 +100,3 @@ def get_predbovh() -> List[Pre]:
)
for rls in r.json["data"]["rows"]
]
def get_srrdb() -> List[Pre]:
logger.debug("Getting pres from srrdb.com")
r = cache.get("https://api.srrdb.com/v1/search/category:pc/order:date-desc")
return [
Pre(
dirname=rls["release"],
nfo_link="https://www.srrdb.com/release/details/{}".format(rls["release"]),
timestamp=datetime.fromisoformat(rls["date"]),
)
for rls in r.json["results"]
]