Detecting if recording (1 Viewer)

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    3,049
    1,907
    Southampton
    Home Country
    United Kingdom United Kingdom
    active1.title isn't reset to null
    One caution: if there are two (or more) concurrent recordings, active1.title and active2.title will both be non-null. But what happens if active1 stops recording before active2? It may be that the LMH copies active2 to active1 and then nullifies active2. But it could be that the LMH nullifies active1 and leaves active2 unchanged. If the LMH does the latter, you cannot test only active1 in order to determine whether there is an active recording. :(

    In contrast, active.count should reflect the actual number currently recording. I am surprised that you cannot get it to work, as DWHD must use it to display the number of active recordings within the red dot. o_O

    -- from CyberSimian in the UK
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    243
    59
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    you´ll find it´s working perfect

    Ok, more testing done.

    Test 1:

    Recording manually started,
    Channel: Yesterday
    Live TV: One Foot In The Grave

    Recording manually stopped a few seconds later
    Channel: Yesterday
    Live TV: One Foot In the Grave

    success: latestMediaHandler.tvrecordings.active1.title and latestMediaHandler.tvrecordings.active1.channel changed properly at recording start and recording stop.


    Test 2:

    Recording manually started. Selected option "until manual stop"

    Channel: WildEarth
    Live TV: Escape To Nature

    allowed to run over the programme end, about 6 minutes

    Channel: WildEarth
    Live TV: Safari Spotlight

    manual stop. Got dialogue box, do you want to stop recording "Safari Spotlight". (note the programme title change has been picked up by MP)

    failure: latestMediaHandler.tvrecordings.active1.title did not return to null. Still shows "Escape To Nature" and latestMediaHandler.tvrecordings.active1.channel did not null.



    I think I have found a possible bug here in LMH. Behaviour is certainly erratic.

    In any case, it would be really handy if on the next release of MP, the property player.recording is implemented.


    So....
    I still have my original problem of trying to find a reliable property which identifies if MP is recording.

    RH
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    243
    59
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    One caution: if there are two (or more) concurrent recordings, active1.title and active2.title will both be non-null. But what happens if active1 stops recording before active2? It may be that the LMH copies active2 to active1 and then nullifies active2. But it could be that the LMH nullifies active1 and leaves active2 unchanged. If the LMH does the latter, you cannot test only active1 in order to determine whether there is an active recording.

    That isn't the issue, because I tested with only one recording taking place.

    I think it comes back to the type mismatch described above. Odd behaviour for sure.

    RH
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    243
    59
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    LMH variables on my testing line at top of the graphic : active.count , active1.channel , active1.title

    Please forgive scruffy not yet finished xml for TV guide
     

    Attachments

    • TVG Screenshot.png
      TVG Screenshot.png
      293.8 KB

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,049
    1,907
    Southampton
    Home Country
    United Kingdom United Kingdom
    LMH variables on my testing line at top of the graphic : active.count , active1.channel , active1.title
    Does active.count have a value in the EPG when there is an active recording?
    What happens to the value displayed when the recording stops?

    It could be that active.count is not being initialised to 0 (bug!), and (maybe) not reset to 0 when the recording ends.

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,049
    1,907
    Southampton
    Home Country
    United Kingdom United Kingdom
    Nothing at all - it just stays like that.
    As I am sure that you realise by now, developing a skin involves a lot of trial and error, in order to identify and then workaround all of the undocumented quirks that exist in the skin engine and MP code.

    The next test that I would perform would be to display those three variables on a panel that is not related to TV; the "Home" panel would be a suitable choice. My thinking here is that the TV-related panels are fed by TV Server, and that may introduce some limitations or quirks that don't exist in panels that are pure MP client.

    -- from CyberSimian in the UK
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,836
    10,965
    Königstein (Taunus)
    Home Country
    Germany Germany
    Here we go (in TVGuide, but works everywhere in skin):

    23-56-21.jpg

    Code as simple as this:

    Code:
    <control>
          <description>active TVRecordings updates</description>
          <type>fadelabel</type>
          <id>1</id>
          <posX>800</posX>
          <posY>60</posY>
          <width>1850</width>
          <label>Count: #latestMediaHandler.tvrecordings.active.count #scroll.wrap Channel: #latestMediaHandler.tvrecordings.active1.channel #scroll.wrap Title: #latestMediaHandler.tvrecordings.active1.title</label>
          <align>left</align>
          <font>font10</font>
          <textcolor>lightgray</textcolor>
          <visible>!string.equals(#latestMediaHandler.tvrecordings.active1.title,)</visible>
        </control>

    :D
     
    Last edited:

    Users who are viewing this thread


    Write your reply...
    Top Bottom