Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
✨ Support for letterboxd movie ratings and metacrtiic tvshow ratings …
Browse files Browse the repository at this point in the history
…from mdblist
  • Loading branch information
jurialmunkey committed Mar 25, 2023
1 parent 6fe858d commit 1f0cc3f
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 26 deletions.
36 changes: 24 additions & 12 deletions 1080i/Includes_Info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1069,60 +1069,76 @@
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableMetacritic)</param>
<param name="include_condition">!Skin.HasSetting(Ratings.DisableMetacritic) | Skin.HasSetting(Ratings.EnableMetacritic.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/metacritic.png</param>
<param name="label">Container(99950).ListItem.Property(MetaCritic_Rating)</param>
<param name="label_fallback">−−</param>
<param name="label_suffix">% </param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[metacritic]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableMetacritic)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + Skin.HasSetting(Ratings.EnableMetacritic.TVShows)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableTrakt)</param>
<param name="include_condition">!Skin.HasSetting(Ratings.DisableTrakt) | !Skin.HasSetting(Ratings.DisableTrakt.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/trakt.png</param>
<param name="label">Container(99950).ListItem.Property(Trakt_Rating)</param>
<param name="label_fallback">−.−</param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[trakt]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableTrakt)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + !Skin.HasSetting(Ratings.DisableTrakt.TVShows)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableTMDB)</param>
<param name="include_condition">!Skin.HasSetting(Ratings.DisableTMDB) | !Skin.HasSetting(Ratings.DisableTMDB.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/tmdb.png</param>
<param name="label">Container(99950).ListItem.Property(TMDb_Rating)</param>
<param name="label_fallback">−.−</param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[tmdb]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableTMDB)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + !Skin.HasSetting(Ratings.DisableTMDB.TVShows)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableRottenTomatoesCritic)</param>
<param name="include_condition">Skin.HasSetting(Ratings.EnableLetterBoxd)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/letterboxd.png</param>
<param name="label">Container(99950).ListItem.Property(letterboxd_rating)</param>
<param name="label_fallback">−.−</param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[rottentomatoes]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + Skin.HasSetting(Ratings.EnableLetterBoxd)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableRottenTomatoesCritic) | Skin.HasSetting(Ratings.EnableRottenTomatoesCritic.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/$VAR[Image_$PARAM[tmdbtype]_RottenTomatoes]</param>
<param name="label">Container(99950).ListItem.Property(RottenTomatoes_Rating)</param>
<param name="label_fallback">−−</param>
<param name="label_suffix">% </param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[rottentomatoes]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableRottenTomatoesCritic)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + Skin.HasSetting(Ratings.EnableRottenTomatoesCritic.TVShows)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableRottenTomatoesUser)</param>
<param name="include_condition">!Skin.HasSetting(Ratings.DisableRottenTomatoesUser) | Skin.HasSetting(Ratings.EnableRottenTomatoesUser.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/$VAR[Image_$PARAM[tmdbtype]_RottenTomatoes_UserMeter]</param>
<param name="label">Container(99950).ListItem.Property(RottenTomatoes_UserMeter)</param>
<param name="label_fallback">−−</param>
<param name="label_suffix">% </param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[usermeter]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableRottenTomatoesUser)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + Skin.HasSetting(Ratings.EnableRottenTomatoesUser.TVShows)]</visible>
</include>

