1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 21:32:36 +01:00

fix: automod WIP

This commit is contained in:
aclist 2024-01-24 21:56:47 +09:00
parent 04cb132219
commit 2f9c74e13b
3 changed files with 11 additions and 16 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -o pipefail
version=5.0.0.rc-29
version=5.0.0.rc-30
#CONSTANTS
aid=221100
@ -536,10 +536,10 @@ fetch_dzq(){
fetch_helpers_by_sum(){
declare -A sums
sums=(
["ui.py"]="12fac5997612367c0716f8575046ac6d"
["ui.py"]="ad04fee7066d5fe30fb39e875ff870d2"
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="d2afc23090f4f1e670ac8eb1a5412579"
["funcs"]="26a4200acd85c0e0fc71a7fe57b1e13e"
)
local author="aclist"
local repo="dztui"

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -o pipefail
version=5.0.0.rc-29
version=5.0.0.rc-30
#CONSTANTS
aid=221100
@ -1080,7 +1080,7 @@ auto_mod_install(){
echo "# Downloaded $(($total-missing)) of $total mods. ESC cancels"
done | $steamsafe_zenity --pulsate --progress --title="DZG Watcher" --auto-close --no-cancel --width=500 2>/dev/null
if [[ ! $? -eq 0 ]]; then
echo "User canceled connect process. Steam may have mods pending for download."
echo "User aborted connect process. Steam may have mods pending for download."
exit 1
fi
@ -1103,7 +1103,8 @@ force_update(){
local update=$(check_timestamps)
console_dl "$update" &&
$steam_cmd steam://open/downloads
return 8
echo "Finished requesting mod updates. Steam may have some mods pending for download."
return 0
}
console_dl(){
readarray -t modids <<< "$@"

View file

@ -16,7 +16,7 @@ locale.setlocale(locale.LC_ALL, '')
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Gdk, GObject, Pango
# 5.0.0-rc.29
# 5.0.0-rc.30
app_name = "DZGUI"
cache = {}
@ -283,13 +283,11 @@ def process_shell_return_code(transient_parent, msg, code, original_input):
case 0:
# success with notice popup
spawn_dialog(transient_parent, msg, "NOTIFY")
pass
case 1:
# error with notice popup
if msg == "":
msg = "Something went wrong"
spawn_dialog(transient_parent, msg, "NOTIFY")
pass
case 2:
# warn and recurse (e.g. validation failed)
spawn_dialog(transient_parent, msg, "NOTIFY")
@ -308,12 +306,6 @@ def process_shell_return_code(transient_parent, msg, code, original_input):
case 6:
# return silently
pass
case 7:
msg = "Some mods may have failed to download. Try connecting again to resync."
spawn_dialog(transient_parent, msg, "NOTIFY")
case 8:
msg = "Finished requesting mod updates. Steam may have mods pending for download."
spawn_dialog(transient_parent, msg, "NOTIFY")
case 90:
# used to update configs and metadata in-place
treeview = transient_parent.grid.scrollable_treelist.treeview
@ -1010,7 +1002,9 @@ class TreeView(Gtk.TreeView):
def load():
dialog.destroy()
transient = self.get_outer_window()
process_shell_return_code(transient, proc.stdout, proc.returncode, record)
out = proc.stdout.splitlines()
msg = out[-1]
process_shell_return_code(transient, msg, proc.returncode, record)
proc = call_out(self, "Connect from table", record)
GLib.idle_add(load)