Skip to content

Commit

Permalink
added config for batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
sh4dow committed Jun 22, 2022
1 parent cd71bc8 commit ac2ac15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def download():
global button1
global login
global passw
global lim

if running:
return
Expand All @@ -59,7 +60,6 @@ def download():
# get array of IDs
download = getWids(URLinput.get("1.0",tk.END))
l = len(download)
lim = 50

for i in range(math.ceil(l/lim)):
#for appid in download:
Expand Down Expand Up @@ -131,22 +131,26 @@ def main():
global URLinput
global output
global running
global lim
running = False

cfg = configparser.ConfigParser()
cfg.read('downloader.ini')
# validate ini
if 'general' not in cfg:
cfg['general']={'theme': 'default', 'steampath': 'steamcmd'}
cfg['general']={'theme': 'default', 'steampath': 'steamcmd', 'lim': 50}
else:
if 'theme' not in cfg['general']:
cfg['general']['theme'] = 'default'
if 'steampath' not in cfg['general']:
cfg['general']['steampath'] = 'steamcmd'
if 'lim' not in cfg['general']:
cfg['general']['lim'] = 50

# set globals
steampath = cfg['general']['steampath']
theme = cfg['general']['theme']
lim = cfg['general']['lim']
login = None
passw = None
if 'login' in cfg['general']:
Expand Down
Binary file modified release/downloader.exe
Binary file not shown.

0 comments on commit ac2ac15

Please sign in to comment.