|
|
@ -1,6 +1,6 @@
|
|
|
|
# coding=utf-8
|
|
|
|
# coding=utf-8
|
|
|
|
|
|
|
|
|
|
|
|
bazarr_version = '0.8.4'
|
|
|
|
bazarr_version = '0.8.4.1'
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
os.environ["SZ_USER_AGENT"] = "Bazarr/1"
|
|
|
|
os.environ["SZ_USER_AGENT"] = "Bazarr/1"
|
|
|
@ -1749,9 +1749,9 @@ def execute_task(taskid):
|
|
|
|
@custom_auth_basic(check_credentials)
|
|
|
|
@custom_auth_basic(check_credentials)
|
|
|
|
def remove_subtitles():
|
|
|
|
def remove_subtitles():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
episodePath = request.forms.get('episodePath')
|
|
|
|
episodePath = request.forms.episodePath
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
subtitlesPath = request.forms.get('subtitlesPath')
|
|
|
|
subtitlesPath = request.forms.subtitlesPath
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
|
|
|
|
|
|
|
@ -1768,9 +1768,9 @@ def remove_subtitles():
|
|
|
|
@custom_auth_basic(check_credentials)
|
|
|
|
@custom_auth_basic(check_credentials)
|
|
|
|
def remove_subtitles_movie():
|
|
|
|
def remove_subtitles_movie():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
moviePath = request.forms.get('moviePath')
|
|
|
|
moviePath = request.forms.moviePath
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
subtitlesPath = request.forms.get('subtitlesPath')
|
|
|
|
subtitlesPath = request.forms.subtitlesPath
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -1788,14 +1788,14 @@ def get_subtitle():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
episodePath = request.forms.get('episodePath')
|
|
|
|
episodePath = request.forms.episodePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
@ -1823,12 +1823,12 @@ def get_subtitle():
|
|
|
|
def manual_search_json():
|
|
|
|
def manual_search_json():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
|
|
|
|
|
|
|
|
episodePath = request.forms.get('episodePath')
|
|
|
|
episodePath = request.forms.episodePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
@ -1843,16 +1843,16 @@ def manual_get_subtitle():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
episodePath = request.forms.get('episodePath')
|
|
|
|
episodePath = request.forms.episodePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
selected_provider = request.forms.get('provider')
|
|
|
|
selected_provider = request.forms.get('provider')
|
|
|
|
subtitle = request.forms.get('subtitle')
|
|
|
|
subtitle = request.forms.subtitle
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
|
|
|
|
|
|
|
@ -1881,14 +1881,14 @@ def perform_manual_upload_subtitle():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
episodePath = request.forms.get('episodePath')
|
|
|
|
episodePath = request.forms.episodePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
forced = True if request.forms.get('forced') == '1' else False
|
|
|
|
forced = True if request.forms.get('forced') == '1' else False
|
|
|
|
upload = request.files.get('upload')
|
|
|
|
upload = request.files.get('upload')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrSeriesId = request.forms.get('sonarrSeriesId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
_, ext = os.path.splitext(upload.filename)
|
|
|
|
_, ext = os.path.splitext(upload.filename)
|
|
|
|
|
|
|
|
|
|
|
@ -1925,13 +1925,13 @@ def get_subtitle_movie():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
moviePath = request.forms.get('moviePath')
|
|
|
|
moviePath = request.forms.moviePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
@ -1959,12 +1959,12 @@ def get_subtitle_movie():
|
|
|
|
def manual_search_movie_json():
|
|
|
|
def manual_search_movie_json():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
|
|
|
|
|
|
|
|
moviePath = request.forms.get('moviePath')
|
|
|
|
moviePath = request.forms.moviePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_list = get_providers()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
@ -1979,15 +1979,15 @@ def manual_get_subtitle_movie():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
moviePath = request.forms.get('moviePath')
|
|
|
|
moviePath = request.forms.moviePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
hi = request.forms.get('hi')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
forced = request.forms.get('forced')
|
|
|
|
selected_provider = request.forms.get('provider')
|
|
|
|
selected_provider = request.forms.provider
|
|
|
|
subtitle = request.forms.get('subtitle')
|
|
|
|
subtitle = request.forms.subtitle
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
providers_auth = get_providers_auth()
|
|
|
|
|
|
|
|
|
|
|
@ -2015,13 +2015,13 @@ def perform_manual_upload_subtitle_movie():
|
|
|
|
authorize()
|
|
|
|
authorize()
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
ref = request.environ['HTTP_REFERER']
|
|
|
|
|
|
|
|
|
|
|
|
moviePath = request.forms.get('moviePath')
|
|
|
|
moviePath = request.forms.moviePath
|
|
|
|
sceneName = request.forms.get('sceneName')
|
|
|
|
sceneName = request.forms.sceneName
|
|
|
|
language = request.forms.get('language')
|
|
|
|
language = request.forms.get('language')
|
|
|
|
forced = True if request.forms.get('forced') == '1' else False
|
|
|
|
forced = True if request.forms.get('forced') == '1' else False
|
|
|
|
upload = request.files.get('upload')
|
|
|
|
upload = request.files.get('upload')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
radarrId = request.forms.get('radarrId')
|
|
|
|
title = request.forms.get('title')
|
|
|
|
title = request.forms.title
|
|
|
|
|
|
|
|
|
|
|
|
_, ext = os.path.splitext(upload.filename)
|
|
|
|
_, ext = os.path.splitext(upload.filename)
|
|
|
|
|
|
|
|
|
|
|
|