From 501b0dba028135e60caba995f16926dde21a793e Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 18 Jul 2023 07:35:08 +1000 Subject: [PATCH] add translation db for games that have a broken name in system.cnf Signed-off-by: Ronnie Sahlberg --- gamedb.py | 5 +++++ pop-fe.py | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gamedb.py b/gamedb.py index 7ac558d..5a82849 100644 --- a/gamedb.py +++ b/gamedb.py @@ -58620,6 +58620,11 @@ }, } +gameid_translation = { + 'SLPS0208': { + 'id': 'SLPS00208' + } +} libcrypt = { 'SCES00311': {'magic_word': 34730, 'url': 'http://redump.org/disc/592/'}, diff --git a/pop-fe.py b/pop-fe.py index 86d0980..ee6af21 100755 --- a/pop-fe.py +++ b/pop-fe.py @@ -55,7 +55,7 @@ from pathlib import Path from bchunk import bchunk from document import create_document -from gamedb import games, libcrypt, themes +from gamedb import games, libcrypt, themes, gameid_translation try: from make_isoedat import pack except: @@ -134,6 +134,9 @@ def get_gameid_from_iso(path='NORMAL01.iso'): buf = buf.replace(i, "") game_id = buf.upper() + # Special handling of games with broken id in system.cnf + if game_id in gameid_translation: + game_id = gameid_translation[game_id]['id'] return game_id @@ -1780,7 +1783,7 @@ def create_manual(source, gameid, subdir='./pop-fe-work/'): try: tmpfile = subdir + '/DOCUMENT-' + source.split('/')[-1] temp_files.append(tmpfile) - subprocess.run(['wget', source, '-O', tmpfile], timeout=120, check=True) + subprocess.run(['wget', source, '-O', tmpfile], timeout=240, check=True) print('Downloaded manual as', tmpfile) source = tmpfile except: