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:
parent
6c5d80cc3e
commit
1a0f0349c8
|
@ -18,7 +18,7 @@ def get_pres() -> List[Pre]:
|
||||||
logger.info("Getting pres from predbs")
|
logger.info("Getting pres from predbs")
|
||||||
|
|
||||||
# PreDBs in order of preference
|
# PreDBs in order of preference
|
||||||
predbs = (get_xrel, get_predbde, get_srrdb, get_predbovh)
|
predbs = (get_xrel, get_predbde, get_predbovh)
|
||||||
pres = {}
|
pres = {}
|
||||||
for get in reversed(predbs):
|
for get in reversed(predbs):
|
||||||
try:
|
try:
|
||||||
|
@ -100,18 +100,3 @@ def get_predbovh() -> List[Pre]:
|
||||||
)
|
)
|
||||||
for rls in r.json["data"]["rows"]
|
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"]
|
|
||||||
]
|
|
||||||
|
|
Reference in a new issue