Remove prefix in movie list

This commit is contained in:
Ruud
2012-02-28 00:31:23 +01:00
parent 4692326ad6
commit 841e67ad2b
@@ -115,12 +115,18 @@ var Movie = new Class({
}).pop()
if(title)
return title.title
return self.getUnprefixedTitle(title.title)
else if(titles.length > 0)
return titles[0].title
return self.getUnprefixedTitle(titles[0].title)
return 'Unknown movie'
},
getUnprefixedTitle: function(t){
if(t.substr(0, 4).toLowerCase() == 'the ')
t = t.substr(4) + ', The';
return t;
},
slide: function(direction, el){
var self = this;