[Added in 0.27] Open OnlineVideos with Parameter

Discussion in 'OnlineVideos' started by offbyone, November 2, 2010.

  1. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    New feature description
    MediaPortal 1.2 allows buttons in the skin to call plugins with a parameter (OriginalThread).
    A 'button' control will have a new child element 'hyperlinkParameter'.

    Possible usage scenarios
    A button in basic home screen that goes directly to the 'YouTube' Site of OnlineVideos.
    A button in MyVideos that goes directly to 'iTunes Movie Trailers' Site and shows searchresults for the selected movie.
    A button in MyTV that goes to a Site corresponding to the current TV Channel (or even the Category for the currently playing show)

    Suggested implementation
    Go directly to:

    1. a Site (not found = stay at 'All Sites view')
    2. a Category of a Site (not found = stay at 'All Categories View')
    3. the searchresults of a site (nothing found =
      • a. return after showing 'Nothing Found message'
      • b. open virtual keyboard with given searchstring)
    Return Mode (PreviousMenu):

    1. Go back up to the all sites view of OnlineVideos before returning to the window you came from (default)
    2. When at the view OnlineVideos was called with, PreviousMenu will return to the window you came from
    Parameter Definition for skinners
    Code (Text):
    1.  site:<sitename>|category:<categoryname>|search:<searchstring>|return:<locked|root>

    The category, search and return terms are optional.

    Examples

    1. a button in myVideo with hyperlinkParameter set to:

    Code (Text):
    1.  site:iTunes Movie Trailers|search:#selecteditem|return:locked
    Will go to the searchresults for the currently selected item of the 'iTunes Movie Trailers' site and return back to this window if PreviousMenu is pressed in the searchresults view.

    2. a button in myTV with hyperlinkParameter set to:

    Code (Text):
    1. site:#TV.View.channel
    Will go to a site named like the current channel (if found) and return back to tv only when using Previous Menu from the list of all sites



    Let me know what you think, if we need anything additonal/changed or if I'm totally off.


     
    • Like Like x 6
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Awesome, looks great.
    Are these configurable?

    I'm trying to explain in my head what would "site:iTunes Movie Trailers|search:#selecteditem|return:locked" do? Tell me if I went wrong.

    1. Search for #selecteditem string on iTunes Movie Trailers and display results.

    2. Pressing escape would...
    a) in case of "return:locked" return to original plugin
    b) in case of "return:root" return to the iTunes Movie Trailers Categories

    3. In case no results are found
    a) it would display no results found message AND then
    b) open VK
     
  4. DieBagger
    • Premium Supporter

    DieBagger Retired Team Member

    Joined:
    September 11, 2007
    Messages:
    2,516
    Likes Received:
    1,257
    Gender:
    Male
    Occupation:
    Android Developer
    Location:
    Austria
    Ratings:
    +1,302 / 0
    Home Country:
    Austria Austria
    Show System Specs
    Wow, you really thought this through... :)

    It could also be useful to add a parameter "view" where it can be defined in which view OnlineVideos is opened (List, Thumb,...). For some usage scenarios a list might be the best choice, for others the thumbnail view.

    Other than that it's perfect, I especially like that you can define the return mode.

    :D
     
  5. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    SilentException:
    2.b) root -> will also go up to the list of all sites and when ESC on that, will return to previous window (normal Plugin behavior)

    DieBagger:
    guess I could add another optional term:
    Code (Text):
    1. view:<list|smallthumbs|largethumbs>
     
    • Like Like x 1
  6. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    In case of 3. Is it possible to skip b) ? So only display no results and then goto "return:" ?
     
  7. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    I'm afraid I'll have a tough time implementing all this (note to self: try only to suggest features you'll find the time to implement) ;)

    So do you want another option that controls if the VirtualKeyboard is opened or not when no results are found, or just make it the default behavior NOT to open the VK?
     
  8. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    :D

    Another option would be nice so there is a way to do 3.a)return: if option is set and 3.a)b) if option is not set. Hope you understand ;)
     
  9. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    AW: Open OnlineVideos with Parameter

    Just commited the last part of this, yeah! :) I left out the view parameter as it was ambiguous (OnlineVideos also choses a layout depending on thumbs found on the items).

    Final specification:
    Code (Text):
    1.  
    2. site:<sitename>|category:<categoryname>|search:<searchstring>|VKonfail:<true,false>|return:<Locked,Root>
    3.  
    I'll update the Wiki on google page with the infos how to use this.
     
    • Like Like x 1
  10. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Great job offbyone! :D
     
  11. woo73

    woo73 Portal Pro

    Joined:
    February 3, 2011
    Messages:
    66
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    Hi,

    I am not a skinner, but I need the possibilty to start the plugin with parameters.
    I have tried to implement a button within the Maya's BasicHome Screen.

    This is my test entry:

    <control>
    <description>107 button</description>
    <type>button</type>
    <id>107</id>
    <posX>543</posX>
    <posY>316</posY>
    <width>195</width>
    <height>138</height>
    <label>Trailers</label>
    <textXOff>3000</textXOff>
    <hyperlink>4755</hyperlink>
    <hyperlinkParameter>site:iTunes Movie Trailers|return:Locked</hyperlinkParameter>
    <onleft>106</onleft>
    <onright>108</onright>
    <onup>112</onup>
    <ondown>102</ondown>
    <textureFocus>-</textureFocus>
    <textureNoFocus>-</textureNoFocus>
    </control>

    I have tried to implement the code into:

    1. C:\ProgramData\Team MediaPortal\MediaPortal\skin\Maya\BasicHome.xml
    2. C:\ProgramData\Team MediaPortal\MediaPortal\skin\Maya\custom files\BasicHome.default.xml
    3. C:\ProgramData\Team MediaPortal\MediaPortal\skin\Maya\custom files\BasicHome.iFX.xml


    But no effect.
    Where I have to place the code?

    I am using MP Version 1.2 at the moment.

    Thanks a lot.

    woo73
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!