Help for Watched / Unwatched in Container
#1
Hi everyone.

I have a problem to show watched / unwatched indicator in Container.

My container have ID 300.

Container(300).ListItem.IsResumable is working

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/resume.png</texture>
<visible>Container(300).ListItem.IsResumable</visible>
</control>

But Watched and unwatched not working

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/watched.png</texture>
<visible>stringcompare(Container(300).ListItem.Overlay,OverlayWatched.png)</visible>
</control>

<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/unwatched.png</texture>
<visible>stringcompare(Container(300).ListItem.Overlay,OverlayUnwatched.png)</visible>
</control>


This my variable :

Code:
<variable name="PercentWatched300">
        <value condition="[SubString(Container(300).ListItem.Overlay,OverlayUnwatched.png) + [[Container.Content(movies) + [StringCompare(Window(Home).Property(LatestMovie.1.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.2.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.3.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.4.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.5.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.6.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.7.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.8.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.9.Title),Container(300).ListItem.Label) | StringCompare(Window(Home).Property(LatestMovie.10.Title),Container(300).ListItem.Label)]] | [[Container.Content(tvshows)] + [StringCompare(Window(Home).Property(LatestEpisode.1.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.2.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.3.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.4.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.5.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.6.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.7.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.8.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.9.ShowTitle),Container(300).ListItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.10.ShowTitle),Container(300).ListItem.TvShowTitle)]] | [Container.Content(episodes) + [StringCompare(Window(Home).Property(LatestEpisode.1.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.2.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.3.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.4.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.5.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.6.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.7.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.8.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.9.EpisodeTitle),Container(300).ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.10.EpisodeTitle),Container(300).ListItem.Title)]]]]">indicator/new.png</value>
        <value condition="Container(300).ListItem.IsResumable">indicator/resume.png</value>
        <value condition="stringcompare(Container(300).ListItem.Overlay,OverlayWatched.png)">indicator/watched.png</value>
        <value condition="stringcompare(Container(300).ListItem.Overlay,OverlayUnwatched.png)">indicator/unwatched.png</value>
    </variable>

Thanks
 Estuary MOD V2 
Reply
#2
Hi,

I am probably not as experienced as you, and you likely know this; But why not use just the ListItem.PlayCount to check for watched?
Reply
#3
Code seems to be fine to me. Not sure what the VAR is for since it's not used in your controls. One "possible" thing I have in mind is the case sensitivity with pictures names. Maybe check if you haven't "Watched.png" or "UnWatched.png" ?
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#4
Yes I use VAR in my controls code.

I have not set here to test it and for to send us my problem with more clarity.

For me my code looks fine but not working for stringcompare(Container(300).ListItem.Overlay,OverlayUnwatched.png) and stringcompare(Container(300).ListItem.Overlay,OverlayWatched.png)
 Estuary MOD V2 
Reply
#5
More code could give more details then.
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#6
(2015-10-14, 16:51)Torben Wrote: Hi,

I am probably not as experienced as you, and you likely know this; But why not use just the ListItem.PlayCount to check for watched?

ListItem.PlayCount it's show number of play count. Not what I want.
 Estuary MOD V2 
Reply
#7
(2015-10-14, 20:22)Jayz2K Wrote: More code could give more details then.


My correct code is :

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">$VAR[PercentWatched300]</texture>
</control>

with variable :

