From 38732ca47ed404c483f376672b3f01833441d8aa Mon Sep 17 00:00:00 2001 From: LASER-Yi Date: Sun, 27 Sep 2020 19:47:00 +0800 Subject: [PATCH] bug fixed and ui tweak --- bazarr/api.py | 6 +++++- views/episodes.html | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) 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 @@