mirror of
https://github.com/Emersont1/itchio.git
synced 2026-03-11 08:54:39 +00:00
Script now correctly generates folder names, reduced default job count for debugging
This commit is contained in:
parent
c5673cf974
commit
fcf994adaf
4 changed files with 9 additions and 9 deletions
|
|
@ -38,7 +38,7 @@ def main():
|
|||
"-j",
|
||||
"--jobs",
|
||||
type=int,
|
||||
default=4,
|
||||
default=1,
|
||||
help="Number of concurrent downloads, defaults to 4",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = []
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue