mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 17:13:35 +08:00
Path replacement bug under Linux
This commit is contained in:
parent
a67f7f0060
commit
71b7672242
2 changed files with 5 additions and 12 deletions
|
@ -39,6 +39,8 @@ def list_subtitles(file):
|
|||
def store_subtitles(file):
|
||||
languages = []
|
||||
actual_subtitles = []
|
||||
if os.name == 'nt':
|
||||
file = file.decode('utf8')
|
||||
if os.path.exists(file):
|
||||
if os.path.splitext(file)[1] == '.mkv':
|
||||
try:
|
||||
|
@ -110,7 +112,7 @@ def full_scan_subtitles():
|
|||
c_db.close()
|
||||
|
||||
for episode in episodes:
|
||||
store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding()))
|
||||
store_subtitles(path_replace(episode[0]).encode('utf8'))
|
||||
|
||||
def series_scan_subtitles(no):
|
||||
conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
|
@ -119,7 +121,7 @@ def series_scan_subtitles(no):
|
|||
c_db.close()
|
||||
|
||||
for episode in episodes:
|
||||
store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding()))
|
||||
store_subtitles(path_replace(episode[0]).encode('utf8'))
|
||||
|
||||
list_missing_subtitles(no)
|
||||
|
||||
|
@ -130,4 +132,4 @@ def new_scan_subtitles():
|
|||
c_db.close()
|
||||
|
||||
for episode in episodes:
|
||||
store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding()))
|
||||
store_subtitles(path_replace(episode[0]).encode('utf8'))
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from get_general_settings import *
|
||||
|
||||
import git
|
||||
|
||||
g = git.cmd.Git(os.path.dirname(__file__))
|
||||
print g.pull('--dry-run', 'origin', branch)
|
Loading…
Reference in a new issue