mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-12 17:03:59 +08:00
Test
This commit is contained in:
parent
71b7672242
commit
93e658b10f
1 changed files with 3 additions and 6 deletions
|
@ -8,7 +8,6 @@ from subliminal import *
|
||||||
import pycountry
|
import pycountry
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import ast
|
import ast
|
||||||
import sys
|
|
||||||
|
|
||||||
from get_general_settings import *
|
from get_general_settings import *
|
||||||
|
|
||||||
|
@ -39,8 +38,6 @@ def list_subtitles(file):
|
||||||
def store_subtitles(file):
|
def store_subtitles(file):
|
||||||
languages = []
|
languages = []
|
||||||
actual_subtitles = []
|
actual_subtitles = []
|
||||||
if os.name == 'nt':
|
|
||||||
file = file.decode('utf8')
|
|
||||||
if os.path.exists(file):
|
if os.path.exists(file):
|
||||||
if os.path.splitext(file)[1] == '.mkv':
|
if os.path.splitext(file)[1] == '.mkv':
|
||||||
try:
|
try:
|
||||||
|
@ -112,7 +109,7 @@ def full_scan_subtitles():
|
||||||
c_db.close()
|
c_db.close()
|
||||||
|
|
||||||
for episode in episodes:
|
for episode in episodes:
|
||||||
store_subtitles(path_replace(episode[0]).encode('utf8'))
|
store_subtitles(path_replace(episode[0]))
|
||||||
|
|
||||||
def series_scan_subtitles(no):
|
def series_scan_subtitles(no):
|
||||||
conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||||
|
@ -121,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('utf8'))
|
store_subtitles(path_replace(episode[0]))
|
||||||
|
|
||||||
list_missing_subtitles(no)
|
list_missing_subtitles(no)
|
||||||
|
|
||||||
|
@ -132,4 +129,4 @@ def new_scan_subtitles():
|
||||||
c_db.close()
|
c_db.close()
|
||||||
|
|
||||||
for episode in episodes:
|
for episode in episodes:
|
||||||
store_subtitles(path_replace(episode[0]).encode('utf8'))
|
store_subtitles(path_replace(episode[0]))
|
||||||
|
|
Loading…
Reference in a new issue