first choose will be on the last track that got a screenshot

This commit is contained in:
raphael60650 2021-08-04 21:12:40 +02:00
parent 73d40efb45
commit 6273afb582

View file

@ -24,8 +24,7 @@ driver.execute_script("var element = arguments[0]; element.parentNode.removeChil
driver.find_element_by_id("Panel"))
tracks = glob.iglob("../file/Track/*.szs")
track = next(tracks)
shutil.copy(track, "./map preview/tmp/" + get_nodir(track))
track = "none.png"
def save_screenshot():
@ -36,6 +35,7 @@ def save_screenshot():
def skip_to_next():
global track
if os.path.exists("./map preview/tmp/" + get_nodir(track)):
os.remove("./map preview/tmp/" + get_nodir(track))
track = next(tracks)
@ -45,6 +45,7 @@ def skip_to_next():
shutil.copy(track, "./map preview/tmp/" + get_nodir(track))
skip_to_next()
keyboard.add_hotkey('h', save_screenshot)
while True: