How can I make MP to notice changes in the database (1 Viewer)

STSC

Portal Pro
December 4, 2004
139
0
Germany
I'm working on a scheduler for MP. But I have the same problem like Machine had:

MP does not notice the changes in the database. So this whole thing does NOT work right now.

How did you solve this. Right now I add recordings like this:

Dim recording As New MediaPortal.TV.Database.TVRecording

recording.Title = Description
recording.Channel = CapChannel
recording.Start = datetolong(StartTime)
recording.End = datetolong(EndTime)

recording.RecType = MediaPortal.TV.Database.TVRecording.RecordingType.Once


MediaPortal.TV.Database.TVDatabase.AddRecording(recording)

The thing is that the OnRecordingsChanged are not raised in MP, because I use an external plugin.
How did you solve this?[/code]
 

Maschine

Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    Hi STSC,

    this part of the webscheduler was done by Sam (samuel337). He expanded his external control plugin to accept commands from a webservice. The php part of the webinterface just communicates with this webservice which sends the commands to the control plugin. So maybe you ask Sam directly. I'm sure, he will provide you the sourcecode of his plugin.

    Maschine
     

    Maschine

    Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    Yes, he's away for some days. Some kind of winter vacation I think ;-) He wrote me to be back around the end of this month.

    Maschine
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    Maschine said:
    Yes, he's away for some days. Some kind of winter vacation I think ;-) He wrote me to be back around the end of this month.

    Maschine

    Its summer over here... ;-) anyway, I'm back.

    With regards to code, are you going to do this via my plugin (like the web interface), or are you going to do this using your own plugin?

    Depending on the circumstance, I can give different code.

    Basically, what I've done is to tell MP to update a non-existent recording (e.g. one with ID 9999999).

    Sam
     

    STSC

    Portal Pro
    December 4, 2004
    139
    0
    Germany
    Hi Sam,

    I'm writing an independent program (PVR Scheduler) that can control the recordings of MP. I can add new recordings, but they never will start, because MP doesn't update them. I also add the recordings like you do in your webinterface and then you call this function:

    <WebMethod(Description:="This command tells MediaPortal to refresh its recordings list.")> _
    Public Function RefreshRecordingsInMP() As String
    Dim eMPH As ExtControlAssembly.MPHandler = GetEMPH()

    Return eMPH.RefreshRecordingsInMP
    End Function

    Now I would like to know which code you use in the ExtControlAssembly.dll to update the recordings. Maybe you can send me the sources.

    The advantages of my scheduler are:
    - NVRAM support (RTC Alarm)
    - Start recordings without MP running
    - Shutdown/Standby after recording
    - support of tvinfo.de (for german users)
    - support of different recording programs
    Right now it has its own user interface, but I also want to program a plugin for MP later, so that you can control my PVR Scheduler completely in MP.

    Thank you very much!
     
    A

    Anonymous

    Guest
    STSC said:
    .................
    The advantages of my scheduler are:
    - NVRAM support (RTC Alarm)
    - Start recordings without MP running
    - Shutdown/Standby after recording

    - support of tvinfo.de (for german users)
    - support of different recording programs
    Right now it has its own user interface, but I also want to program a plugin for MP later, so that you can control my PVR Scheduler completely in MP.

    Thank you very much!

    Hi STSC, :p
    this does as well mean, that recordings will/can be done by an extra recording prog like WinTVCap so directly in MPEG? Or with DVB directly to DVB-stream, so no more recording in 'DVR-MS shit' is needed? (I hate it to convert before cutting commercials out!)

    I love this idea...
    hope, we can try it out in the next days.... can't wait..... :wink:
    doit
     

    STSC

    Portal Pro
    December 4, 2004
    139
    0
    Germany
    Yes, right now it still has its own user interface and it can already schedule recordings for other recording programs.
    But I also would like to integrate it in MP, so that you can schedule your recordings in MP. I think that I will start to do this in a couple weeks, because first of all I have to learn how to program plugins for MP.
     

    Users who are viewing this thread

    Top Bottom