-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
37 lines (32 loc) · 1.23 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import inquirer
from utils import clear_screen, print_header
from history import clear_watch_history
from utils import clear_cookies
from downloads import delete_downloads
def settings_menu():
from main import clear_search_history
while True:
clear_screen()
print_header()
print("Settings\n")
choices = [
'Clear Search History',
'Clear Watch History',
'Clear Cookies',
'Delete All Downloads',
'Go Back to Main Menu'
]
questions = [inquirer.List('setting', message="Select an option", choices=choices)]
setting_selection = inquirer.prompt(questions)['setting']
if setting_selection == 'Go Back to Main Menu':
break
elif setting_selection == 'Clear Watch History':
clear_watch_history()
elif setting_selection == 'Clear Search History':
clear_search_history()
elif setting_selection == 'Delete All Downloads':
# Implement privacy settings adjustment functionality
delete_downloads()
elif setting_selection == 'Clear Cookies':
clear_cookies()
# Add additional elif blocks for other settings options as necessary