Search Youtube for trailers button...

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #1
Working on a skin right now and want a button that will open the youtube addon and search for a movie trailer.

So say your looking at Avatar in the movie library and want to watch a trailer. You can click on a button that will launch the Youtube addon and search for "Avatar 2009 trailer" and return the search results for the viewer to select.

No idea if it is possible to script it or get something as close to the idea but would be great for people who don't store trailers on their hard drive and would prefer to stream them from youtube.
(This post was last modified: 2012-04-01 14:41 by krish_2k4.)
find quote
djtoll Offline
Skilled Skinner
Posts: 383
Joined: Dec 2006
Reputation: 3
Post: #2
(2012-04-01 14:39)krish_2k4 Wrote:  Working on a skin right now and want a button that will open the youtube addon and search for a movie trailer.

So say your looking at Avatar in the movie library and want to watch a trailer. You can click on a button that will launch the Youtube addon and search for "Avatar 2009 trailer" and return the search results for the viewer to select.

No idea if it is possible to script it or get something as close to the idea but would be great for people who don't store trailers on their hard drive and would prefer to stream them from youtube.

My version from DialogvideoInfo.xml
Code:
<onclick>PreviousMenu</onclick>
<onclick>ActivateWindow(10025,plugin://plugin.video.youtube/?path=/root/search&amp;feed=search&amp;search=$INFO[ListItem.Label] - trailer)</onclick>
<visible>System.HasAddon(plugin.video.youtube) + [Container.Content(Movies) | Container.Content(Episodes) | Container.Content(tvshows) | Container.Content(MusicVideos)]</visible>

[Image: 7tftavatarlogo.png]
Skin.JOGGLER
----------------------------------
Download - djtoll's Add-On Repository / Add-Ons > Install from ZIP / Get Add-ons > Djtoll's Repository
(This post was last modified: 2012-04-01 21:55 by djtoll.)
find quote
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #3
Will try this out. which skin is this from?

Thanks!
find quote
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #4
Worked like a charm! cheers djtoll!


edit: How do I make it so it returns back to movies view rather than videos when you exit out of search?
(This post was last modified: 2012-04-01 21:31 by krish_2k4.)
find quote
djtoll Offline
Skilled Skinner
Posts: 383
Joined: Dec 2006
Reputation: 3
Post: #5
(2012-04-01 21:04)krish_2k4 Wrote:  Worked like a charm! cheers djtoll!


edit: How do I make it so it returns back to movies view rather than videos when you exit out of search?

I think that is not possible - not with this macro version, and I cannot scripting Smile

PS: My Joggler Skin, but no release yet with this gimic.

[Image: 7tftavatarlogo.png]
Skin.JOGGLER
----------------------------------
Download - djtoll's Add-On Repository / Add-Ons > Install from ZIP / Get Add-ons > Djtoll's Repository
(This post was last modified: 2012-04-01 21:57 by djtoll.)
find quote
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #6
ahh ok no problem, at least the main function works!

thanks for the help!

edit: still trying to figure out how to return back to movie titles screen, if anyone can help?
(This post was last modified: 2012-04-02 12:16 by krish_2k4.)
find quote
iDude Offline
Member
Posts: 85
Joined: Aug 2009
Reputation: 0
Post: #7
(2012-04-01 22:07)krish_2k4 Wrote:  ahh ok no problem, at least the main function works!

thanks for the help!

edit: still trying to figure out how to return back to movie titles screen, if anyone can help?

try this:
<onclick>ActivateWindow(10025,plugin://plugin.video.youtube/?path=/root/search&amp;feed=search&amp;search=$INFO[ListItem.Label] - trailer, return)</onclick>

From the documentation:
Code:
ActivateWindow(window[,dir,return])
Quote:Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder XBMC should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that XBMC should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
(This post was last modified: 2012-04-02 14:08 by iDude.)
find quote
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #8
tried that already, just returns you to the home view, I want it to return to movie titles since that is were the user navigates from.
find quote
krish_2k4 Offline
Fan
Posts: 618
Joined: Aug 2010
Reputation: 9
Post: #9
(2012-04-01 20:05)djtoll Wrote:  
(2012-04-01 14:39)krish_2k4 Wrote:  Working on a skin right now and want a button that will open the youtube addon and search for a movie trailer.

So say your looking at Avatar in the movie library and want to watch a trailer. You can click on a button that will launch the Youtube addon and search for "Avatar 2009 trailer" and return the search results for the viewer to select.

No idea if it is possible to script it or get something as close to the idea but would be great for people who don't store trailers on their hard drive and would prefer to stream them from youtube.

My version from DialogvideoInfo.xml
Code:
<onclick>PreviousMenu</onclick>
<onclick>ActivateWindow(10025,plugin://plugin.video.youtube/?path=/root/search&amp;feed=search&amp;search=$INFO[ListItem.Label] - trailer)</onclick>
<visible>System.HasAddon(plugin.video.youtube) + [Container.Content(Movies) | Container.Content(Episodes) | Container.Content(tvshows) | Container.Content(MusicVideos)]</visible>
Trying to get a search done for vevo in a similar way but no luck so far.


Code:
<onclick>ActivateWindow(10025,plugin://plugin.video.vevo/?path=/root/search&amp;feed=search&amp;search=$INFO[ListItem.Artist],return)</onclick>

It just brings me to the vevo addon but does not search.
find quote