Skip to content

Commit fc26198

Browse files
authored
General fixes (#2169)
* Update MusicRando.py * Update ApplyLocal.py * Update ApplyLocal.py
1 parent 3699d0d commit fc26198

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

randomizer/Patching/ApplyLocal.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ async def patching_response(data, from_patch_gen=False, lanky_from_history=False
9494
# loop.run_until_complete(ProgressBar().reset())
9595
# return
9696
elif from_patch_gen is True:
97-
if js.document.getElementById("download_patch_file").checked and js.document.getElementById("generate_seed").value != "Download Seed":
97+
if (js.document.getElementById("download_patch_file").checked or js.document.getElementById("load_patch_file").checked) and js.document.getElementById(
98+
"generate_seed"
99+
).value != "Download Seed":
98100
js.save_text_as_file(data, f"dk64r-patch-{seed_id}.lanky")
99101
gif_fairy = get_hash_images("browser", "loading-fairy")
100102
gif_dead = get_hash_images("browser", "loading-dead")

randomizer/Patching/MusicRando.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ def getAllAssignedVanillaSongs(settings: Settings) -> dict:
6363
6464
The keys and values are both of type Songs.
6565
"""
66-
return {Songs(int(k)): Songs(v) for k, v in settings.music_selection_dict["vanilla"].items()}
66+
return {Songs[k]: Songs[v] for k, v in settings.music_selection_dict["vanilla"].items()}
6767

6868

6969
def getAllAssignedCustomSongs(settings: Settings) -> dict:
7070
"""Return a dictionary of user-assigned custom songs.
7171
7272
The keys are of type Songs, and the values are strings.
7373
"""
74-
return {Songs(int(k)): v for k, v in settings.music_selection_dict["custom"].items()}
74+
return {Songs[k]: v for k, v in settings.music_selection_dict["custom"].items()}
7575

7676

7777
def getVanillaSongAssignedToLocation(settings: Settings, location: Songs) -> Songs:

0 commit comments

Comments
 (0)