|
|
|
@ -27,13 +27,13 @@ def check_and_apply_update():
|
|
|
|
|
gitconfig()
|
|
|
|
|
branch = get_general_settings()[5]
|
|
|
|
|
g = git.cmd.Git(current_working_directory)
|
|
|
|
|
g.reset('--hard', 'HEAD')
|
|
|
|
|
g.checkout(branch)
|
|
|
|
|
g.reset('--hard', 'origin/' + branch)
|
|
|
|
|
result = g.diff('--shortstat', 'origin/' + branch)
|
|
|
|
|
if len(result) == 0:
|
|
|
|
|
logging.info('No new version of Bazarr available.')
|
|
|
|
|
else:
|
|
|
|
|
g.reset('--hard', 'HEAD')
|
|
|
|
|
g.checkout(branch)
|
|
|
|
|
g.reset('--hard','origin/' + branch)
|
|
|
|
|
g.pull()
|
|
|
|
|
logging.info('Bazarr updated to latest version and need to be restarted. ' + result)
|
|
|
|
|
updated()
|
|
|
|
|