MP2 database won't keep in synch with recordings (1 Viewer)

Higgsy

Portal Member
June 24, 2020
5
0
Australia Australia
Country flag
Hi,
I’ve been struggling with MP 2 now for several weeks.
Initially all was fine. Then in the client, the listings of recorded TV programs suddenly wouldn’t update itself. In the top right hand corner above the display of time and date, the % imported is perpetually stuck on the same figure (see attachment). It seems to me that the part of the database that tracks the recordings can’t keep itself in synch with the recordings on file. This is despite the server part of MP2 still faithfully recording the programs as scheduled: it’s just the client won’t display them.
Based on a hint in these fora, I used "DBBrowser for SQLite" to confirm that C:\ProgramData\Team MediaPortal\MP2-Server\Database\Datastore.s3db did NOT have any rows in the table "M_RECORDINGITEM", with a [STARTTIME] later than what is displayed in the client. This is even though there’s plenty of TV recordings after then that DO exist on the hard drive.
Could this be because I manually deleted some old recordings through Windows/File Explorer/My Computer rather than through the client software?
I couldn’t figure out how to fix the situation, so I un-installed and then re-installed MP2. Everything was working again for a while.
Now it the exact same issue has happened again! Could it be because I played a recorded TV program through VLC rather than the client?
This is all happening on brand new hardware with Win10 in a single seat installation, i.e., client and server on same machine. I can supply MP2 logs and the PC’s system info if necessary.

Can anyone explain how to resolve this issue? Having to uninstall/re-install is a ridiculous workaround and if that’s the only way, I’ll be looking for some other player software instead of the MP2 client!
 

