Using UTF8 everywhere

pull/26/head
Louis Vézina 7 years ago
parent a197f70874
commit 637a9ba728

@ -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()

@ -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

@ -1,3 +1,6 @@
# coding: utf-8
from __future__ import unicode_literals
import os
import sqlite3
import time

Loading…
Cancel
Save