mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-31 03:12:12 +00:00
Using UTF8 everywhere
This commit is contained in:
parent
a197f70874
commit
637a9ba728
14 changed files with 47 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
bazarr_version = '0.1.2'
|
||||
|
||||
from bottle import route, run, template, static_file, request, redirect
|
||||
|
@ -408,7 +411,7 @@ def remove_subtitles():
|
|||
except OSError:
|
||||
pass
|
||||
store_subtitles(episodePath)
|
||||
list_missing_subtitles(tvdbid)
|
||||
list_missing_subtitles(sonarrSeriesId)
|
||||
|
||||
@route(base_url + 'get_subtitle', method='POST')
|
||||
def get_subtitle():
|
||||
|
@ -436,7 +439,7 @@ def get_subtitle():
|
|||
if result is not None:
|
||||
history_log(1, sonarrSeriesId, sonarrEpisodeId, result)
|
||||
store_subtitles(episodePath)
|
||||
list_missing_subtitles(tvdbid)
|
||||
list_missing_subtitles(sonarrSeriesId)
|
||||
redirect(ref)
|
||||
except OSError:
|
||||
pass
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from get_general_settings import *
|
||||
|
||||
import os
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
import requests
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sqlite3
|
||||
import os
|
||||
import ast
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sqlite3
|
||||
import pycountry
|
||||
import os
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sqlite3
|
||||
import os
|
||||
from subliminal import *
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
import requests
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sqlite3
|
||||
import os
|
||||
import ast
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
import ast
|
||||
|
@ -29,7 +32,7 @@ def download_subtitle(path, language, hi, providers):
|
|||
def series_download_subtitles(no):
|
||||
conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
c_db = conn_db.cursor()
|
||||
episodes_details = c_db.execute("SELECT path, missing_subtitles, sonarrEpisodeId FROM table_episodes WHERE path = ?", (no,)).fetchall()
|
||||
episodes_details = c_db.execute("SELECT path, missing_subtitles, sonarrEpisodeId FROM table_episodes WHERE sonarrSeriesId = ?", (no,)).fetchall()
|
||||
series_details = c_db.execute("SELECT hearing_impaired FROM table_shows WHERE sonarrSeriesId = ?", (no,)).fetchone()
|
||||
enabled_providers = c_db.execute("SELECT name FROM table_settings_providers WHERE enabled = 1").fetchall()
|
||||
c_db.close()
|
||||
|
@ -75,4 +78,4 @@ def wanted_search_missing_subtitles():
|
|||
c.close()
|
||||
|
||||
for episode in data:
|
||||
wanted_download_subtitles(episode[0])
|
||||
wanted_download_subtitles(episode[0])
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import enzyme
|
||||
import babelfish
|
||||
|
@ -68,7 +71,7 @@ def store_subtitles(file):
|
|||
def list_missing_subtitles(*no):
|
||||
query_string = ''
|
||||
try:
|
||||
query_string = " WHERE table_shows.tvdbId = " + str(no[0])
|
||||
query_string = " WHERE table_shows.sonarrSeriesId = " + str(no[0])
|
||||
except:
|
||||
pass
|
||||
conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from get_general_settings import *
|
||||
from get_series import *
|
||||
from get_episodes import *
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from get_general_settings import *
|
||||
|
||||
import git
|
||||
|
|
3
utils.py
3
utils.py
|
@ -1,3 +1,6 @@
|
|||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
import time
|
||||
|
|
Loading…
Reference in a new issue