Alternative to StringIsEqual boolean for non-focused panel items
#1
I've got a little animation that displays over an artist's or album's artwork in my music library when a song from that artist or album is playing. It works fine in most of my views. You can see it in the video below.

https://cl.ly/7b69c7df1948

As you can see at the end of the clip, it's not working for my panel view, the reason being that the visibility condition is based on a String.IsEqual boolean and those only work for focused items in panel views according to the Skinning Manual.

xml:
<visible>[Container.Content(artists) + String.IsEqual(ListItem($PARAM[position]).Artist,MusicPlayer.Artist)] | [Container.Content(albums) + String.IsEqual(ListItem($PARAM[position]).Album,MusicPlayer.Album)]</visible>

So the question I have is, does anyone know how I can identify in a panel view if a non-focused listitem matches what is currently playing in the music/video player?
Reply
#2
Do you have the complete code it doesn't seem to be in GitHub?
Reply
#3
(2020-03-09, 10:32)Hitcher Wrote: Do you have the complete code it doesn't seem to be in GitHub?

Hi, I'll push an update when I get to work. Thanks @Hitcher
Reply
#4
(2020-03-09, 10:50)QuizKid Wrote:
(2020-03-09, 10:32)Hitcher Wrote: Do you have the complete code it doesn't seem to be in GitHub?

Hi, I'll push an update when I get to work. Thanks @Hitcher 
Edit: I've updated the code here: https://github.com/realcopacetic/skin.copacetic
Reply
#5
ListItem.IsPlaying
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#6
(2020-03-09, 12:15)jurialmunkey Wrote: ListItem.IsPlaying

Thanks @jurialmunkey , for my panel view (Grid), it's more for a way of showing that the listitem that is playing belongs to that artist/album/tvshow/season that I'm struggling with.
Reply
#7
Ah, you're right. I though it worked for currently playing album but it appears that it doesn't.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
This works for me:
Code:
<visible>String.IsEqual(MusicPlayer.Album,ListItem.Album)</visible>

I think you just have to put the MusicPlayer label first for some reason.

Unfocused item "Hounds of Love" album is playing and has play indicator.
Image
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#9
(2020-03-09, 14:14)jurialmunkey Wrote: This works for me:
Code:
<visible>String.IsEqual(MusicPlayer.Album,ListItem.Album)</visible>

I think you just have to put the MusicPlayer label first for some reason.

Unfocused item "Hounds of Love" album is playing and has play indicator.
Image
Oh great thanks @jurialmunkey! It worked!! 

That's a strange one, who should I talk to about updating the manual? Might be worth adding a note that it can work for containers if you put the strings the other way around?
Reply
#10
(2020-03-09, 14:57)QuizKid Wrote:
(2020-03-09, 14:14)jurialmunkey Wrote: This works for me:
Code:
<visible>String.IsEqual(MusicPlayer.Album,ListItem.Album)</visible>

I think you just have to put the MusicPlayer label first for some reason.

Unfocused item "Hounds of Love" album is playing and has play indicator.
Image
Oh great thanks @jurialmunkey! It worked!! 

That's a strange one, who should I talk to about updating the manual? Might be worth adding a note that it can work for containers if you put the strings the other way around?
I can update the manual. I'm just not quite sure why it works one way and not the other yet...
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#11
(2020-03-09, 14:14)jurialmunkey Wrote: I think you just have to put the MusicPlayer label first for some reason.

Never occurred to me to swap terms (why should it?) but your revelation has solved a problem that has confounded me from day one of v18. Thank you!!
Reply

Logout Mark Read Team Forum Stats Members Help
Alternative to StringIsEqual boolean for non-focused panel items0