count titles in a smart playlist for $INFO
#1
hello, im customizing estuary a bit and would like to count titles in a smart playlist, also unwatched if possible otherwise I can make another playlist just for unwatched.
ive been told this is done in Aeon Nox 5 and I've been through the source for hours but cant really find anything.

Big thanks for any help
Reply
#2
Counting -> Container(ID).NumItems
http://kodi.wiki/view/InfoLabels#Container
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
oh thanks! but how can I make a .xsp into a container id? i dont seem to understand
Reply
#4
The playlist is just the source and it's already displayed by a container.

Code:
<control type="list" id="1234">
    ...
    <itemlayout>...</itemlayout>
    <focusedlayout> ....</focusedlayout>
    ...
    <content>special://PATH-TO-PLAYLIST</content>
</control>

http://kodi.wiki/view/Dynamic_List_Content
http://kodi.wiki/view/Special_protocol
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
ah, thank you!! Got it to work finally.

Just a (hopefully) last question,

while $INFO[Container(12345).NumItems works fine

$INFO[Container(12345).TotalWatched doesnt

any idea on that?Smile

THANK YOU again
Reply
#6
(2016-07-29, 11:31)marantz Wrote: ah, thank you!! Got it to work finally.

Just a (hopefully) last question,

while $INFO[Container(12345).NumItems works fine

$INFO[Container(12345).TotalWatched doesnt

any idea on that?Smile

THANK YOU again
I've had the same problem in the past. It sounds like you are making similar mods to estuary as I did.

http://forum.kodi.tv/showthread.php?tid=266154

I never got the watched portion working and had to make a "dummy list"

~Raze

Sent from my SM-G935W8
~Raze
Reply
#7
Just gave it a try and it seems that .TotalWatched and .TotalUnwatched only works in the videos window level (myvideonav.xml).
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#8
Yes, it's not working on Home as that's not a media window.
If you want to count smart playlists in Home window, you can use service.library.data.provider.
For example see in Nox:
https://github.com/BigNoid/Aeon-Nox/blob...#L520-L530
https://github.com/BigNoid/Aeon-Nox/blob...#L605-L610

$INFO[Container(9000).ListItem.Property(Path)] is the path to the smart playlist.
Reply
#9
ok thanks to al of you. I did like raze and made another playlist with playcount greater then 0.

it all works fine now!
thanks again guys
Reply
#10
using NumItems on a playlist with 350 titles takes almost 30s on a rpi2 though
Reply
#11
(2016-07-29, 14:43)marantz Wrote: using NumItems on a playlist with 350 titles takes almost 30s on a rpi2 though
Would the Service.library.data.provider be less resource intensive?

~Raze




Sent from my SM-G935W8
~Raze
Reply

Logout Mark Read Team Forum Stats Members Help
count titles in a smart playlist for $INFO0