From 77bb806a01c8754de4066918220c8736297cf95f Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 14 Mar 2020 12:07:21 -0700 Subject: [PATCH] Add IMDb and Rotten Tomatos rating to info page --- data/interfaces/default/css/tautulli.css | 38 ++++++++++++++++++- .../interfaces/default/images/rating/imdb.svg | 1 + .../default/images/rating/popcorn-spilled.svg | 8 ++++ .../default/images/rating/popcorn-upright.svg | 1 + .../default/images/rating/tomato-ripe.svg | 1 + .../default/images/rating/tomato-rotten.svg | 1 + data/interfaces/default/info.html | 30 ++++++++++----- 7 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 data/interfaces/default/images/rating/imdb.svg create mode 100644 data/interfaces/default/images/rating/popcorn-spilled.svg create mode 100644 data/interfaces/default/images/rating/popcorn-upright.svg create mode 100644 data/interfaces/default/images/rating/tomato-ripe.svg create mode 100644 data/interfaces/default/images/rating/tomato-rotten.svg diff --git a/data/interfaces/default/css/tautulli.css b/data/interfaces/default/css/tautulli.css index b5d1cd05..a3865497 100644 --- a/data/interfaces/default/css/tautulli.css +++ b/data/interfaces/default/css/tautulli.css @@ -1921,6 +1921,16 @@ a:hover .summary-poster-face-track .summary-poster-face-overlay span { margin-left: 2px; color: #999; } +.critic-rating { + display: inline-block; + font-size: 14px; + overflow: hidden; + white-space: nowrap; + margin-top: 2px; + height: 20px; + line-height: 20px; + float: right; +} .children-list, .search-results-list { position: relative; @@ -4021,7 +4031,33 @@ a:hover .overlay-refresh-image:hover { .stats-most_concurrent { background-image: url(../images/icons/most-concurrent-streams.svg); } - +.rating-image { + width: 51px; + height: 20px; + margin-left: 10px; + display: inline-block; + background-origin: content-box !important; + background-size: contain !important; + background-repeat: no-repeat !important; + background-position: left !important; + text-align: right; +} +.rating-imdb { + width: 62px !important; + background-image: url(../images/rating/imdb.svg); +} +.rating-rottentomatos-ripe { + background-image: url(../images/rating/tomato-ripe.svg); +} +.rating-rottentomatos-rotten { + background-image: url(../images/rating/tomato-rotten.svg); +} +.rating-rottentomatos-upright { + background-image: url(../images/rating/popcorn-upright.svg); +} +.rating-rottentomatos-spilled { + background-image: url(../images/rating/popcorn-spilled.svg); +} .transparent { background-color: transparent !important; } diff --git a/data/interfaces/default/images/rating/imdb.svg b/data/interfaces/default/images/rating/imdb.svg new file mode 100644 index 00000000..f1dd35ee --- /dev/null +++ b/data/interfaces/default/images/rating/imdb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/data/interfaces/default/images/rating/popcorn-spilled.svg b/data/interfaces/default/images/rating/popcorn-spilled.svg new file mode 100644 index 00000000..73a06ab2 --- /dev/null +++ b/data/interfaces/default/images/rating/popcorn-spilled.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/data/interfaces/default/images/rating/popcorn-upright.svg b/data/interfaces/default/images/rating/popcorn-upright.svg new file mode 100644 index 00000000..603490a9 --- /dev/null +++ b/data/interfaces/default/images/rating/popcorn-upright.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/data/interfaces/default/images/rating/tomato-ripe.svg b/data/interfaces/default/images/rating/tomato-ripe.svg new file mode 100644 index 00000000..c8da285e --- /dev/null +++ b/data/interfaces/default/images/rating/tomato-ripe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/data/interfaces/default/images/rating/tomato-rotten.svg b/data/interfaces/default/images/rating/tomato-rotten.svg new file mode 100644 index 00000000..7401427c --- /dev/null +++ b/data/interfaces/default/images/rating/tomato-rotten.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html index 74a57262..26268e41 100644 --- a/data/interfaces/default/info.html +++ b/data/interfaces/default/info.html @@ -41,7 +41,7 @@ DOCUMENTATION :: END from plexpy import notifiers from plexpy.common import MEDIA_TYPE_HEADERS, MEDIA_FLAGS_AUDIO, MEDIA_FLAGS_VIDEO - from plexpy.helpers import page + from plexpy.helpers import page, get_percent # Get audio codec file def af(codec): @@ -269,16 +269,28 @@ DOCUMENTATION :: END
% if data['rating']: -