diff --git a/bazarr/api.py b/bazarr/api.py index 6ad28c5d9..55659871a 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -554,7 +554,11 @@ class SubtitleNameInfo(Resource): def get(self): name = request.args.get('filename') if name is not None: - result = guessit(name, options=None) + opts = dict() + opts['type'] = 'episode' + result = guessit(name, options=opts) + if 'subtitle_language' in result: + result['subtitle_language'] = str(result['subtitle_language']) return jsonify(data=result) else: return '', 400 diff --git a/views/episodes.html b/views/episodes.html index 37a2e40a6..d972bfad7 100644 --- a/views/episodes.html +++ b/views/episodes.html @@ -224,7 +224,7 @@