[Approved] Patch to allow skins to open plugins with a parameter *Updated for 1.1* (1 Viewer)

DieBagger

Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    Tested again, no issues on my box. Comitted tp SVN (26461)

    On a side note. We have a versioning system. One bug introduced with one patch doesn't make other commits impossible. Just work on an older revision and later apply the changes to the trunk. This is especially true when the change are affecting different parts.

    If anyone has problems with this, feel free to revert and take over testing pending community patches for MP1.

    Great to hear, thx a lot Scythe42!
     

    sPiel

    Portal Pro
    January 5, 2010
    52
    11
    Home Country
    New Zealand New Zealand
    I believe this function will finally remove the last little thing I could do with the old Meedio program but can't do with MediaPortal, that is to have a button on the home screen that goes directly to 'kids media' or 'home movies' or 'documentaries' etc. Is it likely that this will be incorporated into the 1.2.x core and MyVideos plugin?
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    It's not (yet) included in the myvideos but it's already in 1.2 alpha and MP-TvSeries already has support for it in the latest version. I'll think about making a patch for myvideos...
     

    sPiel

    Portal Pro
    January 5, 2010
    52
    11
    Home Country
    New Zealand New Zealand
    That's awesome! If it's a simple code change I can take a look myself but my c# skills are only entry level atm and I don't have a testing install set up. I'll have a poke around when I get time though.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    AW: Patch to allow skins to open plugins with a parameter *Updated for 1.1*

    Hi,
    I finally got around to test this, and also made some proposal how to use this new functionality for OnlineVideos here.

    Unfortunately I just realized that my whole idea won't work because the hyperlinkParameter does not resolve GUI Properties like:
    Code:
    <hyperlinkParameter>#selecteditem</hyperlinkParameter>

    What I get in the _loadParameter then is "#selecteditem".

    Can this be easily added? The resolving needs to be done before exiting the screen where the button is defined, otherwise those properties are already reset or no longer valid.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    AW: Patch to allow skins to open plugins with a parameter *Updated for 1.1*

    Here is the patch that evaluated GUIProperties in the hyperlink Parameter (very minor change).

    While testing I also found that the general Property Resolving (PropertyManager.Parse) has a (known but unmantissed) issue:
    when you have a property with:
    Code:
    #selecteditem,#selecteditem2
    the current implementation will find both properties, and replace them one by one in the original string.
    The problem: #selecteditem will also replace #selecteditem2! making the second match no longer find anything to replace. I didn't want to change too much, so I simply sorted the strings to be replaced by length (descending), which will get rid of that error.

    Now which dev can submit this?
     

    Attachments

    • MakeHyperLinkParamEvalGUIPropertiesAndFixParseProperty.patch
      1.8 KB

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    AW: Patch to allow skins to open plugins with a parameter *Updated for 1.1*

    Core.dll added (only thing that changed).
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    Hi offbyone, thx for finding/fixing that flaw in my patch :)

    I tested the updated version and the parsing of properties works fine, although I don't know how to test the #property -> #property2 problem.

    :D
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Property problem can be tested when you have plugin that sets #property to "prop" and then #property1 "erty".

    In that case, when evaluating #property1, PropertyManaged will return "prop1" instead of expected "erty".

    offbyone, as properties are evaluated very VERY often and the list could get quite large. Wouldn't sort function have too much influence on the performance?

    Edit: now I noticed that sorting is done over the matches only. Still it would be nice to have performance comparison :) PErhaps when i catch some time..
     

    Users who are viewing this thread

    Top Bottom