ITaskScheduler (1 Viewer)

BigGranu

Development Group
  • Team MediaPortal
  • February 7, 2013
    238
    172
    49
    Germany Germany
    Country flag
    Hi Guys,

    Can anyone help me?
    What must I do to start a plugin with the TaskScheduler?
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    Following things are important:
    1. Check the interface's documentation in code file
    2. This is currently the only place where we use it in server, to schedule MediaLibrary imports: https://github.com/MediaPortal/Medi...aManagement/ImporterWorkerNewGen.cs#L524-L559
    3. The scheduler itself does not execute procedures, it only sends messages for due events. The plugin has to listen for those message: https://github.com/MediaPortal/Medi...aManagement/ImporterWorkerNewGen.cs#L417-L445

    If you plan own imports you can use this service.

    Just guessing, if you look for a way how to store other content in the media library (Web radio channels, cinema+programs...):
    you might consider to use the existing refresh job and add own:
    • MediaItemAspects (store data in DB)
    • MetadataExtractor (extract or collect them from remote source)
    • ResourceProvider/Accessor (provide the "raw" access to the remote source)
    Then in principle you only need to add a custom media source which will be imported in each night run.
     

    BigGranu

    Development Group
  • Team MediaPortal
  • February 7, 2013
    238
    172
    49
    Germany Germany
    Country flag
    Following things are important:
    1. Check the interface's documentation in code file
    2. This is currently the only place where we use it in server, to schedule MediaLibrary imports: https://github.com/MediaPortal/Medi...aManagement/ImporterWorkerNewGen.cs#L524-L559
    3. The scheduler itself does not execute procedures, it only sends messages for due events. The plugin has to listen for those message: https://github.com/MediaPortal/Medi...aManagement/ImporterWorkerNewGen.cs#L417-L445
    I will test it again. But that's what I've tried the last days.
    I could see the start of the task, but the plugin did not get any message.
    However, I have registered as TaskId the id of the update module. :eek:

    OK. I will test it again.

    Thanks for your Help. (y)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom