summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-05-26 22:25:56 -0400
committermorpheus65535 <[email protected]>2021-05-26 22:25:56 -0400
commitd34add9fa4a7e9e894953ca55222643e76d433bd (patch)
treee3a76f29d07ea02204a4b7794b8fdbf471548f8a
parent2b9d892ca9151118917c2d682c9bde204a5c72fa (diff)
downloadbazarr-d34add9fa4a7e9e894953ca55222643e76d433bd.tar.gz
bazarr-d34add9fa4a7e9e894953ca55222643e76d433bd.zip
Fixed some issues after peewee implementationv0.9.6-beta.10
-rw-r--r--bazarr/get_languages.py10
-rw-r--r--bazarr/list_subtitles.py2
2 files changed, 7 insertions, 5 deletions
diff --git a/bazarr/get_languages.py b/bazarr/get_languages.py
index 8c43bfc18..70c7a7fad 100644
--- a/bazarr/get_languages.py
+++ b/bazarr/get_languages.py
@@ -24,10 +24,7 @@ def load_language_in_db():
.on_conflict(action='IGNORE') \
.execute()
- # update/insert chinese languages
- TableSettingsLanguages.update({TableSettingsLanguages.name: 'Chinese Simplified'}) \
- .where(TableSettingsLanguages.code2 == 'zt')\
- .execute()
+ # insert chinese languages
TableSettingsLanguages.insert({TableSettingsLanguages.code3: 'zht', TableSettingsLanguages.code2: 'zt',
TableSettingsLanguages.name: 'Chinese Traditional'}) \
.on_conflict(action='IGNORE')\
@@ -49,6 +46,11 @@ def load_language_in_db():
def create_languages_dict():
global languages_dict
+ # replace chinese by chinese simplified
+ TableSettingsLanguages.update({TableSettingsLanguages.name: 'Chinese Simplified'}) \
+ .where(TableSettingsLanguages.code3 == 'zho') \
+ .execute()
+
languages_dict = TableSettingsLanguages.select(TableSettingsLanguages.name,
TableSettingsLanguages.code2,
TableSettingsLanguages.code3,
diff --git a/bazarr/list_subtitles.py b/bazarr/list_subtitles.py
index 185348143..c6f938b2e 100644
--- a/bazarr/list_subtitles.py
+++ b/bazarr/list_subtitles.py
@@ -268,7 +268,7 @@ def list_missing_subtitles(no=None, epno=None, send_event=True):
elif no is not None:
episodes_subtitles_clause = (TableEpisodes.sonarrSeriesId == no)
else:
- episodes_subtitles_clause = ()
+ episodes_subtitles_clause = None
episodes_subtitles = TableEpisodes.select(TableShows.sonarrSeriesId,
TableEpisodes.sonarrEpisodeId,
TableEpisodes.subtitles,