Plugin: MP2Extended (1 Viewer)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @johanj
    Could you try the attached version? I created my own app trying to make the requests as fast as possible to all movies in my collection, but I had no luck in reproducing this.
    The only static class is the caching class. I added locks around the functions. Hopefully it helps?!

    I guess you know that you have to clear the cache^^

    Edit: see next post for latest version
     
    Last edited:

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    In this version I also tried to fix the Recordings (at least the genres).
    Could you also upload your server.log again? I found a few exceptions and tried to fix them. I changed the logging a bit to give me more information. So that would be really kind :)
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    832
    Home Country
    Denmark Denmark
    The Thumbnailer has access but the Trascodingsrvice doesn't.
    The TranscodingService metadata extractors uses the MediaAnalyzer which again uses the following code:
    Code:
    ProcessExecutionResult executionResult;
    lock (FFPROBE_THROTTLE_LOCK)
      executionResult = FFMpegBinary.FFProbeExecuteWithResourceAccessAsync(lfsra, arguments, ProcessPriorityClass.Idle, AnalyzerTimeout).Result;
    Looks familiar? Only difference is FFProbe vs FFMpeg, so that should not cause the problem right?
    MediaAnalyzer also additionally accesses the file if the codec is H264 or the container is MPEG2 TS. I can see from the log that it is MPEG2 TS containers so that could be the problem, but the call is like:
    Code:
    FileStream raf = null;
    ILocalFsResourceAccessor lfsra = (ILocalFsResourceAccessor)info.Metadata.Source;
    try
    {
      // Impersonation
      using (ServiceRegistration.Get<IImpersonationService>().CheckImpersonationFor(lfsra.CanonicalLocalResourcePath))
      {
        raf = File.OpenRead(lfsra.LocalFileSystemPath);
        byte[] packetBuffer = new byte[193];
        raf.Read(packetBuffer, 0, packetBuffer.Length);
        ....
      }
    }
    finally
    {
      if (raf != null) raf.Close();
    }
    Which should be OK, right? Only thing I can see is that the FileStream is closed outside the scope of the impersonation, so I moved it inside.
    Could that be the cause?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    To be honest: I have no idea... I guess a test setup would be nice. For this a network share with user and pw is required where the user and pw is not the same like the one on the client comouter

    I just followed mjgrafs comments during the importer rework. My network is really open. So no secrets and pws :D
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    47
    Home Country
    Sweden Sweden
    My setup is like that. Recordings stored on a network share and I need to enter credentials in MP2 settings in order to access its folder. I test with MP2 and MPExt on my laptop that has different credentials. So please add hensos fix in a build that you post here.

    It was late when I tested the thumds of the recordings. It was only a few of them that showed but I didnt notice what they had in common at the time. Will check this in the evening.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I think I finally found the issue :)
    I create an instance of every micromodule on the first request. local vars of one instance are shared between threads. And I hope this was the issue.
    New version attached :)
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    So please add hensos fix in a build that you post here.
    Attached build is with hensos fix. Hopefully it will do the trick :) It should have no effect on the thumbs but on the getMediaInfo call.
    I think it is clear that you have to reimport your recordings, sorry for all the trouble... It is great and a lot of fun for me to work with you ;)

    Likewise with you henso :)
     

    Attachments

    • Plugins.rar
      2 MB

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    47
    Home Country
    Sweden Sweden
    It's fun for me to when things are moving fast:) Just a side note. Kodi couldn't(can't?) resize images when using their webserver/rpc so people requested this. The developers just complained that it wouldn't work on slow hardware etc., someone made a patch years ago but it was not included. For fun I searched for it yesterday and could find the feature in a relase note from this year but I couldn't find any example or wiki that explains how it works.

    One question. Is it enough to import recordings in TV server configuration and not as a MP2 media source? I find it really annoying with the recordings are automatically added to movies/series section.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,580
    3,971
    Lehmden
    Home Country
    Germany Germany
    Hi.
    graphics from recording is not a poster, it's an extracted still from the video file
    There always is an extracted still from the video stored in the Database as a thumb. This can be used any time, no matter if there is a poster or not. Only exception is if the thumbnail generation has failed due to e.g. corrupted video or similar.
     

    Users who are viewing this thread

    Top Bottom