Browse Source

Use system's youtube-dl copy when updates are disabled

doc-issue-template
MrS0m30n3 6 years ago
parent
commit
f21d2491ec
1 changed files with 7 additions and 1 deletions
  1. 8
      youtube_dl_gui/optionsmanager.py

8
youtube_dl_gui/optionsmanager.py

@ -5,8 +5,8 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import os
import json import json
import os.path
from .utils import ( from .utils import (
os_path_expanduser, os_path_expanduser,
@ -303,6 +303,12 @@ class OptionsManager(object):
'disable_update': False 'disable_update': False
} }
# Set the youtubedl_path again if the disable_update option is set
new_path = '/usr/bin'
if self.options['disable_update'] and os.name != 'nt' and os.path.exists(new_path):
self.options['youtubedl_path'] = new_path
def load_from_file(self): def load_from_file(self):
"""Load options from settings file. """ """Load options from settings file. """
if not os_path_exists(self.settings_file): if not os_path_exists(self.settings_file):

Loading…
Cancel
Save