Attachments

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,478
    7,014
    Germany Germany
    Country flag
    You should try:
    1. Stop / Start MP2-Server service
    2. Then open MP2-Client, go to settings, media sources overview and click "re-import" on the "Recordings" share
    If it will not finish correctly please:
    1. Enable Debug logging
    2. Retry steps above
    3. Use Log Collector and attach logs here
     

    toricred

    MP Donator
  • Premium Supporter
  • August 29, 2006
    141
    9
    United States of America United States of America
    Country flag
    Higsy did you ever get this solved? I'm having a similar problem. I'll open a new thread if morpheus would like and I'll grab logs. I've already tried the first part multiple times.
     

    Higgsy

    Portal Member
    June 24, 2020
    5
    0
    Australia Australia
    Country flag
    Thanks for your advice morpheus_xx and Hi toricred,
    No, not solved. Like you, I've tried re-importing a few times. This last time the import progress indicator went quickly to 67%, then slowed and finally stopped at 79%. Now, the TV recordings section of the client shows program names, but within them, it always states <no items to display>
    I'm attaching the logs now. Fingers crossed.
     

    Attachments

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,478
    7,014
    Germany Germany
    Country flag
    I have checked your log files, but I couldn't see any obvious errors yet. But small issues are visible, so you should try following things:

    1. Your log contains errors of VideoThumbnailer, it cannot find required components. "[2020-07-11 04:50:43,714] [4154 ] [67 ] [INFO ] - TvThumbnails.VideoThumbCreator: No C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\SlimTv.Service3\ffmpeg.exe found to generate thumbnails of your video!"
      This is an expected error, the feature is not needed for MP2 and does not work. You should disable it inside TV configuration (uncheck "autocreate thumbs"):
      1594635946218.png

    2. MediaPortal 2 seems to be configured to use share watcher on recording media sources: "[2020-07-10 17:58:04,589] [83947980] [85 ] [INFO ] - MediaLibrary: Share watcher triggered import for path {e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///F:/Recorded TV/".
      This is not intended, the TV part handles refreshes internally on recording start/end. Share watcher could kick in too often. Please disable it inside MP2 media source configuration. Or see note below.
    3. I've seen the importer progress to reach ~77%: "[2020-07-11 04:52:08,632] [89072 ] [90 ] [INFO ] - ImporterWorker: 77 % completed (1 ImportJob(s), in total 775 of 1012 so far identified resources processed)"
      Import is done in parallel and even if processing single items stalls, it should continue with other files by other threads.
    You could try to remove the recording media source(s) from MP2 configuration, then stop & start the MP2 server again. This will auto-create the recording media sources with the intended defaults (it makes point 2 of list above obsolete). The server will then run a complete import when a recording starts/end (as explained above). You can force the initial import from within the configuration by pressing "import" in the media sources overview. Maybe it helps.
     

    Higgsy

    Portal Member
    June 24, 2020
    5
    0
    Australia Australia
    Country flag
    Thanks so much for your reply morpheus_xx.
    I'll try your suggestions and let you know if any joy.
    Regards,
     

    Higgsy

    Portal Member
    June 24, 2020
    5
    0
    Australia Australia
    Country flag
    OK, I carried out suggestions #1 & #3 (but only for TV recordings). The import progress indicator stopped again at 79%. Next I'll try removing all media sources.
     

    Higgsy

    Portal Member
    June 24, 2020
    5
    0
    Australia Australia
    Country flag
    OK, tried that. On opening MP2 client, it immediately started importing. This surprised me because I'd just deleted all references to media sources! The import was very slow, but did complete. Somehow it had 'remembered' where the TV recordings were stored (on a local drive). It forgot where movies were stored (on an external USB drive).
    Looking into TV recordings in the client, it shows program names AND the correct number of recordings—that got my hopes up, but drilling down into the programs, the client only shows <no items to display>.

    If I can't get any more suggestions on how to solve this, I'll try to completely uninstall MP2, then re-install and if this problem recurs, I guess I'll have to try another product (my partner is about to throttle me!). That seems a pity because at first it worked very well.
    In case anyone has time to look, I've attached the logfiles created after I tried all the above.
     

    Attachments

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,478
    7,014
    Germany Germany
    Country flag
    The import progress indicator stopped again at 79%. Next I'll try removing all media sources.
    Ok, the importer also remembers the queue of items that are still needed to be processed in settings file. If there is something stuck, it will try again on next server start and probably stuck again. But removing the media source also removes the associated queue.

    This surprised me because I'd just deleted all references to media sources! The import was very slow, but did complete. Somehow it had 'remembered' where the TV recordings were stored (on a local drive). It forgot where movies were stored (on an external USB drive).
    The server's TV plugin automatically creates the media sources for recordings as I explained above, so this is expected (y) You did not need to remove other (movies) media sources, only the recording related ones.

    Looking into TV recordings in the client, it shows program names AND the correct number of recordings—that got my hopes up, but drilling down into the programs, the client only shows <no items to display>.
    I think the import was not finished completely yet, it works in multiple passes. At 2:00 o'clock also a scheduled refresh of all media sources happens, so you might check it again if it is done now.


    When I look at your log file I see multiple .wtv files are resulting in error messages.
    [2020-07-16 05:21:58,005] [8220 ] [75 ] [INFO ] - VideoMetadataExtractor: Exception reading resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///F:/Recorded TV/8 Out Of 10 Cats Does Countdown_SBS VICELAND HD_2019_05_14_20_30_00.wtv' (Text: 'Nullable object must have a value.')
    System.InvalidOperationException: Nullable object must have a value.
    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
    at System.Nullable`1.get_Value()
    at MediaPortal.Extensions.MetadataExtractors.VideoMetadataExtractor.VideoMetadataExtractor.VideoResult.UpdateMetadata(IDictionary`2 extractedAspectData, ILocalFsResourceAccessor lfsra, Int32 partNum, Int32 partSet, Boolean refresh, Boolean reimport)
    at MediaPortal.Extensions.MetadataExtractors.VideoMetadataExtractor.VideoMetadataExtractor.<TryExtractMetadataAsync>d__49.MoveNext()

    I have added some sanity checks to avoid this kind or errors. Please try the attached plugin. Steps:
    1. download and extract it
    2. stop MP2-Server and MP2-Client
    3. Copy the "VideoMetadataExtractor" folder into C:\Program Files (x86)\Team MediaPortal\MP2-Client\Plugins\
    4. Copy the "VideoMetadataExtractor" folder into C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\
    5. Restart MP2-Server and MP2-Client
    6. Go to MP2-Client media source overview and hit "refresh" on the recording sources to force the importer to synchronize the sources
     

    Attachments

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

    OP Similar threads Forum Replies Date
    D PC rebuild & MP2 upgrade - how to preserve database and settings? General 1
    Scheibes Was passiert bei MP2? Allgemeines Support- und Diskussionsforum 23
    S Programmierte Aufnahme in MP2 - kein Aufwachen des PC Allgemeines Support- und Diskussionsforum 5
    morpheus_xx [WiP] "What's New" plugin for MP2 upgrades MediaPortal 2 6
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    morpheus_xx [Evaluate] Checking MP2 code portability to .Net Core MediaPortal 2 11
    da3dsoul Does MP2 not have any active devs? General 8
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    R [solved] Kein Player registriert Allgemeines Support- und Diskussionsforum 1
    -Merkur- MP2 Client startet nicht, "libXBMC_addon.dll" fehlt Allgemeines Support- und Diskussionsforum 1
    mp2-ulrich [solved] MP 2.2.3 spielt nur manche Sender Allgemeines Support- und Diskussionsforum 2
    H [solved] MP2 Wiedergabe von Aufnahmen und Live TV geht nicht Allgemeines Support- und Diskussionsforum 6
    ge2301 [WiP] MP2Web - A platform independent web client for MP2 MediaPortal 2 68
    F Problems with new install of MP2 Newcomers Forum 3
    catalpa Bug MP2-837 Allgemeines Support- und Diskussionsforum 2
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    bigboss97 Does anyone has a SoundGraph imon remote file for MP2 to share? General 0
    ge2301 Android based client for MP2 MediaPortal 2 3
    R MP2 GUI Issues General 7
    P [solved] MP2 new install, 2 x hdhomerun tuners, client on same PC unable to view TV & recordings Newcomers Forum 8
    Lichloathe MP2 importing keyart instead of poster General 0
    Lichloathe Trakt for MP2 question General 7
    C Streaming/transcoding MP2 vs MP1? General 4
    P MP 2 - Request to add an additional TV series Filename protocal Feature Requests 0
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    Similar threads

























    Top Bottom