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

Higgsy

Portal Member
June 24, 2020
5
0
Home Country
Australia Australia
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

  • Scrshot.jpg
    Scrshot.jpg
    27.9 KB

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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
    151
    14
    Home Country
    United States of America United States of America
    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
    Home Country
    Australia Australia
    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

    • MediaPortal2-Logs-2020-07-11-04.53.04.zip
      1.5 MB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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
    Home Country
    Australia Australia
    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
    Home Country
    Australia Australia
    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
    Home Country
    Australia Australia
    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

    • MediaPortal2-Logs-2020-07-16-06.37.58.zip
      1.7 MB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    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

    • 20200716_VideoMetadataExtractor.zip
      90.5 KB

    Users who are viewing this thread

    Top Bottom