diff --git a/couchpotato/core/media/movie/_base/static/movie.js b/couchpotato/core/media/movie/_base/static/movie.js index a251e79..86205ef 100644 --- a/couchpotato/core/media/movie/_base/static/movie.js +++ b/couchpotato/core/media/movie/_base/static/movie.js @@ -250,9 +250,9 @@ var Movie = new Class({ getUnprefixedTitle: function(t){ if(t.substr(0, 4).toLowerCase() == 'the ') t = t.substr(4) + ', The'; - if(t.substr(0, 3).toLowerCase() == 'an ') + else if(t.substr(0, 3).toLowerCase() == 'an ') t = t.substr(3) + ', An'; - if(t.substr(0, 2).toLowerCase() == 'a ') + else if(t.substr(0, 2).toLowerCase() == 'a ') t = t.substr(2) + ', A'; return t; }, diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index 1fd4fed..5f2d402 100644 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -292,7 +292,8 @@ class Renamer(Plugin): name_the = movie_name for prefix in ['the ', 'an ', 'a ']: if prefix == movie_name[:len(prefix)].lower(): - name_the = movie_name[len(prefix):] + ', ' + prefix.strip().capitalize() + name_the = movie_name[len(prefix):] + ', ' + prefix.strip().capitalize() + break replacements = { 'ext': 'mkv',