|
|
@ -7,6 +7,7 @@ import traceback |
|
|
|
import zipfile |
|
|
|
from datetime import datetime |
|
|
|
from threading import RLock |
|
|
|
import re |
|
|
|
|
|
|
|
from couchpotato.api import addApiView |
|
|
|
from couchpotato.core.event import addEvent, fireEvent, fireEventAsync |
|
|
@ -34,7 +35,10 @@ class Updater(Plugin): |
|
|
|
if Env.get('desktop'): |
|
|
|
self.updater = DesktopUpdater() |
|
|
|
elif os.path.isdir(os.path.join(Env.get('app_dir'), '.git')): |
|
|
|
self.updater = GitUpdater(self.conf('git_command', default = 'git')) |
|
|
|
git_default = 'git' |
|
|
|
git_command = self.conf('git_command', default = git_default) |
|
|
|
git_command = git_command if git_command != git_default and (os.path.isfile(git_command) or re.match('^[a-zA-Z0-9_/\.\-]+$', git_command)) else git_default |
|
|
|
self.updater = GitUpdater(git_command) |
|
|
|
else: |
|
|
|
self.updater = SourceUpdater() |
|
|
|
|
|
|
|