Managed to use env vars in windows for better trackma listing of names, that also fixed some title problems with some anime.

This commit is contained in:
CronyAkatsuki 2021-08-12 11:29:34 +02:00
parent 5fcc54c1b1
commit ee6bc2ec69
3 changed files with 10 additions and 8 deletions

16
adl.py
View File

@ -74,6 +74,10 @@ fzf_file = open(dn + "/fzf.txt", "w+") # temp file for fzf
fzf_file_path = dn +"/fzf.txt" # path of the temp file
print_fzf_path = "python " + dn + "/print_fzf.py" # print the fzf file
# setup env variables for better readability of outputs
os.environ['LINES'] = '25'
os.environ['COLUMNS'] = '120'
# exit function
def exit_adl():
fzf_file.close()
@ -142,24 +146,24 @@ def check_title(title):
# get your title
def get_title(choice):
choice = choice[9:55]
choice = choice[9:96]
choice = choice.rstrip(".")
title = check_title(choice)
return title
# get episode
def get_episode(choice):
choice = choice[58:60]
choice = choice[98:100]
return int(choice)
# get all episodes
def get_all_episodes(choice):
choice = choice[63:65]
choice = choice[103:105]
return choice
# get score
def get_score(choice):
choice = choice[68:71]
choice = choice[108:110]
return choice
# watch animes
@ -235,7 +239,7 @@ def update_title(title, episode):
if custom != "":
subprocess.call('trackma -a ' + account + ' update "' + title + '" ' + custom)
subprocess.call('trackma -a' + account + ' send')
retrieve_list_update(account)
retrieve_list_update()
else:
color_print("Skipping updating...")
@ -246,7 +250,7 @@ def update_score(title, score):
if custom != "":
subprocess.call('trackma -a ' + account + ' score "' + title + '" ' + custom)
subprocess.call('trackma -a' + account + ' send')
retrieve_list_update(account)
retrieve_list_update()
else:
color_print("Skipping updating...")

View File

@ -1,2 +1 @@
That Time I Got Reincarnated as a Slime Season 2
Komi-san wa, Komyushou desu.

View File

@ -1,2 +1 @@
That Time I Got Reincarnated as a Slime Season
Komi-san wa, Komyushou desu