Fixed issue where episode name was used as hints for guessit instead of series name.

pull/1695/head v1.0.3-beta.14
morpheus65535 3 years ago
parent 391892fdf0
commit 6b82a734e2

@ -6,7 +6,7 @@ from flask import request
from flask_restful import Resource
from subliminal_patch.core import SUBTITLE_EXTENSIONS
from database import TableEpisodes, get_audio_profile_languages, get_profile_id
from database import TableShows, TableEpisodes, get_audio_profile_languages, get_profile_id
from ..utils import authenticate
from helper import path_mappings
from get_subtitle.upload import manual_upload_subtitle
@ -26,10 +26,11 @@ class EpisodesSubtitles(Resource):
def patch(self):
sonarrSeriesId = request.args.get('seriesid')
sonarrEpisodeId = request.args.get('episodeid')
episodeInfo = TableEpisodes.select(TableEpisodes.title,
TableEpisodes.path,
episodeInfo = TableEpisodes.select(TableEpisodes.path,
TableEpisodes.scene_name,
TableEpisodes.audio_language)\
TableEpisodes.audio_language,
TableShows.title) \
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId)) \
.where(TableEpisodes.sonarrEpisodeId == sonarrEpisodeId)\
.dicts()\
.get()

@ -20,9 +20,9 @@ class ProviderEpisodes(Resource):
def get(self):
# Manual Search
sonarrEpisodeId = request.args.get('episodeid')
episodeInfo = TableEpisodes.select(TableEpisodes.title,
TableEpisodes.path,
episodeInfo = TableEpisodes.select(TableEpisodes.path,
TableEpisodes.scene_name,
TableShows.title,
TableShows.profileId) \
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId))\
.where(TableEpisodes.sonarrEpisodeId == sonarrEpisodeId) \
@ -46,9 +46,10 @@ class ProviderEpisodes(Resource):
# Manual Download
sonarrSeriesId = request.args.get('seriesid')
sonarrEpisodeId = request.args.get('episodeid')
episodeInfo = TableEpisodes.select(TableEpisodes.title,
TableEpisodes.path,
TableEpisodes.scene_name) \
episodeInfo = TableEpisodes.select(TableEpisodes.path,
TableEpisodes.scene_name,
TableShows.title) \
.join(TableShows, on=(TableEpisodes.sonarrSeriesId == TableShows.sonarrSeriesId)) \
.where(TableEpisodes.sonarrEpisodeId == sonarrEpisodeId) \
.dicts() \
.get()

@ -158,7 +158,7 @@ def upgrade_subtitles():
[(language, is_hi, is_forced)],
audio_language,
str(episode['scene_name']),
episode['title'],
episode['seriesTitle'],
'series',
forced_minimum_score=int(episode['score']),
is_upgrade=True))

Loading…
Cancel
Save