Update mtpinstaller.py
Fix a bug in checking game update
@@ -572,13 +572,15 @@ def get_installed_info(tfile=None,search_new=True,excludehb=True,exclude_xci=Fal
tid=str(row[id]).upper()
version=str(row[ver]).upper()
if tid.endswith('800'):
- baseid=tid[:-3]+'000'
- if baseid in versiondict.keys():
- v=versiondict[baseid]
+ keyid=tid[:-3]+'000'
+ else:
+ keyid=tid
+ if keyid in versiondict.keys():
+ v=versiondict[keyid]
if v<int(version):
- versiondict[baseid]=int(version)
+ versiondict[keyid]=int(version)
else:
- versiondict[tid]=int(version)
+ versiondict[keyid]=int(version)
except:pass
print("..........................................................")
print("NEW UPDATES")
@@ -740,13 +742,15 @@ def get_archived_info(search_new=True,excludehb=True,exclude_xci=False):
tid=str(row[id]).upper()
version=str(row[ver]).upper()
if tid.endswith('800'):
- baseid=tid[:-3]+'000'
- if baseid in versiondict.keys():
- v=versiondict[baseid]
+ keyid=tid[:-3]+'000'
+ else:
+ keyid=tid
+ if keyid in versiondict.keys():
+ v=versiondict[keyid]
if v<int(version):
- versiondict[baseid]=int(version)
+ versiondict[keyid]=int(version)
else:
- versiondict[tid]=int(version)
+ versiondict[keyid]=int(version)
except:pass
print("..........................................................")
print("NEW UPDATES")
@@ -767,6 +771,7 @@ def get_archived_info(search_new=True,excludehb=True,exclude_xci=False):
continue
if fileid.endswith('800'):
try:
+ baseid=fileid[:-3]+'000'
v=versiondict[baseid]
except:pass
else:
@@ -775,6 +780,7 @@ def get_archived_info(search_new=True,excludehb=True,exclude_xci=False):
except:pass
if int(v)>int(fileversion):
if fileid.endswith('000') or fileid.endswith('800'):
+ baseid=fileid[:-3]+'000'
updid=fileid[:-3]+'800'
print(f"{g0} [{baseid}][{verprint}]{fillver} -> "+forecombo+ f"[{updid}] [v{v}]"+Style.RESET_ALL)
else:
