pull/26/head
Louis Vézina 7 years ago
parent 47d152b457
commit 41a1e0ea5a

@ -28,6 +28,7 @@ def check_and_apply_update(repo=local_repo, remote_name='origin'):
repo.head.set_target(remote_id) repo.head.set_target(remote_id)
result = 'Bazarr updated to latest version and restarting.' result = 'Bazarr updated to latest version and restarting.'
os.execlp('python', 'python', os.path.join(os.path.dirname(__file__), 'bazarr.py')) os.execlp('python', 'python', os.path.join(os.path.dirname(__file__), 'bazarr.py'))
# We can just do it normally
elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL: elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL:
repo.merge(remote_id) repo.merge(remote_id)
print repo.index.conflicts print repo.index.conflicts
@ -43,7 +44,9 @@ def check_and_apply_update(repo=local_repo, remote_name='origin'):
[repo.head.target, remote_id]) [repo.head.target, remote_id])
repo.state_cleanup() repo.state_cleanup()
result = 'Conflict detected when trying to update.' result = 'Conflict detected when trying to update.'
os.execlp('python', 'python', os.path.join(os.path.dirname(__file__), 'bazarr.py'))
# We can't do it
else: else:
raise AssertionError('Unknown merge analysis result') result = 'Bazarr cannot be updated: Unknown merge analysis result'
return result return result

@ -118,7 +118,7 @@ def series_scan_subtitles(no):
c_db.close() c_db.close()
for episode in episodes: for episode in episodes:
store_subtitles(path_replace(episode[0].encode('utf-8'))) store_subtitles(path_replace(episode[0]))
list_missing_subtitles(no) list_missing_subtitles(no)

Loading…
Cancel
Save