[Approved] - Patch to allow skins to open plugins with a parameter *Updated for 1.1* | Page 3

Discussion in 'Archive' started by DieBagger, December 1, 2009.

    • Team MediaPortal

    DieBagger Thread Starter Documentation Group

    System Specs
    Great to hear, thx a lot Scythe42!
    • Like Like x 1
  1. sPiel Portal Member

    System Specs
    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?
    • Team MediaPortal

    DieBagger Thread Starter Documentation Group

    System Specs
    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...
  2. sPiel Portal Member

    System Specs
    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.
    • Team MediaPortal

    offbyone Development Group

    System Specs
    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 (text):
    <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.
    • Like Like x 1
    • Team MediaPortal

    offbyone Development Group

    System Specs
    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 (text):
    #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?

    Attached Files:

    • Team MediaPortal

    chemelli Development Group

    Re: AW: Patch to allow skins to open plugins with a parameter *Updated for 1.1*

    Bin for testers will help taking a decision for the commit.

    Simone
    • Team MediaPortal

    offbyone Development Group

    System Specs
    AW: Patch to allow skins to open plugins with a parameter *Updated for 1.1*

    Core.dll added (only thing that changed).
    • Like Like x 1
    • Team MediaPortal

    DieBagger Thread Starter Documentation Group

    System Specs
    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
    • Team MediaPortal

    SilentException Development Group

    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..

Share This Page

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

Running the latest version?

V1.3.0 FINAL - released March 2013
Releasenews | Download
Changelog
 | Requirements
HTPC
Team-MediaPortal
 
About
Contact |  Press
Partners