(2021-03-19, 04:13)estuary_enthusiast Wrote: Hi, can you tell me what file is to edit? And can it also include metascore?
I scrape all the rating: imdb, tmdb, rotten and meta from TMM.
Sure, it's Includes_Object.xml.
TMM has changed the way it saves Rotten Tomatoes Rating, it's now stored as tomatometerallcritics in nfo-file.
For having rating as percent I use the following on top of the file (I found it in another skin):
xml:
<variable name="RottenTomatoesLabelVar">
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),10.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),10.)">10</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),9.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),9.)">9</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),8.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),8.)">8</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),7.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),7.)">7</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),6.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),6.)">6</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),5.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),5.)">5</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),4.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),4.)">4</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),3.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),3.)">3</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),2.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),2.)">2</value>
<value condition="String.StartsWith(ListItem.Rating(tomatometerallcritics),1.) | String.StartsWith(ListItem.Rating(tomatometerallcritics),1.)">1</value>
</variable>
<variable name="RottenTomatoesLabel2Var">
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.0) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.0)">0%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.9) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.9)">9%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.8) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.8)">8%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.7) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.7)">7%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.6) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.6)">6%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.5) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.5)">5%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.4) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.4)">4%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.3) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.3)">3%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.2) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.2)">2%</value>
<value condition="String.EndsWith(ListItem.Rating(tomatometerallcritics),.1) | String.EndsWith(ListItem.Rating(tomatometerallcritics),.1)">1%</value>
</variable>
<variable name="MetascoreLabelVar">
<value condition="String.StartsWith(ListItem.Rating(metacritic),10.) | String.StartsWith(ListItem.Rating(metacritic),10.)">10</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),9.) | String.StartsWith(ListItem.Rating(metacritic),9.)">9</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),8.) | String.StartsWith(ListItem.Rating(metacritic),8.)">8</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),7.) | String.StartsWith(ListItem.Rating(metacritic),7.)">7</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),6.) | String.StartsWith(ListItem.Rating(metacritic),6.)">6</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),5.) | String.StartsWith(ListItem.Rating(metacritic),5.)">5</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),4.) | String.StartsWith(ListItem.Rating(metacritic),4.)">4</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),3.) | String.StartsWith(ListItem.Rating(metacritic),3.)">3</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),2.) | String.StartsWith(ListItem.Rating(metacritic),2.)">2</value>
<value condition="String.StartsWith(ListItem.Rating(metacritic),1.) | String.StartsWith(ListItem.Rating(metacritic),1.)">1</value>
</variable>
<variable name="MetascoreLabel2Var">
<value condition="String.EndsWith(ListItem.Rating(metacritic),.0) | String.EndsWith(ListItem.Rating(metacritic),.0)">0%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.9) | String.EndsWith(ListItem.Rating(metacritic),.9)">9%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.8) | String.EndsWith(ListItem.Rating(metacritic),.8)">8%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.7) | String.EndsWith(ListItem.Rating(metacritic),.7)">7%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.6) | String.EndsWith(ListItem.Rating(metacritic),.6)">6%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.5) | String.EndsWith(ListItem.Rating(metacritic),.5)">5%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.4) | String.EndsWith(ListItem.Rating(metacritic),.4)">4%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.3) | String.EndsWith(ListItem.Rating(metacritic),.3)">3%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.2) | String.EndsWith(ListItem.Rating(metacritic),.2)">2%</value>
<value condition="String.EndsWith(ListItem.Rating(metacritic),.1) | String.EndsWith(ListItem.Rating(metacritic),.1)">1%</value>
</variable>
and then to display the rating something like this:
xml:
<control type="label">
<textcolor>main_fg_70</textcolor>
<top>2</top>
<width>auto</width>
<height>28</height>
<align>right</align>
<font>font_tiny</font>
<label>$VAR[RottenTomatoesLabelVar]$VAR[RottenTomatoesLabel2Var]</label>
<visible>!String.IsEmpty(ListItem.Rating(tomatometerallcritics))</visible>
</control>