From 18fac1bfadfa3976fb34eef118a80c00851d10d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 6 Nov 2017 23:23:36 -0500 Subject: [PATCH 1/3] Check for update test --- check_update.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/check_update.py b/check_update.py index 176e7592a..bb108c978 100644 --- a/check_update.py +++ b/check_update.py @@ -1,8 +1,5 @@ from get_general_settings import * import git - -g = git.cmd.Git(os.path.dirname(__file__)) -g.pull('origin ' + branch + ' --dry-run') - -print g \ No newline at end of file +import subprocess +print subprocess.check_output(["git", "pull", '--dry-run', '--quiet', 'origin', branch], stderr=subprocess.STDOUT) From 6c719b34b19421a42500b0d868113a311c16632f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 6 Nov 2017 23:24:55 -0500 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 562feade5..b6dde827a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Bazarr is a companion application to Sonarr. It manage and download subtitles ba ## Screenshot -You can get more in the screenshot directory but it should look familiar: +You can get more in the [screenshot](https://github.com/morpheus65535/bazarr/tree/master/screenshot) directory but it should look familiar: ![Series](/screenshot/series.png?raw=true "Series") From 2e3d306e84288989a1eaac130d7c91d2bc0dc085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 6 Nov 2017 23:53:31 -0500 Subject: [PATCH 3/3] Update WIP --- check_update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/check_update.py b/check_update.py index bb108c978..671ade4eb 100644 --- a/check_update.py +++ b/check_update.py @@ -1,5 +1,9 @@ from get_general_settings import * -import git +import os import subprocess -print subprocess.check_output(["git", "pull", '--dry-run', '--quiet', 'origin', branch], stderr=subprocess.STDOUT) +result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT).split('\n') + +if len(result) > 2: + subprocess.check_output(["git", "pull", 'origin', branch]) + os.execlp('python', os.path.join(os.path.dirname(__file__), 'bazarr.py'))