no log: fixed last commit http code returned by API.

pull/1722/head
morpheus65535 3 years ago
parent 026eba9b13
commit fc48bbfdda

@ -62,7 +62,7 @@ class EpisodesBlacklist(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
media_path = episodeInfo['path'] media_path = episodeInfo['path']
subtitles_path = request.form.get('subtitles_path') subtitles_path = request.form.get('subtitles_path')

@ -37,7 +37,7 @@ class EpisodesSubtitles(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
title = episodeInfo['title'] title = episodeInfo['title']
episodePath = path_mappings.path_replace(episodeInfo['path']) episodePath = path_mappings.path_replace(episodeInfo['path'])
@ -96,7 +96,7 @@ class EpisodesSubtitles(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
title = episodeInfo['title'] title = episodeInfo['title']
episodePath = path_mappings.path_replace(episodeInfo['path']) episodePath = path_mappings.path_replace(episodeInfo['path'])
@ -162,7 +162,7 @@ class EpisodesSubtitles(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
episodePath = path_mappings.path_replace(episodeInfo['path']) episodePath = path_mappings.path_replace(episodeInfo['path'])

@ -58,7 +58,7 @@ class MoviesBlacklist(Resource):
data = TableMovies.select(TableMovies.path).where(TableMovies.radarrId == radarr_id).dicts().get_or_none() data = TableMovies.select(TableMovies.path).where(TableMovies.radarrId == radarr_id).dicts().get_or_none()
if not data: if not data:
return 'Movie not found', 501 return 'Movie not found', 500
media_path = data['path'] media_path = data['path']
subtitles_path = request.form.get('subtitles_path') subtitles_path = request.form.get('subtitles_path')

@ -37,7 +37,7 @@ class MoviesSubtitles(Resource):
.get_or_none() .get_or_none()
if not movieInfo: if not movieInfo:
return 'Movie not found', 501 return 'Movie not found', 500
moviePath = path_mappings.path_replace_movie(movieInfo['path']) moviePath = path_mappings.path_replace_movie(movieInfo['path'])
sceneName = movieInfo['sceneName'] or 'None' sceneName = movieInfo['sceneName'] or 'None'
@ -97,7 +97,7 @@ class MoviesSubtitles(Resource):
.get_or_none() .get_or_none()
if not movieInfo: if not movieInfo:
return 'Movie not found', 501 return 'Movie not found', 500
moviePath = path_mappings.path_replace_movie(movieInfo['path']) moviePath = path_mappings.path_replace_movie(movieInfo['path'])
sceneName = movieInfo['sceneName'] or 'None' sceneName = movieInfo['sceneName'] or 'None'
@ -159,7 +159,7 @@ class MoviesSubtitles(Resource):
.get_or_none() .get_or_none()
if not movieInfo: if not movieInfo:
return 'Movie not found', 501 return 'Movie not found', 500
moviePath = path_mappings.path_replace_movie(movieInfo['path']) moviePath = path_mappings.path_replace_movie(movieInfo['path'])

@ -30,7 +30,7 @@ class ProviderEpisodes(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
title = episodeInfo['title'] title = episodeInfo['title']
episodePath = path_mappings.path_replace(episodeInfo['path']) episodePath = path_mappings.path_replace(episodeInfo['path'])
@ -58,7 +58,7 @@ class ProviderEpisodes(Resource):
.get_or_none() .get_or_none()
if not episodeInfo: if not episodeInfo:
return 'Episode not found', 501 return 'Episode not found', 500
title = episodeInfo['title'] title = episodeInfo['title']
episodePath = path_mappings.path_replace(episodeInfo['path']) episodePath = path_mappings.path_replace(episodeInfo['path'])

@ -29,7 +29,7 @@ class ProviderMovies(Resource):
.get_or_none() .get_or_none()
if not movieInfo: if not movieInfo:
return 'Movie not found', 501 return 'Movie not found', 500
title = movieInfo['title'] title = movieInfo['title']
moviePath = path_mappings.path_replace_movie(movieInfo['path']) moviePath = path_mappings.path_replace_movie(movieInfo['path'])
@ -56,7 +56,7 @@ class ProviderMovies(Resource):
.get_or_none() .get_or_none()
if not movieInfo: if not movieInfo:
return 'Movie not found', 501 return 'Movie not found', 500
title = movieInfo['title'] title = movieInfo['title']
moviePath = path_mappings.path_replace_movie(movieInfo['path']) moviePath = path_mappings.path_replace_movie(movieInfo['path'])

@ -33,7 +33,7 @@ class Subtitles(Resource):
.get_or_none() .get_or_none()
if not metadata: if not metadata:
return 'Episode not found', 501 return 'Episode not found', 500
video_path = path_mappings.path_replace(metadata['path']) video_path = path_mappings.path_replace(metadata['path'])
else: else:
@ -41,7 +41,7 @@ class Subtitles(Resource):
metadata = TableMovies.select(TableMovies.path).where(TableMovies.radarrId == id).dicts().get_or_none() metadata = TableMovies.select(TableMovies.path).where(TableMovies.radarrId == id).dicts().get_or_none()
if not metadata: if not metadata:
return 'Movie not found', 501 return 'Movie not found', 500
video_path = path_mappings.path_replace_movie(metadata['path']) video_path = path_mappings.path_replace_movie(metadata['path'])

Loading…
Cancel
Save