Movie Info Button in PM3
#1
Firstly, I apologize if this isn't the thread to be asking this in. I figure that since it involves the modification of a skin, that this might be the right place to start.

I am trying to create a button that will pull up the Movie Information in Library view without having to select the white button first. I'm wanting to make this as easy as possible for others to be able to view info and watch the trailer and not have to remember specific keymaps.

Anyway, I have modified the "MyVideoNav.xml" and added a button. Here is the syntax that I used:

<control type="button" id="23">
<description>Movie Info</description>
<posx>0</posx>
<posy>296</posy>
<label>10524</label>
<onleft>50</onleft>
<onright>50</onright>
<onup>14</onup>
<ondown>19</ondown>
<onclick>ActivateWindow(2003)</onclick>
</control>

I can see the button on the left side below the Flatten button. When I highlight the movie title (and this may be the issue, IDK) and can see the IMDB synopsis loaded, I try to click on the newly created button. That, in turn causes XBMC to shut down.

I've attached my debug log. I am currently using XBMC for Windows to test this all out.

http://pastebin.com/m29ff9eb

I've also attached a screenshot of the button that I've created and the state that XBMC is in before trying to start the new button.

Image
Reply
#2
I guess the problem is when you activate the button you created no movie title has focus anymore, so it doesn't know what to do with your action. In other words I don't think what you want is possible, but I wouldn't be surprised if somebody proves me wrong Rolleyes
Reply
#3
Correct, this is not possible.

We could perhaps make it possible I suspect, though. My idea is to use ListItem.FilenameAndPath as a source location for the movie info window - no idea how easy it'd be though.

Any other skinners have comments?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
Well, let me ask this then. What I'm trying to do in the long run is be able to access the movie trailer for the particular title via a button. I tried and failed terribly at that. This is why I went this direction instead. Would anyone have any insight as to how to create a button, much like the one inside the Movie Info page that will automatically launch the trailer upon selection?

Another thought would be to change things around so that when you click on the movie, instead of it automatically playing, a dialog box pops up with the option of either playing the movie or watching trailer. Would this possibly get around the issue with the button not having focus on the movie? I really wish I had more knowledge of this stuff (this is my very first attempt).
Reply
#5
Ah - that may well be doable. Try this:

<onclick>PlayMedia($INFO[ListItem.Trailer])</onclick>

Make the button enabled on !IsEmpty(ListItem.Trailer) for bonus points.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
OK, I must be an idiot! I've tried to find this by looking at the debug log, but can't find out what XBMC invokes when you click on the library entry to start playing it. I want to circumvent it from automatically playing so that I can try the coding that jmarshall gave me.
Reply
#7
What exactly do you wish to do now? If I understand you correctly you want to have a button that starts the trailer of the currently selected movie, right?
If so, just take the code jonathan posted and use it on the button you already created earlier as shown in your screenshot.
By adding <enable>!IsEmpty(ListItem.Trailer)</enable> to the button it will be greyed out when no trailer is available for the selected movie.
Reply
#8
I just tried adding the additional lines to the myvideonav.xml and nothing happens. In fact, the trailer button doesn't even show up when I add the !IsEmpty line.

Jeroen, what I was ideally wanting to do is when viewing titles in Library mode and you click on a specific title, instead of XBMC automatically playing the title, a dialog box pops up and gives you one of two options: Play or View Trailer. In essence, I want to circumvent the automatic playing of the file and interject an additional step via a dialog box.

I assumed that this option was more doable than my original idea, as per the comments by jmarshall. From what I understand, the initial idea that I had of having a button to the left that invoked the trailer wouldn't be possible since there was no way to place focus on a certain title.
Reply
#9
Hold up...I think it works now. I did something wrong when I added the !IsEmpty line (sloppy typing Sad ). Now, when I highlight the title, the Movie Trailer button pops up to the left side. I click it and it starts buffering the trailer! Excellent!!! Just so anyone else who stumbles across this thread can see, here's the final layout of the button:

<control type="button" id="23">
<description>Play Trailer</description>
<posx>0</posx>
<posy>296></posy>
<label>10524</label>
<onleft>50</onleft>
<onright>50</onright>
<onup>14</onup>
<ondown>19</ondown>
<onclick>PlayMedia($INFO[ListItem.Trailer])</onclick>
<visible>!IsEmpty(ListItem.Trailer)</visible>
</control>

Thanks to all who have been patient with me on this learning process. I now feel that I can go into the Aeon skin (which is where I originally wanted to do this) and mod it.
Reply
#10
Glad you got it working Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
Well, I spoke too soon. While I was able to get the button to work in PMIII and Aeon just fine using XBMC PC, I was unable to get it to work in PMIII on my Xbox. Aeon works just fine. What's going on with PMIII is that when I highlight the title, the button shows up, but you can't scroll down to it. If I scroll down the list, I can't scroll past Filter. If I scroll up and then come from the bottom, it automatically jumps to Flatten. I don't know if this has any bearing on anything, but since I never use the Party Mode, I removed the button completely from the MyVideoNav.xml. Is there another file that makes reference to it that I need to remove?
Reply
#12
Since I can't edit my post for some reason, I wanted to mention that I'm using the T3CH build of XBMC dated 5-4-08.
Reply
#13
I believe you have to tell the skin where to jump when you press down. So you will have to edit the button directly above it to jump to that button when you press down. I assume you were using the mouse in XBMC PC and you could just click on it?

J_K_M_A_N
Reply
#14
Correct, I was using the mouse in XBMC PC. I assume that if I use the keyboard instead that I should be able to replicate the issue, correct?

I'll have to look into what you suggested. I was unaware that I needed to do that. I assume that this is the <onup? and <ondown> entries, right?
Reply
#15
I believe so...yes.

J_K_M_A_N
Reply

Logout Mark Read Team Forum Stats Members Help
Movie Info Button in PM30