mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-15 02:50:42 +08:00
fix: unexpected version update.
This commit is contained in:
@@ -3,9 +3,10 @@ from module.conf import VERSION
|
||||
|
||||
def version_check() -> bool:
|
||||
with open("config/version.txt", "rw") as f:
|
||||
version = f.read()
|
||||
if VERSION > version:
|
||||
f.write(VERSION)
|
||||
# Read last version
|
||||
versions = f.readlines()
|
||||
if VERSION[:3] > versions[-1][:3]:
|
||||
f.write(VERSION[:3] + "\n")
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user