Script now correctly generates folder names, reduced default job count for debugging

This commit is contained in:
64Core 2022-05-31 21:27:21 -05:00
parent c5673cf974
commit fcf994adaf
4 changed files with 9 additions and 9 deletions

View file

@ -38,7 +38,7 @@ def main():
"-j",
"--jobs",
type=int,
default=4,
default=1,
help="Number of concurrent downloads, defaults to 4",
)

View file

@ -29,12 +29,12 @@ class Game:
self.game_slug = matches.group(2)
self.publisher_slug = matches.group(1)
if "VerboseFolders" in globals():
self.destination_folder = self.game_slug if not VerboseFolders else self.name
else:
self.destination_folder = self.game_slug
print("VerboseFolders Not Detected in Global Variables, Falling Back to Game Slug\n")
self.destination_path = itchiodl.utils.clean_path(f"{self.publisher_slug}/{self.destination_folder}")
#if "VerboseFolders" in globals():
# self.destination_folder = self.game_slug if not VerboseFolders else self.name
#else:
# self.destination_folder = self.game_slug
# print("VerboseFolders Not Detected in Global Variables, Falling Back to Game Slug\n")
self.destination_path = itchiodl.utils.clean_path(f"{self.publisher_slug}/{self.name}")
self.files = []
self.downloads = []

View file

@ -11,7 +11,7 @@ from itchiodl.game import Game
class Library:
"""Representation of a user's game library"""
def __init__(self, login, jobs=4):
def __init__(self, login, jobs=1):
self.login = login
self.games = []
self.jobs = jobs

View file

@ -40,7 +40,7 @@ def download(url, path, name, file):
def clean_path(path):
"""Cleans a path on windows"""
if sys.platform in ["win32", "cygwin", "msys"]:
path_clean = re.replace(r"[\<\>\:\"\/\\\|\?\*]", "-", path)
path_clean = path.replace(r"[\<\>\:\"\/\\\|\?\*]", "-")
return path_clean
return path