|
9 | 9 | from traceback import format_exception |
10 | 10 | from winreg import ConnectRegistry, OpenKey, QueryValueEx, HKEY_CURRENT_USER |
11 | 11 |
|
12 | | - |
13 | 12 | LOG_FILE = 'Grabber_error.log' |
14 | 13 |
|
15 | 14 | log = logging.getLogger('Grabber') |
@@ -89,12 +88,12 @@ def path_shortener(full_path: str): |
89 | 88 | split = -integer - 1 |
90 | 89 | times += 1 |
91 | 90 | if times == 3 and full_path.count('/') >= 4: |
92 | | - short_path = ''.join([full_path[:full_path.find('/')+1], '...', full_path[split:]]) |
| 91 | + short_path = ''.join([full_path[:full_path.find('/') + 1], '...', full_path[split:]]) |
93 | 92 |
|
94 | 93 | break |
95 | 94 | elif times == 3: |
96 | 95 | split = full_path.find('/', split) |
97 | | - short_path = ''.join([full_path[:full_path.find('/')+1], '...', full_path[split:]]) |
| 96 | + short_path = ''.join([full_path[:full_path.find('/') + 1], '...', full_path[split:]]) |
98 | 97 | break |
99 | 98 | else: |
100 | 99 | short_path = full_path |
@@ -1003,6 +1002,16 @@ def _validate_settings(self): |
1003 | 1002 | "state": False, |
1004 | 1003 | "tooltip": "Username of your account. Password will be asked for on run." |
1005 | 1004 | } |
| 1005 | +base_settings['parameters']['Best video quality'] = { |
| 1006 | + "active option": 0, |
| 1007 | + "command": "--format ((571/272/402/337/315/313/401/336/308/400/271/335/303/299/399/137/248/334/302/298/398/247/136/333/244/135/397/332/243/134/396/331/242/133/395/330/160/394/278)[protocol!=http_dash_segments])+(bestaudio[acodec=opus]/bestaudio[protocol!=http_dash_segments])/best", |
| 1008 | + "dependency": None, |
| 1009 | + "options": None, |
| 1010 | + "state": False, |
| 1011 | + "tooltip": "This is a special command that uses --format" |
| 1012 | + "\nThis picks best possible video quality (at the time of addition)" |
| 1013 | + "\nDo not use when converting to audio!" |
| 1014 | +} |
1006 | 1015 |
|
1007 | 1016 |
|
1008 | 1017 | def get_base_settings() -> dict: |
|
0 commit comments