From 571fac75b22c2e37655951cb2a2bc9c58548a8b3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 14 Nov 2010 14:05:52 -0500 Subject: [PATCH] Strip leading zeros from the season number when renaming episodes. --- web_frontend/tv_renamer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_frontend/tv_renamer.js b/web_frontend/tv_renamer.js index 823d8bb..45074e4 100644 --- a/web_frontend/tv_renamer.js +++ b/web_frontend/tv_renamer.js @@ -70,6 +70,10 @@ armadillo.TVRenamer.prototype.lookupHandler_ = function(e) { if (tags['Show Name'] && tags['Episode Info']) { var episode = tags['Episode Info'].split('^'); + // Strip off leading zeros from the season number. + while (episode[0].charAt(0) == '0') { + episode[0] = episode[0].substr(1); + } var name = tags['Show Name'] + ' - ' + episode[0] + ' - ' + episode[1]; this.rename_(name); } -- 2.43.5