Skip to content

Commit

Permalink
Release 5.5.2 CSS: Play Bar Box, Classic | JS: Press Enter to Launch …
Browse files Browse the repository at this point in the history
…Games | GUI: Downloads new files
  • Loading branch information
Jonius7 committed Jan 31, 2021
2 parents 18a029c + 1eed2df commit 6cd56f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,9 @@ def backup_old_versions(filelist):
filedir = os.path.join('', *sp_dir)
if not os.path.exists(os.path.join(backup_path, filedir)):
os.makedirs(os.path.join(backup_path, filedir))
shutil.move(filepath, os.path.join(backup_path, filedir, sp_filepath[-1]))
print("File " + sp_filepath[-1] + " moved to " + os.path.join(backup_path, filedir, sp_filepath[-1]))
if os.path.exists(filepath):
shutil.move(filepath, os.path.join(backup_path, filedir, sp_filepath[-1]))
print("File " + sp_filepath[-1] + " moved to " + os.path.join(backup_path, filedir, sp_filepath[-1]))
except:
print("Unable to backup old versions of small update files.", file=sys.stderr)
print_traceback()
Expand All @@ -1089,6 +1090,10 @@ def download_file(filepath, branch=BRANCH):
url = 'https://raw.githubusercontent.com/Jonius7/SteamUI-OldGlory/'
r = requests.get(url + branch + "/" + filepath, allow_redirects=True)
if not os.path.exists(filepath):
# split
dirs = filepath.split("/")
if len(dirs) == 2:
os.makedirs(dirs[0])
#open(filepath, 'wb').write(r.context)
open(filepath, 'w', encoding="UTF-8").write(r.text)
print("File " + filepath + " downloaded.")
Expand Down
2 changes: 1 addition & 1 deletion old_glory_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"CSSVariableString": "/* ===== SteamUI-OldGlory will insert CSS Variables from variables.css here ==== */",
"CSSBeforeThemes": "// Themes applied before CSS Tweaks",
"CSSAfterThemes": "// Themes applied after CSS Tweaks",
"lastPatchedDate": "2021-01-23T22:03:48Z",
"lastPatchedDate": "2021-01-31T12:55:44Z",
"themes": {
"steam-library": {
"author": "Shiina",
Expand Down

0 comments on commit 6cd56f2

Please sign in to comment.