Browse Source

Show rating on charts also

old/redesign
Ruud 10 years ago
parent
commit
4e57311251
  1. 4
      couchpotato/core/media/movie/_base/static/movie.js
  2. 4
      couchpotato/static/scripts/combined.plugins.min.js

4
couchpotato/core/media/movie/_base/static/movie.js

@ -272,7 +272,7 @@ var Movie = new Class({
}
var rating, stars;
if(self.data.status == 'suggested' && self.data.info && self.data.info.rating && self.data.info.rating.imdb){
if(['suggested','chart'].indexOf(self.data.status) > -1 && self.data.info && self.data.info.rating && self.data.info.rating.imdb){
rating = self.data.info.rating.imdb;
stars = [];
@ -344,7 +344,7 @@ var Movie = new Class({
self.quality = new Element('div.quality'),
self.rating = rating ? new Element('div.rating[title='+rating[0]+']').adopt(
stars,
new Element('span.votes[text=('+rating[1]+')][title=Votes]')
new Element('span.votes[text=('+rating.join(' / ')+')][title=Votes]')
) : null
)
)

4
couchpotato/static/scripts/combined.plugins.min.js

@ -1962,7 +1962,7 @@ var Movie = new Class({
}
}
var rating, stars;
if (self.data.status == "suggested" && self.data.info && self.data.info.rating && self.data.info.rating.imdb) {
if ([ "suggested", "chart" ].indexOf(self.data.status) > -1 && self.data.info && self.data.info.rating && self.data.info.rating.imdb) {
rating = self.data.info.rating.imdb;
stars = [];
var half_rating = rating[0] / 2;
@ -2007,7 +2007,7 @@ var Movie = new Class({
})), self.eta = eta_date && now + 8035200 > eta ? new Element("div.eta", {
text: eta_date,
title: "ETA"
}) : null, self.quality = new Element("div.quality"), self.rating = rating ? new Element("div.rating[title=" + rating[0] + "]").adopt(stars, new Element("span.votes[text=(" + rating[1] + ")][title=Votes]")) : null)));
}) : null, self.quality = new Element("div.quality"), self.rating = rating ? new Element("div.rating[title=" + rating[0] + "]").adopt(stars, new Element("span.votes[text=(" + rating.join(" / ") + ")][title=Votes]")) : null)));
if (!self.thumbnail) self.el.addClass("no_thumbnail");
if (self.profile.data) self.profile.getTypes().each(function(type) {
var q = self.addQuality(type.get("quality"), type.get("3d"));

Loading…
Cancel
Save