Automated MediaLibrary imports (daily), testing required (1 Viewer)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Until now shares where only imported directly after creation and on demand of user. We have plans to improve the behavior (see also http://mantis.team-mediaportal.com/view.php?id=4402).

    The first part is now done:
    MP2's TaskScheduler service is now able to wakeup the computer correctly and to refresh all shares automatically! The new development is placed in branch https://github.com/MediaPortal/MediaPortal-2/tree/FEAT_ImporterSchedule.

    I've introduced a setting that defines the "hours of day", when a new share-refresh should be executed (default now is: 2.0, means daily 2:00 o'clock) (see https://github.com/MediaPortal/MediaPortal-2/compare/4b051297bf32^...b8f63cd9867f#L5R46)

    What's not yet done:
    In future (after release of Alpha 2) there will be FileSystemWatchers that will notify MP2 about changes in underlying file systems.

    @Testers: Please give this build a test run! http://tinyurl.com/p3xzv8b. When installed, it will schedule share refreshes daily on 2 o'clock (AM). I would need to know if this feature is working correctly, does it wake your system up? Are shares up-to-date?

    In server's logfile you will find something like (on suspend):

    [2013-05-26 18:39:55,057] [29827 ] [PwrEvtHnd] [DEBUG] - PowerEventHandler received Suspend
    [2013-05-26 18:39:55,063] [29833 ] [AMQ 'TaskScheduler'] [DEBUG] - TaskScheduler: Schedule next wake up: 05/26/2013 18:41:00 (in 1 minutes)

    and on resume:
    [2013-05-26 18:41:58,507] [153277 ] [WaitTimer] [DEBUG] - TaskScheduler: Wake up
    [2013-05-26 18:42:02,612] [157382 ] [31 ] [DEBUG] - UPnPServer: Initializing IP endpoint 'fe80::c47d:9d5a:a38e:7704'
    [2013-05-26 18:41:58,639] [153409 ] [Thread21 ] [DEBUG] - TaskScheduler: ProcessTask: Task: f87152be-6869-4de8-8ecd-11453d8d329c, Owner: ImporterWorker, Occurrence: Repeat, Type: time-based: D:-1-H:18-M:41, LastRun: 01.01.0001 00:00:00, NextRun: 26.05.2013 18:41:00, Expires: 31.12.9999 23:59:59, Wakeup: True, Force: True
    [2013-05-26 18:41:59,398] [154168 ] [PwrEvtHnd] [DEBUG] - PowerEventHandler received ResumeAutomatic
    [2013-05-26 18:42:11,389] [166160 ] [PwrEvtHnd] [DEBUG] - PowerEventHandler received ResumeSuspend

    and finally new import task should appear:
    [2013-05-26 18:42:15,810] [170581 ] [Importer ] [INFO ] - ImporterWorker: Starting import job 'ImportJob '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///C:/Users/Morpheus/Music''


    @Developers should investigate the scheduling features of the https://github.com/MediaPortal/Medi...al.Common/TaskScheduler/ITaskScheduler.cs#L28 interface and its implementation.


    Testing feedback is very much needed! This feature should be included in upcoming Alpha 2! So please give it a try :)

    Thanks,
    Morpheus
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #4
    Yes they are included. Only few already merged commits from dev are missing. But it should be ready for testing this single feature.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,544
    3,932
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I'm trying it two days now. The reimport starts at 2:00 AM as planed. If the wakeup is working I can't say atm as my Server did not jet went to sleep properly so most of the time it's up and running at 2:00 AM with or without MP2 server action... But implementing a WOL command before start of reimport is highly recommended as lots of people did not run their NAS 24/7 especially in the middle of the night... So most of the time the Import did not work properly as my NAS is asleep... I will try tonite letting NAS awake the whole night just to test the import- function, but that has to be a test only szenario.
     
    Last edited:

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,544
    3,932
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Now I've tried it with NAS running whole night. It works as expected.

    BTW how can I remove Media Items from DB? Delete them from File system and do a reimport did not remove them from DB...
    As example:
    Zwischenablage-1.jpg


    The first of the two S05E12 episodes was the raw, uncut TV Recording (.ts). In meantime I've cut and recoded it to a proper MKV. Now I've got both in DB also only one is available... Do I need to modify the SQLite DB (I'm using SQLite plugin for DB) with something like SQLiteExpert or is there a way inside MP2 do manually delete some entries?
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #7
    BTW how can I remove Media Items from DB? Delete them from File system and do a reimport did not remove them from DB...
    The importer does this "usually", so we need to investigate further! I will take a look
     

    Users who are viewing this thread

    Top Bottom