1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 13:22:35 +01:00

chore: add logging

This commit is contained in:
aclist 2024-12-18 17:26:31 +09:00
parent 6e3746e9b4
commit a18d68776f
4 changed files with 9 additions and 7 deletions

View file

@ -2,7 +2,8 @@
## [5.6.0-beta.18] 2024-12-14 ## [5.6.0-beta.18] 2024-12-14
### Added ### Added
- Open Steam workshop subscriptions - Open Steam workshop subscriptions dialog
- Additional logging
### Fixed ### Fixed
- Empty dialog popups if user manually deletes local mods while application is running - Empty dialog popups if user manually deletes local mods while application is running
- Abort DayZ path discovery if VDF if Steam files are not synched - Abort DayZ path discovery if VDF if Steam files are not synched

View file

@ -578,10 +578,10 @@ fetch_helpers_by_sum(){
[[ -f "$config_file" ]] && source "$config_file" [[ -f "$config_file" ]] && source "$config_file"
declare -A sums declare -A sums
sums=( sums=(
["ui.py"]="0e3845ef150ee9863f9160c62dbb24f9" ["ui.py"]="99544ccef6060125509c4b689a808a15"
["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="a9745fa5cc2f007bddf0d30032845fbd" ["funcs"]="98261fdba4323f77c6dd610c1efc4d11"
["lan"]="c62e84ddd1457b71a85ad21da662b9af" ["lan"]="c62e84ddd1457b71a85ad21da662b9af"
) )
local author="aclist" local author="aclist"

View file

@ -1202,7 +1202,7 @@ legacy_symlinks(){
logger INFO "Removing legacy symlinks" logger INFO "Removing legacy symlinks"
for d in "$game_dir"/*; do for d in "$game_dir"/*; do
if [[ $d =~ @[0-9]+-.+ ]]; then if [[ $d =~ @[0-9]+-.+ ]]; then
logger INFO "Unlinking $d" logger INFO "Unlinking '$d'"
unlink "$d" unlink "$d"
fi fi
done done
@ -1212,11 +1212,14 @@ legacy_symlinks(){
logger INFO "Removing legacy encoding format" logger INFO "Removing legacy encoding format"
for d in "${mod_dirs[@]}"; do for d in "${mod_dirs[@]}"; do
# suppress errors if mods are downloading at boot # suppress errors if mods are downloading at boot
logger INFO "Testing directory '$d'"
[[ ! -f "$d/meta.cpp" ]] && continue [[ ! -f "$d/meta.cpp" ]] && continue
local id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}') local id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}')
logger INFO "Given id is '$id'"
local encoded_id=$(echo "$id" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g') local encoded_id=$(echo "$id" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g')
logger INFO "Resolved id is '$encoded_id'"
if [[ -h "$game_dir/@$encoded_id" ]]; then if [[ -h "$game_dir/@$encoded_id" ]]; then
logger INFO "Unlinking $game_dir/@$encoded_id" logger INFO "Unlinking '$game_dir/@$encoded_id'"
unlink "$game_dir/@$encoded_id" unlink "$game_dir/@$encoded_id"
fi fi
done done

View file

@ -2263,8 +2263,6 @@ class LinkDialog(GenericDialog):
parent.grid.update_statusbar(tooltip) parent.grid.update_statusbar(tooltip)
class EntryDialog(GenericDialog): class EntryDialog(GenericDialog):
def __init__(self, parent, text, mode, link): def __init__(self, parent, text, mode, link):
super().__init__(parent, text, mode) super().__init__(parent, text, mode)