mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-13 10:17:43 +08:00
Working on update
This commit is contained in:
parent
c515dcefd1
commit
72ff2bfd95
1 changed files with 3 additions and 3 deletions
|
@ -27,13 +27,13 @@ def check_and_apply_update():
|
||||||
gitconfig()
|
gitconfig()
|
||||||
branch = get_general_settings()[5]
|
branch = get_general_settings()[5]
|
||||||
g = git.cmd.Git(current_working_directory)
|
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)
|
result = g.diff('--shortstat', 'origin/' + branch)
|
||||||
if len(result) == 0:
|
if len(result) == 0:
|
||||||
logging.info('No new version of Bazarr available.')
|
logging.info('No new version of Bazarr available.')
|
||||||
else:
|
else:
|
||||||
g.reset('--hard', 'HEAD')
|
|
||||||
g.checkout(branch)
|
|
||||||
g.reset('--hard','origin/' + branch)
|
|
||||||
g.pull()
|
g.pull()
|
||||||
logging.info('Bazarr updated to latest version and need to be restarted. ' + result)
|
logging.info('Bazarr updated to latest version and need to be restarted. ' + result)
|
||||||
updated()
|
updated()
|
||||||
|
|
Loading…
Reference in a new issue