PDA

View Full Version : Movie Info Button in PM3


bugman72
2008-05-21, 21:49
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.

http://img.photobucket.com/albums/v66/bugman72/Xbox/Screenshot.jpg

Jeroen
2008-05-21, 23:26
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:

jmarshall
2008-05-21, 23:33
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

bugman72
2008-05-21, 23:58
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).

jmarshall
2008-05-22, 01:07
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

bugman72
2008-05-22, 16:39
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.

Jeroen
2008-05-22, 16:48
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.

bugman72
2008-05-22, 17:25
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.

bugman72
2008-05-22, 17:31
Hold up...I think it works now. I did something wrong when I added the !IsEmpty line (sloppy typing :( ). 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.

jmarshall
2008-05-22, 23:24
Glad you got it working :)

bugman72
2008-05-23, 16:01
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?

bugman72
2008-05-23, 16:03
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.

J_K_M_A_N
2008-05-23, 16:40
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

bugman72
2008-05-23, 17:57
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?

J_K_M_A_N
2008-05-23, 18:28
I believe so...yes.

J_K_M_A_N

bugman72
2008-05-23, 23:02
Got it. I didn't exactly realize what those numbers represented until now. All is working perfectly now.

Is there any way that I can upload my "MyVideoNav.xml" file for others to download if they desire? I don't know if there are others who are wanting to do the same as me, but I thought I would at least offer it to others to try out.

Thanks to everyone for the help.

J_K_M_A_N
2008-05-23, 23:11
What I did was upload it to pastebin in text format. That is what I did here. (http://xbmc.org/forum/showthread.php?t=28121)

I will probably try it out. I kinda like that idea so I don't have to go into the movie info to see if it has a trailer.

J_K_M_A_N

bugman72
2008-05-24, 00:03
OK, here's my revised "MyVideoNav.xml" file for PMIII. If anyone wants the version for Aeon, let me know and I can post it as well.

http://pastebin.com/m38bfd9cb

bionic1234
2008-05-24, 15:10
OK, here's my revised "MyVideoNav.xml" file for PMIII. If anyone wants the version for Aeon, let me know and I can post it as well.

http://pastebin.com/m38bfd9cb

Yes please

J_K_M_A_N
2008-05-24, 16:54
I really like that addition. And I prefer it do disappear when a trailer isn't available. I thought I would like it better if you made the button stay and just disable it if it wasn't available but I like this way better. Great job.

J_K_M_A_N

bugman72
2008-05-24, 21:47
Here's the file for Aeon. I don't know if makes a difference or not, but I am using the "Aeon 2.1" mod files with the skin. I don't know if this will work without those mod files.

Aeon (http://pastebin.com/m608f6ccc)

Thanks for the compliments, JKMAN. This is my first time of actually doing any recoding to XBMC and I started out WAY outside my element. Now, I want to try and do my own skin!

rtwight
2008-06-01, 22:27
I added the trailer button to my xtv skin (after looking at bugman72's code) so I thought I would include it in here.

I also added a line showing the filename of the movie (in case it scraps wrong you can see what file it is pointed to).

http://pastebin.com/m7b9f91bf

The one thing I haven't figured out yet is how to get it to go back to the movie info screen after playing the trailer, for me it goes back to the movie listing.

Let me know if I missed anything in the mod.

Thanks for the inspiration buman72 :)

bugman72
2008-06-02, 16:33
I'm glad I could be an inspiration to someone here, especially due to my noobiness. :)

rtwight
2008-06-02, 16:55
This was my first mod as well (and has actually given me the itch to play around more with it).

I haven't tried either of your mods yet, but after the trailer plays, does it go back to the screen it was on or back to the movie listing?

i wonder if its the way the xtv skin works as it does the same thing if you choose the play button, it goes back to the movie list and not the movie detail screen.

Not a big issue, but would be nice if after playing the trailer it goes back to the info screen so you can choose the play button.
But you can also just play it from the movie list screen, so i don't know how much time I'll spend on this one :)

bugman72
2008-06-03, 00:02
I'll have to take a look at it once I get home to verify which screen it goes back to. I believe, and I could be wrong, that it goes back to the movie listing screen. That's more or less how I wanted this to work. I didn't want to have to do the "White button", then select Movie Information in order to be able to get to the trailer. I wanted to have it set up so that when I'm in list view or one that shows a brief synopsis of the movie, I can slide over and select Trailer.