Solved ListItem.Progress in video library
#1
As the title suggests. In the PVR we can use ListItem.Progress to display the part of the programme that has been played.

Any chance on having this functionality in the video library and video files as well?
Reply
#2
ListItem.PercentPlayed should work for you.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Never knew that existed Confused I see it's even in the wiki... shame on me Blush

Cheers!
Reply
#4
Pretty much does what I want, except marking an item as watched through the context menu will not adjust ListItem.PercentPlayed to 100% ?
Reply
#5
Right. ATM mark watched is just incrementing the playcount and updating the lastplayed field. I am not entirely sure if marking watched should also nuke the resume bookmark which is the base of PercentPlayed.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
I think I managed to achieve what I want by checking for the overlay icon first in the variable I am using (I want to change an icon based on the PercentPlayed):

PHP Code:
<variable name="media:Progress">
    <
value condition="StringCompare(ListItem.Overlay,OverlayWatched.png)">views/status/progress/100.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,0) + !IntegerGreaterThan(ListItem.PercentPlayed,10)">views/status/progress/00.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,10) + !IntegerGreaterThan(ListItem.PercentPlayed,20)">views/status/progress/10.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,20) + !IntegerGreaterThan(ListItem.PercentPlayed,30)">views/status/progress/20.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,30) + !IntegerGreaterThan(ListItem.PercentPlayed,40)">views/status/progress/30.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,40) + !IntegerGreaterThan(ListItem.PercentPlayed,50)">views/status/progress/40.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,50) + !IntegerGreaterThan(ListItem.PercentPlayed,60)">views/status/progress/50.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,60) + !IntegerGreaterThan(ListItem.PercentPlayed,70)">views/status/progress/60.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,70) + !IntegerGreaterThan(ListItem.PercentPlayed,80)">views/status/progress/70.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,80) + !IntegerGreaterThan(ListItem.PercentPlayed,90)">views/status/progress/80.png</value>
    <
value condition="IntegerGreaterThan(ListItem.PercentPlayed,90)">views/status/progress/90.png</value>
    <
value condition="!SubString(ListItem.Icon,Default)">views/status/progress/00.png</value>
</
variable

But it would make sense imo to have PercentPlayed mark as watched when at 100%. The whole ListItem.Overlay icon thing is a bit... ancient and convoluted Smile
Reply
#7
Personally I like to have playcount and in progress stay separated. For me these are two very different things.

@Jeroen: I think your code could be optimized a bit:

Code:
<variable name="media:Progress">
    <value condition="StringCompare(ListItem.Overlay,OverlayWatched.png)">views/status/progress/100.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,90)">views/status/progress/90.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,80)">views/status/progress/80.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,70)">views/status/progress/70.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,60)">views/status/progress/60.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,50)">views/status/progress/50.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,40)">views/status/progress/40.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,30)">views/status/progress/30.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,20)">views/status/progress/20.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,10)">views/status/progress/10.png</value>
    <value condition="IntegerGreaterThan(ListItem.PercentPlayed,0)">views/status/progress/00.png</value>
    <value condition="!SubString(ListItem.Icon,Default)">views/status/progress/00.png</value>
</variable>
Reply
#8
That's much cleaner yes, thanks Smile
Reply

Logout Mark Read Team Forum Stats Members Help
ListItem.Progress in video library0