Rebranding.

This commit is contained in:
CronyAkatsuki 2022-09-16 19:33:54 +02:00
parent 6435152ddd
commit f874b86499
2 changed files with 17 additions and 17 deletions

View File

@ -8,16 +8,16 @@ import signal
# required files # required files
CURRENT_DIR = os.getcwd() CURRENT_DIR = os.getcwd()
VERSION = "1.0" VERSION = "1.1"
if sys.platform == "win32": if sys.platform == "win32":
CONFIG_FILE_PATH = os.path.join('C:\\', 'Users', str( CONFIG_FILE_PATH = os.path.join('C:\\', 'Users', str(
os.getlogin()), 'Documents', 'Adl', 'config.json') os.getlogin()), 'Documents', 'Anidl', 'config.json')
DEFAULT_DOWNLOAD_LOCATION = os.path.join( DEFAULT_DOWNLOAD_LOCATION = os.path.join(
'C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime') 'C:\\', 'Users', str(os.getlogin()), 'Videos', 'Anime')
else: else:
CONFIG_FILE_PATH = os.path.join( CONFIG_FILE_PATH = os.path.join(
'/home', str(os.getlogin()), '.config', 'adl', 'config.json') '/home', str(os.getlogin()), '.config', 'anidl', 'config.json')
DEFAULT_DOWNLOAD_LOCATION = os.path.join( DEFAULT_DOWNLOAD_LOCATION = os.path.join(
'/home', str(os.getlogin()), 'Videos', 'Anime') '/home', str(os.getlogin()), 'Videos', 'Anime')
@ -43,16 +43,16 @@ CHOOSE_EPISODE_SPECIFIC_SHOW='''Enter lowercase or uppercase to issue command:
A - All available, from episode 1 A - All available, from episode 1
I - custom Interval (range) of episodes I - custom Interval (range) of episodes
C - Custom episode C - Custom episode
S - Skip. Exit adl. S - Skip. Exit anidl.
''' '''
# exit function # exit function
def exit_adl(): def exit_anidl():
sys.exit() sys.exit()
def interupt_command(signum, frame): def interupt_command(signum, frame):
exit_adl() exit_anidl()
# colored print # colored print
@ -99,7 +99,7 @@ def exit_ask():
while True: while True:
choice = color_prommpt("Want to watch another anime? [Y/n]: ") choice = color_prommpt("Want to watch another anime? [Y/n]: ")
if choice == "N" or choice == "n": if choice == "N" or choice == "n":
exit_adl() exit_anidl()
elif choice == "Y" or choice == "y" or choice == "": elif choice == "Y" or choice == "y" or choice == "":
return return
@ -313,9 +313,9 @@ def argument_and_config_parser():
ap.add_argument("-p", "--provider", required=False, ap.add_argument("-p", "--provider", required=False,
help="Define provider used for streaming (check \033[0;36m$anime dl --help\033[0m for providers list)") help="Define provider used for streaming (check \033[0;36m$anime dl --help\033[0m for providers list)")
ap.add_argument("-s", "--show", required=False, ap.add_argument("-s", "--show", required=False,
help='Watch custom show. Ep nr optional, careful with the quotes. Ex: \033[0;36m$adl -s "gegege 2018"\033[0m') help='Watch custom show. Ep nr optional, careful with the quotes. Ex: \033[0;36m$anidl -s "gegege 2018"\033[0m')
ap.add_argument("-n", "--number", required=False, ap.add_argument("-n", "--number", required=False,
help='Specify episode number that will be used with "-s / --show" option. Ex: \033[0;36m$adl -s "gegege 2018" -n "4"\033[0m') help='Specify episode number that will be used with "-s / --show" option. Ex: \033[0;36m$anidl -s "gegege 2018" -n "4"\033[0m')
ap.add_argument("-a", "--account", required=False, ap.add_argument("-a", "--account", required=False,
help="By default trackma will use account 1. Use '-a 2' for example to change trackma account") help="By default trackma will use account 1. Use '-a 2' for example to change trackma account")
ap.add_argument("-d", "--download", required=False, type=bool, nargs='?', const=True, default=False, ap.add_argument("-d", "--download", required=False, type=bool, nargs='?', const=True, default=False,
@ -329,7 +329,7 @@ def argument_and_config_parser():
# print the version # print the version
if args["version"]: if args["version"]:
print(f"Py-adl version {VERSION}") print(f"Anidl version {VERSION}")
sys.exit() sys.exit()
# get provider # get provider
@ -376,7 +376,7 @@ def argument_and_config_parser():
if not download and args["download_location"]: if not download and args["download_location"]:
color_print("You need to be downloading to use this option!") color_print("You need to be downloading to use this option!")
exit_adl() exit_anidl()
elif download and args["download_location"]: elif download and args["download_location"]:
download_location = str(args["download_location"]) download_location = str(args["download_location"])
else: else:
@ -391,7 +391,7 @@ def specific_show_loop(show, msg, download, provider, download_location):
action = choose_episode_specific_show() action = choose_episode_specific_show()
if action == "a" or action == "A" or action == "": if action == "a" or action == "A" or action == "":
all_episodes(show, msg, download, provider, download_location) all_episodes(show, msg, download, provider, download_location)
exit_adl() exit_anidl()
# custom range of episodes # custom range of episodes
elif action == "i" or action == "I": elif action == "i" or action == "I":
custom_episode_range(show, msg, download, custom_episode_range(show, msg, download,
@ -399,17 +399,17 @@ def specific_show_loop(show, msg, download, provider, download_location):
if wanna_continu_watch(download): if wanna_continu_watch(download):
continue continue
else: else:
exit_adl() exit_anidl()
# watch custom episode # watch custom episode
elif action == "c" or action == "C": elif action == "c" or action == "C":
custom_episode(show, msg, download, provider, download_location) custom_episode(show, msg, download, provider, download_location)
if wanna_continu_watch(download): if wanna_continu_watch(download):
continue continue
else: else:
exit_adl() exit_anidl()
# skip the anime # skip the anime
elif action == "s" or action == "S": elif action == "s" or action == "S":
exit_adl() exit_anidl()
def main_loop(retrieve, account, msg, download, provider, download_location): def main_loop(retrieve, account, msg, download, provider, download_location):
@ -540,7 +540,7 @@ def main():
# main loop that connets with your list with trackma # main loop that connets with your list with trackma
main_loop(retrieve, account, msg, download, main_loop(retrieve, account, msg, download,
provider, download_location) provider, download_location)
exit_adl() exit_anidl()
# run only if runned directly # run only if runned directly

View File

@ -6,7 +6,7 @@ setup(
name='anidl', name='anidl',
version=anidl.VERSION, version=anidl.VERSION,
description='Adl wrapper script written in python.', description='Adl wrapper script written in python.',
url='https://github.com/cronyakatsuki/py-adl', url='https://github.com/cronyakatsuki/anidl',
author='Crony Akatsuki', author='Crony Akatsuki',
author_email='cronyakatsuki@gmail.com', author_email='cronyakatsuki@gmail.com',
license='GPL-3.0', license='GPL-3.0',