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

master
MrS0m30n3 2018-01-14 16:10:18 +02:00
parent a4472c0ded
commit f21d2491ec
1 changed files with 7 additions and 1 deletions

View File

@ -5,8 +5,8 @@
from __future__ import unicode_literals
import os
import json
import os.path
from .utils import (
os_path_expanduser,
@ -303,6 +303,12 @@ class OptionsManager(object):
'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):
"""Load options from settings file. """
if not os_path_exists(self.settings_file):