<include content="Info_Ratings_Item">
<param name="include_condition">!Skin.HasSetting(Ratings.DisableIMDb)</param>
<param name="include_condition">!Skin.HasSetting(Ratings.DisableIMDb) | !Skin.HasSetting(Ratings.DisableIMDb.TVShows)</param>
<param name="colordiffuse">$PARAM[colordiffuse]</param>
<param name="icon">flags/$PARAM[directory]/ratings/imdb.png</param>
<param name="icon_top">1</param>
Expand All @@ -1131,6 +1147,7 @@
<param name="label_fallback">−.−</param>
<param name="is_autohide">Skin.HasSetting(Ratings.AutoHide)</param>
<visible>$PARAM[imdb]</visible>
<visible>[[String.IsEqual($PARAM[dbtype],movie)] + !Skin.HasSetting(Ratings.DisableIMDb)] | [[String.IsEqual($PARAM[dbtype],tvshow) | String.IsEqual($PARAM[dbtype],season) | String.IsEqual($PARAM[dbtype],episode) | $EXP[Exp_PVRWindows]] + !Skin.HasSetting(Ratings.DisableIMDb.TVShows)]</visible>
</include>
<include content="Object_Control" condition="!Skin.HasSetting(DisableIMDBRating) + !Skin.HasSetting(Ratings.DisableIMDbTop250)">
<param name="control" value="label" />
Expand Down Expand Up @@ -1844,12 +1861,7 @@
<param name="userrating" value="$PARAM[container]ListItem.UserRating" />
<param name="starrating" value="$PARAM[container]ListItem.Rating" />
<param name="star">![$PARAM[shortline]] + !$EXP[Exp_PVRWindows]</param>
<param name="rottentomatoes">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | $EXP[Exp_PVRWindows]]</param>
<param name="usermeter">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | $EXP[Exp_PVRWindows]]</param>
<param name="imdb">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | String.IsEqual($PARAM[container]ListItem.DBType,tvshow) | String.IsEqual($PARAM[container]ListItem.DBType,season) | String.IsEqual($PARAM[container]ListItem.DBType,episode) | $EXP[Exp_PVRWindows]]</param>
<param name="tmdb">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | String.IsEqual($PARAM[container]ListItem.DBType,tvshow) | String.IsEqual($PARAM[container]ListItem.DBType,season) | String.IsEqual($PARAM[container]ListItem.DBType,episode) | $EXP[Exp_PVRWindows]]</param>
<param name="trakt">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | String.IsEqual($PARAM[container]ListItem.DBType,tvshow) | String.IsEqual($PARAM[container]ListItem.DBType,season) | String.IsEqual($PARAM[container]ListItem.DBType,episode) | $EXP[Exp_PVRWindows]]</param>
<param name="metacritic">[String.IsEqual($PARAM[container]ListItem.DBType,movie) | $EXP[Exp_PVRWindows]]</param>
<param name="dbtype">$PARAM[container]ListItem.DBType</param>
<param name="oscars">[![$PARAM[shortline]] | String.IsEqual($PARAM[container]ListItem.DBType,movie)]</param>
<param name="top250">[![$PARAM[shortline]] + [String.IsEqual($PARAM[container]ListItem.DBType,movie) | String.IsEqual($PARAM[container]ListItem.DBType,tvshow) | $EXP[Exp_PVRWindows]]]</param>
<param name="releasestatus">[[[![$PARAM[shortline]] + String.IsEqual($PARAM[container]ListItem.DBType,movie) + !Skin.HasSetting(Ratings.DisableMovieRelease)] | [[String.IsEqual($PARAM[container]ListItem.DBType,tvshow) | String.IsEqual($PARAM[container]ListItem.DBType,season) | String.IsEqual($PARAM[container]ListItem.DBType,episode)] + !Skin.HasSetting(Ratings.DisableTvRelease)]]]</param>
Expand Down
85 changes: 71 additions & 14 deletions 1080i/Includes_Items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1626,47 +1626,103 @@
<onclick>Skin.ToggleSetting(Ratings.DisableMetacritic)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableMetacritic)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>Metacritic</label>
<label>Metacritic [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8022" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.EnableMetacritic.TVShows)</onclick>
<selected>Skin.HasSetting(Ratings.EnableMetacritic.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>Metacritic [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8003" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTrakt)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTrakt)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>Trakt</label>
<label>Trakt [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8023" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTrakt.TVShows)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTrakt.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>Trakt [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8004" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTMDB)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTMDB)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>TMDB</label>
<label>TMDB [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8024" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTMDB.TVShows)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTMDB.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>TMDB [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8030" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.EnableLetterBoxd)</onclick>
<selected>Skin.HasSetting(Ratings.EnableLetterBoxd)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>LetterBoxd [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8005" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableRottenTomatoesUser)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableRottenTomatoesUser)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>RottenTomatoes $LOCALIZE[31200]</label>
<label>RottenTomatoes $LOCALIZE[31200] [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8025" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.EnableRottenTomatoesUser.TVShows)</onclick>
<selected>Skin.HasSetting(Ratings.EnableRottenTomatoesUser.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>RottenTomatoes $LOCALIZE[31200] [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8006" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableRottenTomatoesCritic)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableRottenTomatoesCritic)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>RottenTomatoes $LOCALIZE[31201]</label>
<label>RottenTomatoes $LOCALIZE[31201] [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8026" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.EnableRottenTomatoesCritic.TVShows)</onclick>
<selected>Skin.HasSetting(Ratings.EnableRottenTomatoesCritic.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>RottenTomatoes $LOCALIZE[31201] [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8007" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableIMDb)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableIMDb)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>IMDb</label>
<label>IMDb [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8027" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableIMDb.TVShows)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableIMDb.TVShows)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>IMDb [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8008" />
Expand All @@ -1684,14 +1740,6 @@
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>$LOCALIZE[31064]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8011" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTvRelease)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTvRelease)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>$LOCALIZE[38081] [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8012" />
<param name="control" value="radiobutton" />
Expand All @@ -1700,6 +1748,15 @@
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>$LOCALIZE[38081] [LOWERCASE]$LOCALIZE[20342][/LOWERCASE]</label>
</include>
<include content="Dialog_Settings_Button">
<param name="id" value="8011" />
<param name="control" value="radiobutton" />
<onclick>Skin.ToggleSetting(Ratings.DisableTvRelease)</onclick>
<selected>!Skin.HasSetting(Ratings.DisableTvRelease)</selected>
<enable>!Skin.HasSetting(Ratings.HideAll)</enable>
<label>$LOCALIZE[38081] [LOWERCASE]$LOCALIZE[20343][/LOWERCASE]</label>
</include>

</include>


Expand Down

0 comments on commit 1f0cc3f

Please sign in to comment.