Code:
<variable name="PercentWatched300">
<value condition="[SubString(Container(300).ListItem.Overlay,OverlayUnwatched.png) + [[Container.Content(movies) + [StringCompare(Window(Home).Property(LatestMovie.1.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.2.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.3.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.4.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.5.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.6.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.7.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.8.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.9.Title),Container(300).ListItem​.Label) | StringCompare(Window(Home).Property(LatestMovie.10.Title),Container(300).ListIte​m.Label)]] | [[Container.Content(tvshows)] + [StringCompare(Window(Home).Property(LatestEpisode.1.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.2.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.3.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.4.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.5.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.6.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.7.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.8.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.9.ShowTitle),Container(300).Li​stItem.TvShowTitle) | StringCompare(Window(Home).Property(LatestEpisode.10.ShowTitle),Container(300).L​istItem.TvShowTitle)]] | [Container.Content(episodes) + [StringCompare(Window(Home).Property(LatestEpisode.1.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.2.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.3.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.4.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.5.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.6.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.7.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.8.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.9.EpisodeTitle),Container(300)​.ListItem.Title) | StringCompare(Window(Home).Property(LatestEpisode.10.EpisodeTitle),Container(300​).ListItem.Title)]]]]">indicator/new.png</value>
<value condition="Container(300).ListItem.IsResumable">indicator/resume.png</value>
<value condition="stringcompare(Container(300).ListItem.Overlay,OverlayWatched.png)">indicator/watched.png</value>
<value condition="stringcompare(Container(300).ListItem.Overlay,OverlayUnwatched.png)">indicator/unwatched.png</value>
</variable>

Just the condition Container(300).ListItem.IsResumable working
stringcompare and substring not working.
 Estuary MOD V2 
Reply
#8
Just figured it out but if the image control is inside a Container, why are you using the Container(ID) as prefix and not just :

StringCompare(ListItem.Overlay,OverlayWatched.png) ?

If you precise the Container(ID) as infolabels prefix in that same Container, it fails most of the time.
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#9
... but I'm astonished then it works like this with ListItem.IsResumable ... ?
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#10
If I don't use Container(300) for ListItem.IsResumable, it's not working. So I think it's necessary.

Only working with Container(300), why not others ?

I don't understand Sad
 Estuary MOD V2 
Reply
#11
Have you a way to upload the complete code ?
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#12
In my description. My mod of arctic zephyr.

https://drive.google.com/file/d/0BxrzR2L...sp=sharing

In Includes_Home.xml



My variable "PercentWatched300" not present in "Includes_Images.xml" for now.


In fact I want to show indicators on poster of widgets (container 300)
 Estuary MOD V2 
Reply
#13
(2015-10-14, 22:20)Guilouz Wrote: In my description. My mod of arctic zephyr.

https://drive.google.com/file/d/0BxrzR2L...sp=sharing

In Includes_Home.xml



My variable "PercentWatched300" not present in "Includes_Images.xml" for now.


In fact I want to show indicators on poster of widgets (container 300)
With a quick check of the code :

ID 300 = Main menu
ID 301 = Widget
ID 302 = Submenu

Seems that you're trying to get the overlay infolabel from the 300 Home menu while widget items are in 301. You have to remove all the wrong Container(300) prefix in your VAR values AND if you want then ListItem.IsResumable to show without prefix, remove the visibility condition in Includes_Home.xml :

<visible>StringCompare(ListItem.Overlay,OverlayWatched.png)</visible>

You have double conditions in VAR and Control. You maybe are trying to display a resumable item while it's hidden because not watched.

Edit : Not Tested but that's what I understand at this "late" moment
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#14
I test this and not working :

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/checkmark.png</texture>
<visible>StringCompare(ListItem.Overlay,OverlayWatched.png)</visible>
</control>

Not working :

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/checkmark.png</texture>
<visible>StringCompare(Container(301).ListItem.Overlay,OverlayWatched.png)</visible>
</control>

Only ListItem.IsResumable is working

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/inprogress.png</texture>
<visible>ListItem.IsResumable</visible>
</control>

Working too :

Code:
<control type="image">
<centerright>32</centerright>
<centertop>32</centertop>
<width>32</width>
<height>32</height>
<aspectratio aligny="top">keep</aspectratio>
<texture colordiffuse="$VAR[ColorHighlight]">indicator/inprogress.png</texture>
<visible>Container(300).ListItem.IsResumable</visible>
</control>

Same problem...
 Estuary MOD V2 
Reply

Logout Mark Read Team Forum Stats Members Help
Help for Watched / Unwatched in Container0