1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 01:27:07 +00:00

Adding Post processing to manual upload

From dev branch
This commit is contained in:
Aurel004 2020-04-23 20:06:37 +02:00 committed by GitHub
parent 7c7c9a7b9d
commit 6b8a59bffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1856,6 +1856,9 @@ def perform_manual_upload_subtitle():
sonarrSeriesId = request.forms.get('sonarrSeriesId')
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
title = request.forms.get('title')
data = database.execute("SELECT audio_language FROM table_shows WHERE sonarrSeriesId=?", (sonarrSeriesId,), only_one=True)
audio_language = data['audio_language']
_, ext = os.path.splitext(upload.filename)
@ -1869,7 +1872,8 @@ def perform_manual_upload_subtitle():
title=title,
scene_name=sceneName,
media_type='series',
subtitle=upload)
subtitle=upload,
audio_language=audio_language))
if result is not None:
message = result[0]
@ -1995,6 +1999,9 @@ def perform_manual_upload_subtitle_movie():
upload = request.files.get('upload')
radarrId = request.forms.get('radarrId')
title = request.forms.get('title')
data = database.execute("SELECT audio_language FROM table_movies WHERE radarrId=?", (radarrId,), only_one=True)
audio_language = data['audio_language']
_, ext = os.path.splitext(upload.filename)
@ -2008,7 +2015,8 @@ def perform_manual_upload_subtitle_movie():
title=title,
scene_name=sceneName,
media_type='movie',
subtitle=upload)
subtitle=upload,
audio_language=audio_language)
if result is not None:
message = result[0]