Kodi Community Forum

Full Version: [QUESTION] Watched/Unwatched
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on adding the whole watched/unwatched stuff to the Xperience and just noticed that the overlay is still visible on videos played already.

Currently our code is as such:

Code:
<control type="image">
            <posx>656</posx>
            <posy>100</posy>
            <width>70</width>
            <height>70</height>
            <info>ListItem.Overlay</info>
            <visible>!IsEmpty(ListItem.Overlay)</visible>
            <texture>views\list\Other\new.png</texture>
         </control>
This is in the movies library if anyone is curious, oh and
Code:
IsEmpty(ListItem.Overlay)
doesnt seem to show anything.

Any help would be great!
ListItem.Overlay is the image.

Thus, it'll either be Watched.png or Unwatched.png or whatever they are. It won't be empty.

Cheers,
Jonathan
jmarshall Wrote:ListItem.Overlay is the image.

Thus, it'll either be Watched.png or Unwatched.png or whatever they are. It won't be empty.

Cheers,
Jonathan

OK great, keeping in mind I'm not much for coding
Code:
<visible>!$INFO(ListItem.Overlay)</visible>
            <texture>views\list\Other\new.png</texture>

Doesn't seem to like me either ....
Also tried searching came across this and none of this is working for me either
http://forum.xbmc.org/showthread.php?tid...em.overlay
OK this was a bit more simpler than i thought.

I moved the texture to the main media folder renamed it to OverlayUnWatched.png and used the following code:
Code:
<texture>$INFO
[ListItem.Overlay]</texture>

All is well now.
Why not just make the OverlayWatched.png or whatever it is the image you want?

That's what listitem.overlay returns, so no need for vis conditions.

EDIT: I see you figured that out for yourself Smile
Thanks anyways Jonathan!

Cheers.
Sorry to resurrect such an old thread but I was wondering: what should we do if we wanted to have two separate watched / unwatched overlay images? One for text lists and one for poster lists. It'd be really great to have something like ListItem.IsWatched to accommodate this.

Edit: Sorry again, figured out a workaround using the following code:

Code:
<control type="image">
    <description>Overlay</description>
    <posx>380</posx>
    <posy>6</posy>
    <width>23</width>
    <height>23</height>
    <texture>overlaywatched-list.png</texture>
    <visible>Substring(ListItem.Overlay,Watched.png) + !Substring(ListItem.Overlay,Unwatched.png)</visible>
</control>
Sranshaft Wrote:Sorry to resurrect such an old thread but I was wondering: what should we do if we wanted to have two separate watched / unwatched overlay images? One for text lists and one for poster lists. It'd be really great to have something like ListItem.IsWatched to accommodate this.

Edit: Sorry again, figured out a workaround using the following code:

Code:
<control type="image">
    <description>Overlay</description>
    <posx>380</posx>
    <posy>6</posy>
    <width>23</width>
    <height>23</height>
    <texture>overlaywatched-list.png</texture>
    <visible>Substring(ListItem.Overlay,Watched.png) + !Substring(ListItem.Overlay,Unwatched.png)</visible>
</control>
This is where you use two different Unwatched.png and Watched.png and the second couple of packs in a subfolder.

use UnWatched.png and Watched.png in the List folder:
Code:
<control type="image">
    <description>Overlay</description>
    <posx>380</posx>
    <posy>6</posy>
    <width>23</width>
    <height>23</height>
    <texture>[b][color=black]List/[/color][/b]$INFO
[ListItem.Overlay]</texture>
</control>

use UnWatched.png and Watched.png in the Panel folder:
Code:
<control type="image">
     <description>Overlay</description>
     <posx>380</posx>
     <posy>6</posy>
     <width>23</width>
     <height>23</height>
     <texture>[b]Panel/[/b]$INFO
[ListItem.Overlay]</texture>
</control>

This should work.