Problems editting musicoverlay.xml (1 Viewer)

Thijs_O

Portal Member
December 18, 2008
41
6
Home Country
Netherlands Netherlands
Thanks. :) It's frustating at some times but whenever you see the result, you'll be satisfied.. at least that goes for me. :p

Anyhow, just one more problem: There are 4 images: playbutton, pausebutton, fastforward-button and rewindbutton. However, here the display of that button doesn't work. For example, when I play it should show playbutton, when I pause the pausebutton etc but it always displays RW-button. If I remove that <control> it'll go to always FF-button, etc till I remove them all and there is no button-image left. :p I think I know the reason but don't know how to fix it. For example, the Playbutton-control:

- <control>
<description>play logo</description>
<type>image</type>
<id>9993</id>
<posX>685</posX>
<posY>20</posY>
<texture>logo_play.png</texture>
<visible>Player.HasVideo+!Player.HasAudio+control.isvisible(3336)</visible>
</control>

The problem is simple: <visible>Player.HasVideo+!Player.HasAudio+control.isvisible(3336)</visible>
(Note: I divided HasMedia into HasAudio and HasVideo to increase the range of possibilities for the script, but this shouldn't affect my problem)
The problem here is the last part, +control.isvisible(3336) which basically means it will always display that button (well actually image) if that condition is met. Anyway, I don't know how I can script it in such a way that it still has +control.isvisible(3336) in it but kinda keeping in line with what should be displayed. Like another requirement such as +Player.Playing for Playbutton, +Player.Paused for Pausebutton etc. But I don't know how to script this..:(


Update: Also ran into another much bigger problem. As said above I've made two groups: Audio and Video. To make this work I created two new <control> (dummy's, like 3337), that looks like this:

<control>
<description>dummy (audio only)</description>
<type>label</type>
<id>3335</id>
<posX>2000</posX>
<label>#Play.Current.Album</label>
<visible>player.hasAudio+control.hastext(3335)</visible>
</control>
<control>
<description>dummy (video only)</description>
<type>label</type>
<id>3336</id>
<posX>2000</posX>
<label>#Play.Current.Album</label>
<visible>player.hasVideo+control.hastext(3336)</visible>
</control>

Corresponding with that, I editted the <visible> rules in the video and audio <controls> as well, this looks like the following:

Video: <visible>Player.HasVideo+!Player.HasAudio+control.isvisible(3336)</visible>
Audio: <visible>player.hasAudio+control.isvisible(3335)</visible>

As you can see I've add !Player.HasAudio to the Video-control. This was nessecary, otherwise I would see the Video-things (such as the bigger 'screen', the Year/Genre information which I don't want to see at music etc) when playing back audio. Anyway, with this Video-rule, nothing of Video is being displayed. The <controls> (such as the video miniature but also title, etc) is only being displayed when using the following rule:

<visible>Player.HasVideo</visible>
So both !Player.HasAudio and +control.isvisible(3336) prevent any video or related information being displayed. I really can't make sense of it.. it has to work somehow, right?:confused:
 

2BitSculptor

Super Moderator
  • Team MediaPortal
  • January 23, 2008
    2,007
    1,052
    South Central Wisconsin
    Home Country
    United States of America United States of America
    There are issues with the Player.HasVideo and Player.HasAudio conditions in this particular use. There was a discussion a month ago here: https://forum.team-mediaportal.com/skins-50/conditional-visibilty-music-playing-48685/

    this is why I used the dummy controls.

    <visible>Player.HasVideo+!Player.HasAudio+control. isvisible(3336)</visible>
    won't work as expected.

    Also,control. isvisible(3336) needs to be !control. isvisible(3336) for displaying the video box only when video is playing. (3336) is the ID of the dummy control that is 'visible' (off screen) only when Music is playing.

    confused more?

    Chuck
     

    Thijs_O

    Portal Member
    December 18, 2008
    41
    6
    Home Country
    Netherlands Netherlands
    Hmm, took me some time to figure out but I think it seems to be just fine now. I simply add the ! in front of every <control> under the Video-section, and placed no exclamationmarks at any of the <controls> under the Audio section and it seems to be good now. Getting good display at both music (no overlay from the video-window) and video. I did reverted back to your original XML-setup, aka no different dummy's for audio/video whatsoever.

    One issue remains: the pause-button (etc) problem. Still don't get a good display of those buttons; not in video nor music. Do they work (or rather: display) correctly at your setup? Aka actually showing Pause when paused etc?

    Despite that quite content I got it to work though. I can go to bed with a good feeling now, hah. :)
     

    Users who are viewing this thread

    Top Bottom