Skip to content

Commit

Permalink
Add imdb rating overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
FlixtorMe committed Aug 28, 2014
1 parent 14db464 commit 4e9d394
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion frames/movies.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
}
}
});

});
</script>

Expand Down Expand Up @@ -275,6 +276,7 @@
$('#title' ).empty();
$('#genres').empty();
$('#rating').css('width', '0% !important');
$('#rating').attr('title', '');
$('#plot').empty();
$('#runtime').empty();
$('#runtime').append('<span class="glyphicon glyphicon-time"></span>&nbsp;&nbsp');
Expand Down Expand Up @@ -319,6 +321,7 @@

$("#title").html(movie.title);
$("#rating").attr("style", "width:" + (movie.rating * 10) + "% !important");
$("#rating").attr("title", movie.rating+"/10");
$("#date").append(movie.movieYear);

if (typeof movie.overview !== 'undefined') {
Expand Down Expand Up @@ -629,7 +632,7 @@
<h1 id="title"></h1>
<h4 id="genres" class="mr-10" style="display:inline-block;"></h4>
<div class="stars-template" style="display:inline-block;">
<div id="rating" class="current-rating"></div>
<label title="" id="rating" class="current-rating"></label>
</div>
<div id="plot" class="ptb-10" style="max-width:800px;"></div>
<div class="ptb-10">
Expand Down
7 changes: 5 additions & 2 deletions frames/series.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
$('#title' ).empty();
$('#genres').empty();
$('#rating').css('width', '0% !important');
$('#rating').attr('title', '');
$('#plot').empty();
$('#network').empty();
$('#runtime').empty();
Expand Down Expand Up @@ -347,7 +348,9 @@
$("#network").addClass("hide");
}

$("#rating").attr("style", "width:" + serie.rating.percentages + "% !important");
console.log(serie.rating.percentage)
$("#rating").attr("style", "width:" + serie.rating.percentage + "% !important");
$("#rating").attr("title", (0.1*serie.rating.percentage)+"/10");

$("#btnBuy").click(function () {
var shoppingUrl = 'https://www.google.com/search?q='+serie.title+' series/season&tbm=shop';
Expand Down Expand Up @@ -614,7 +617,7 @@
<h1 id="title"></h1>
<h4 id="genres" class="mr-10" style="display:inline-block;"></h4>
<div class="stars-template" style="display:inline-block;">
<div id="rating" class="current-rating"></div>
<div title="" id="rating" class="current-rating"></div>
</div>
<div id="plot" class="ptb-10" style="max-width:800px;"></div>
<div id="network">This serie is aired on </div>
Expand Down

0 comments on commit 4e9d394

Please sign in to comment.