[Added in 0.27] Open OnlineVideos with Parameter (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    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:
     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:
     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:
    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.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Awesome, looks great.
    * a. return after showing 'Nothing Found message'
    * b. open virtual keyboard with given searchstring)

    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
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    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
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #4
    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:
    view:<list|smallthumbs|largethumbs>
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #6
    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?
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    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 ;)
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #8
    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:
    site:<sitename>|category:<categoryname>|search:<searchstring>|VKonfail:<true,false>|return:<Locked,Root>

    I'll update the Wiki on google page with the infos how to use this.
     

    woo73

    Portal Pro
    February 3, 2011
    66
    1
    50
    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
     

    Users who are viewing this thread

    Top Bottom