Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Adding RottenTomatoes rating to Arctic Zephyr (legacy)
#1
Hey guys!

I'm running 'legacy' Arctic Zephyr on Kodi Leia.

I am trying to get RottenTomatoes ratings to show in the movies overview (by default it shows a numeric rating, and if applicable an IMDb 250 logo). I have taken a look at the code for that functionality, how Arctic Zephyr 2 and how Leia-MOD do it, and modified the legacy AZ accordingly. AZ2 uses the Skin Helper Service, which requires an OMDB API key (which I have, and activated a while ago). I have installed the add-on (the testing version, 1.1.24, with OMDB support) and inserted the API key into the settings.

Kodi log is here - I had to remove the VideoInfoScanner and CAddonSettings[metadata.universal] info messages since it would be too long otherwise, I don't think those matter for this issue.

I have added the following code in 1080i/SkinSettings.xml:

XML:

<control type="radiobutton" id="9279" description="RottenTomatoes Rating">
                   <width>1310</width>
                   <visible>ControlGroup(9100).HasFocus(9106)</visible>
                   <include>DefSettingsButton</include>
                   <label>31284</label>
                   <selected>Skin.HasSetting(furniture.rottentomatoesrating)</selected>
                   <onclick>Skin.ToggleSetting(furniture.rottentomatoesrating)</onclick>
</control>

And the following to 1080i/Includes_Furniture.xml, in three places (it seems the star ratings code, the IMDb Top 250 code etc. is in multiple of those as well; however, the icons or rating aren't showing up in the movie list or the movie info panel.
  • the Furniture_Hub_Flags include
  • the Furniture_Home_Flags include
  • the Furniture_Flags include
The code is mostly lifted from AZ2, but with the full SkinHelper calls like Leia-MOD uses them.


XML:

<control type="group">
                    <width>64</width>
                    <visible>String.IsEqual(Container(9500).ListItem.DBType,movie)</visible>
                    <visible>Skin.HasSetting(furniture.rottentomatoesrating)</visible>
                    <visible>!String.IsEmpty(Window(Home).Property(SkinHelper.ListItem.RottenTomatoes.Rating)) + Skin.HasSetting(furniture.rottentomatoesrating)</visible>
                    <control type="image">
                        <centertop>50%</centertop>
                        <width>64</width>
                        <height>64</height>
                        <texture colordiffuse="Dark1">flags/ratings/rtrotten.png</texture>
                        <visible>!Integer.IsGreater(Window(Home).Property(SkinHelper.ListItem.RottenTomatoes.Rating),59)</visible>
                    </control>
                    <control type="image">
                        <centertop>50%</centertop>
                        <width>64</width>
                        <height>64</height>
                        <texture colordiffuse="Dark1">flags/ratings/rtfresh.png</texture>
                        <visible>Integer.IsGreater(Window(Home).Property(SkinHelper.ListItem.RottenTomatoes.Rating),59)</visible>
                   </control>

                   <control type="label">
                        <left>-16</left>
                        <width min="48">auto</width>
                        <centertop>50%</centertop>
                        <height>64</height>
                        <align>left</align>
                        <aligny>center</aligny>
                        <label>$INFO[Window(Home).Property(SkinHelper.ListItem.RottenTomatoes.Rating), ,%   ]</label>
                        <textcolor>Dark1</textcolor>
                        <font>SmallBold</font>
                    </control>
            </control>

I can see the RottenTomatoes setting in the skin settings menu, and tick it (I'm not seeing anything in the Kodi log though, and debugging is set to loglevel 1; don't know if it should print anything). Ticking or unticking it doesn't make the RottenTomatoes info show up in the movie info (both the list of movies and the movie info panel you can open for a single movie). The texture paths check out (rtrotten.png and rtfresh.png are in media/flags/ratings/). I'm not seeing any errors in the Kodi log either (be they related to the Skin Helper Service or

I've installed Arctic Zephry 2, and there the RottenTomatoes rating shows up in the movie details screen when I keep the panel open for a bit (it doesn't show up immediately, behaviour which jurialmonkey confirmed in the AZ2 topic start). So there's no OMDB API key problem or anything.

Thank you!
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#2
Bumpty.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#3
Bump Smile
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#4
Try removing the <visible> conditions and check that the textures are actually showing where you expect them to show.

Also, why do you have this condition?
<visible>String.IsEqual(Container(9500).ListItem.DBType,movie)</visible>

Are you trying to add to a hub with this one? You will need to point skin helper to the correct container ID if that's the case.
See here: https://github.com/kodi-community-addons...Properties
Arctic Fuse 2 - Alpha now available. Support me on Ko-fi.
Reply
#5
Thanks @jurialmunkey - I had been looking at that container ID but unsure whether I needed to keep or change that... Once I remove that, the ratings and fresh/rotten tomato icons do show up! Rofl

They're overlapping, I have to look into that further.

Edit: solved that as well.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#6
(2020-01-29, 21:06).:B:. Wrote: Thanks @jurialmunkey - I had been looking at that container ID but unsure whether I needed to keep or change that... Once I remove that, the ratings and fresh/rotten tomato icons do show up! Rofl

They're overlapping, I have to look into that further.

Edit: solved that as well.

@.:B:. 

Can you report the code after your changes? I would really like to have it in this skin
Reply
#7
@hootie318 You can find the commits in my Github branch.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply

Logout Mark Read Team Forum Stats Members Help
Adding RottenTomatoes rating to Arctic Zephyr (legacy)0