Skip to content

Commit

Permalink
Update to new website URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Brittank88 committed Aug 18, 2022
1 parent 35dfcbe commit b5b2b11
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
49 changes: 25 additions & 24 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from colorama import Fore, Back, Style

BLOCK_SIZE = 1024 # 1 Kibibyte = 1024 bytes
DOMAIN = 'https://gdcolon.com/🗿'
DOMAIN = 'https://thirtydollar.website/'
BLOCKING_COEFFICIENT = 0.5

def init_argparse() -> ArgumentParser:
Expand All @@ -37,9 +37,9 @@ def init_argparse() -> ArgumentParser:
type = str
)
parser.add_argument(
'-t', '--threads' ,
help = 'The number of threads to use.' ,
default = cpu_count() // (1 - BLOCKING_COEFFICIENT),
'-t', '--threads' ,
help = 'The number of threads to use.' ,
default = (cpus if (cpus := cpu_count()) is not None else 1) // (1 - BLOCKING_COEFFICIENT),
type = int
)
return parser
Expand All @@ -56,8 +56,14 @@ def main() -> None:
def _download(sound: dict) -> None:
"""Underlying function that ownloads a sound from the server."""

logger_prefix = 'N/A'
filename = 'N/A'

try:
filename = sound.get('id') + '.wav'
soundname = sound.get('id')
if soundname is None: raise ValueError('Unable to get sound name!')

filename = soundname + '.wav'

logger_prefix = f'{Fore.BLACK}{Back.WHITE}[Thread | {"%05d" % get_native_id()}]{Style.RESET_ALL}'
tqdm.write(f'{logger_prefix}{Fore.LIGHTBLUE_EX}{Style.DIM} Downloading \'{filename}\'...{Style.RESET_ALL}')
Expand Down

0 comments on commit b5b2b11

Please sign in to comment.