[TV] 4994: Automatically Change Channel on Program Reminder (1 Viewer)

vapourEyes

Portal Pro
July 31, 2013
144
43
Home Country
United Kingdom United Kingdom
--- Post updated ---
It may not be as clean as it should be. I hope this helps though

Thanks for your quick response.
--- Post updated ---
I thought I posted the code here an hour ago.
Will pastebin the code.

It is client side only. It exists within TvNotifyManager.cs

The code can be found on pastebin, here: http://pastebin.com/bU5MLgeP

private bool NotifyChannelChange(TVProgramDescription tvProg) {}

Is a new method added to TvNotifyManager.cs.
 

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    If it's client only, I believe that an addition could be made to the client GUI.
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    Yes, thank you HTPCSourcer.

    I think a UI choice can be surfaced to the user. Then they would have the choice of behaviors.
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    I just had another thought. I could set a bookmark, at the program change.
    That way someone who wants to go back in the buffer to a previous 'switched to' program can use the skip buttons...
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    I just had another thought. I could set a bookmark, at the program change.
    That way someone who wants to go back in the buffer to a previous 'switched to' program can use the skip buttons...
    Buffer for live tv is an interesting thing.
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    I was hoping to extend the current experiment by showing a real-time countdown to the channel change.
    Using tvNotifyDlg.DoModal(), in the current implementation does not appear to support this ?

    Also, to get the 'Pause on channel change' functionality working, I need to register for an OnChannelChanged() fired event.
    Right now I implement a crude thread-yielding method with a timeout to wait for the channel change, with mixed results.
    Switching from an HD channel to SD channel or vice-versa, struggles to pause correctly. If I could register for the official OnChannelChanged() event I could pause at the right time ?

    Thanks.
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    I have updated the code.
    I now call a thread sleeping method, with a g_player.Process() call within to pause properly after program change, if a user has left the system paused.

    I have submitted this code to pastebin again.

    Thanks.

    http://pastebin.com/tqjyuaEw
     

    vapourEyes

    Portal Pro
    July 31, 2013
    144
    43
    Home Country
    United Kingdom United Kingdom
    I should modify the UI to surface this option to the user.
    I'm very newbie on the MediaPortal codebase, so you may have to bear with me.
     

    Users who are viewing this thread

    Top Bottom