mirror of
https://github.com/ClaytonWWilson/Scraper-for-theTVDB.com.git
synced 2025-12-15 17:28:46 +00:00
56 lines
1.2 KiB
Python
56 lines
1.2 KiB
Python
import os
|
|
from login import *
|
|
from actions import *
|
|
|
|
def clear_screen():
|
|
IS_WINDOWS = os.name == "nt"
|
|
if IS_WINDOWS:
|
|
os.system("cls")
|
|
else:
|
|
os.system("clear")
|
|
|
|
def user_choice():
|
|
return input("> ").lower().strip()
|
|
|
|
def wait():
|
|
input("Press enter to continue.")
|
|
|
|
while True:
|
|
clear_screen()
|
|
print("=============================\n"
|
|
"Image fetcher for theTVDB.com\n"
|
|
"=============================\n")
|
|
|
|
print("1. Search theTVDB.com")
|
|
print("2. Clear download folders")
|
|
print("3. Change login")
|
|
print("4. Refresh API Token")
|
|
print("5. Install Requirements")
|
|
print("6. Check for updates\n")
|
|
print("0. Exit\n")
|
|
|
|
choice = user_choice()
|
|
|
|
if choice == "1":
|
|
print("Search")
|
|
break
|
|
elif choice == "2":
|
|
clearFolders()
|
|
wait()
|
|
elif choice == "3":
|
|
clear_screen()
|
|
clearLogin()
|
|
login()
|
|
wait()
|
|
elif choice == "4":
|
|
refreshToken()# TODO implement this
|
|
wait()
|
|
elif choice == "5":
|
|
print("install requirements")
|
|
break
|
|
elif choice == "6":
|
|
print("update")
|
|
break
|
|
elif choice == "0":
|
|
exit()
|