Detecting if recording (2 Viewers)

Rob Hexenmeister

MP Donator
  • Premium Supporter
  • May 12, 2011
    239
    58
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    Good afternoon,

    Does anybody know of an expression or property I can use within a conditional visibility statement, that detects if Mediaportal is recording?

    I tried <visible>![string.equals(#latestMediaHandler.tvrecordings.active1.title,)]</visible> and that doesn't work.
    I understand the property 'player.recording' was never implemented
    and
    I tried 'window.isvisible(3002)' and that didn't work

    Any ideas anyone? Has anyone tried something similar?

    Thank you
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,030
    1,895
    Southampton
    Home Country
    United Kingdom United Kingdom
    I tried <visible>![string.equals(#latestMediaHandler.tvrecordings.active1.title,)]</visible> and that doesn't work.
    I don't use the "Latest Media Handler" plugin, and have no experience of using its skin variables. However, I have just scanned the xml files for @catavolt 's "DefaultWideHD" skin for MP 1.33, and there are numerous occurrences of LMH skin variables in <visible> tags. Many are in "BasicHomeInfoRecentlyAdded.xml", but there are 12 other xml files that reference LMH skin variables. Presumably, if these did not work to control visibility, someone would have noticed by now.

    There are some controls where visibility is determined by the code that handles the panel, and the <visible> tag is ignored (i.e. has no effect). Perhaps you are trying to alter the visibility of one these controls?

    What control are you trying to make visible/hidden, and on which panel?

    -- from CyberSimian in the UK
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    239
    58
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    I don't use the "Latest Media Handler" plugin, and have no experience of using its skin variables. However, I have just scanned the xml files for @catavolt 's "DefaultWideHD" skin for MP 1.33, and there are numerous occurrences of LMH skin variables in <visible> tags. Many are in "BasicHomeInfoRecentlyAdded.xml", but there are 12 other xml files that reference LMH skin variables. Presumably, if these did not work to control visibility, someone would have noticed by now.

    There are some controls where visibility is determined by the code that handles the panel, and the <visible> tag is ignored (i.e. has no effect). Perhaps you are trying to alter the visibility of one these controls?

    What control are you trying to make visible/hidden, and on which panel?

    -- from CyberSimian in the UK


    Good morning CyberSimian,

    Principally I want a button on the Top Bar to be hidden if MP is recording, but I want to be able to use the condition anywhere.

    I have been thinking overnight and wondered if I could put a define or a set.string on the DialogNotify.xml to set, for example a skin setting called #mprecording to true or false but I can't think how to do that either because it still comes down to the same issue of needing a reliable MP property which is active when recording and null when not.

    RH
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,814
    10,918
    Königstein (Taunus)
    Home Country
    Germany Germany
    This does work in any case:
    <visible>plugin.isenabled(Latest Media Handler)+!string.equals(#latestMediaHandler.tvrecordings.active1.title,)</visible>
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    239
    58
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    This does work in any case:
    <visible>plugin.isenabled(Latest Media Handler)+!string.equals(#latestMediaHandler.tvrecordings.active1.title,)</visible>

    Morning Catavolt,

    I tried that one. It worked when the recording started, but #latestMediaHandler.tvrecordings.active1.title didn't go back to null when the recording finished. I wonder if it may stay until overwritten.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,030
    1,895
    Southampton
    Home Country
    United Kingdom United Kingdom
    It worked when the recording started, but #latestMediaHandler.tvrecordings.active1.title didn't go back to null when the recording finished.
    There is an LMH count variable that contains the number of active recordings. Perhaps that is updated when a recording finishes? It is:

    #latestMediaHandler.tvrecordings.active.count

    -- from CyberSimian in the UK
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    239
    58
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    There is an LMH count variable that contains the number of active recordings. Perhaps that is updated when a recording finishes? It is:

    #latestMediaHandler.tvrecordings.active.count

    -- from CyberSimian in the UK

    Sadly, no luck. It didn't even recognise it as a variable/property. I wonder if it is even used.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,814
    10,918
    Königstein (Taunus)
    Home Country
    Germany Germany
    It didn't even recognise it as a variable/property. I wonder if it is even used.
    If you would look into DWHD or PVHD TVOSD.xml files, you´ll find it´s working perfect ;)
    In general, it´s worth looking into the skin files of these 2 skins to find answers to a lot of your questions ;)
    Both skins are a kind of "reference" for skinning ;)
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    239
    58
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    If you would look into DWHD or PVHD TVOSD.xml files, you´ll find it´s working perfect ;)
    In general, it´s worth looking into the skin files of these 2 skins to find answers to a lot of your questions ;)
    Both skins are a kind of "reference" for skinning ;)

    Yes I regularly refer to DefaultWide HD.

    But, I have found the issue. It's a strange one. If there is a mismatch between the current active recording title and what is on TV at the time, then the active1.title isn't reset to null. This can happen if there is padding time at the end of the recording and the latestMediaHandler.tvrecordings.active1.title doesn't match the 'real time' active title.

    I am going to try some other properties from Latest Media Handler in the same group and see if they have the same effect.

    active.count definitely doesn't work by the way.

    RH.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom