candidate for next Weekly (1 Viewer)

breese

Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    67
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I cleared out my DB, Fanart, and TheMovieDB
    Did a fresh import of MPMovies (including the nfo for movie 1941)
    Low and behold 1941 is now in Movies.
    So, adding an nfo and then doing a Reimport of movies does not work.......
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,584
    3,973
    Lehmden
    Home Country
    Germany Germany
    Hi.
    While this might help me for the moment, I do not see it helping MP2 development or anyone wishing to use MP2.
    If it is going to require (and I hope it is not the case) that everything be converted to a Media Type and or Include an NFO type...
    This is no MP2 related issue. The only difference here is that other programs may bother the user during Import permanently and MP2 did not. You will never have an accurate match if you don't prepare your media collection properly. How on earth it should be possible for a software to know which of your 20 matches for "A Christmas Carol" is the right one if you don't want to help a bit? Mind reading is not possible at the recent status of technology (and I hope this never will be). In principle it did not matter if you manually rename "A chrismas carol.mp4" to "A chrismas carol [tt0087056].mp4" by hand or let a program automatically add .nfo files to your movies. Later one is much less work as it is done by a program and not by yourself.

    Anyone who did not care about his/her media library can play all movies from within MP2 no matter if they are identified or not. So for this nfo files or metatags are not required (and they never will be). But if you want to have your collection nice and clean you need to do some manual work before you can import them into the Library. This is true for MP2 but also for MP1, Kodi, Plex or whatever media software you're using. The amount of preparation did not differ at all from past as I was using MP1 with Moving Pictures to now that I'm using MP2. Only real difference is, that MP2 always gives me a 100% match without any interaction. Something no other software including MP1 ever was able to do. So for me MP2 is the best software regarding identification I ever tried. And I've tried a lot...

    So, adding an nfo and then doing a Reimport of movies does not work.......
    Can you upload the .nfo, please. As I have done some thousand movie imports now with .nfo and not a single one ever failed. So I'm sure there is something wrong with the .nfo...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,584
    3,973
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Sorry didn't see that. Nfo is OK. Have done a .ts (the only not MKV video I can get hands on that fast) renamed it to 1941.ts add the .nfo and trigger a reimport in my ML... And here you go:
    Clipboard 1.jpg


    100% perfect match, as always... I suspect we are both using the recent weekly version of MP2, am I right? So you must have done something wrong but I don't know what. Did the video file and the .nfo have the same name (excerpt for the extension ofc)?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,584
    3,973
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I was able to find a .mp4 video deep down in my file system. Result is the same, perfect match.

    If I understand it right you've added the .nfo after an import without successful identification, right? Of course you then first need to remove the movie from the share and then do a reimport to get rid of the false identified movie. Now this video is removed from the ML. Then you can add the movie and the .nfo back again and do a reimport. Now all should work properly.
    Or at least you need to modify the file somehow so it looks like a different file to MP2. If it did not look different, MP2 did not scan for it during a reimport. Only videos that wasn't there on or different to last import (e.g. replace a low resolution video by a high resolution video of the same movie) are scanned. Modification can be done by changing the "file creation date flag" or similar. But most of the time it is easier to simply move it away while doing a reimport.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Some more investigation to breese's problem. Result first: So far I cannot reproduce this exception:
    [2015-04-03 17:45:46,170] [3898683] [57 ] [WARN ] - MkvAttachmentsProvider: Exception while reading mkv attachment of type 'FanArt' from ''
    MediaPortal.Utilities.Exceptions.IllegalCallException: Cannot create resource accessor for resource location '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///F:/MPMovies/1941.mp4' at system '466406a6-a7a9-4372-9f5f-a8bf68d3928d'
    at MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
    at MediaPortal.Extensions.UserServices.FanArtService.Local.MkvAttachmentsProvider.TryGetFanArt(FanArtMediaType mediaType, FanArtType fanArtType, String name, Int32 maxWidth, Int32 maxHeight, Boolean singleRandom, IList`1& result)
    What I did is:
    • I downloaded a valid MP4 file ("Sample MP4 Video File") from here (as I don't have MP4s)
    • I copied it into an otherwise empty folder on my MP2-Server and renamed it to "1941.mp4"
    • I added this directory as a Server MediaSource with the LocalFSResourceProvider and MediaTypes Video/Movie
    The import looks like this:
    Code:
    [2015-04-05 13:33:58,967] [113520 ] [39  ] [INFO ] - MediaLibrary: Registering share 'cecbf6ea-effb-4f5a-9215-21d188fea9cc' at system 4774efb2-c7d5-4258-8345-542b67755803: Setting name 'MP4-test', base resource path '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///Z:/Media/Video/MP4-test/' and media categories 'Video, Movie'
    [2015-04-05 13:33:58,971] [113524 ] [39  ] [INFO ] - ImporterWorker: Import for path '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///Z:/Media/Video/MP4-test/', MediaCategories: 'Video,Movie', including subdirectories requested...
    [2015-04-05 13:33:59,033] [113586 ] [5  ] [INFO ] - ImporterWorker: Scheduled ImportJob(#1) (Activated) (Path ='{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///Z:/Media/Video/MP4-test/', ImportJobType='Import', IncludeSubdirectories='True')
    [2015-04-05 13:33:59,066] [113619 ] [19  ] [DEBUG] - ImporterWorker.ImportJob(#1).DirectoryUnfoldBlock: Successfully processed 1 MediaItems; time elapsed: 00:00:00.0311272; MaxDegreeOfParallelism(InnerBlock) = 1
    [2015-04-05 13:33:59,178] [113731 ] [19  ] [DEBUG] - ImporterWorker.ImportJob(#1).DirectorySaveBlock: Successfully processed 1 MediaItems; time elapsed: 00:00:00.0380343; MaxDegreeOfParallelism(InnerBlock) = 1
    [2015-04-05 13:33:59,362] [113915 ] [32  ] [DEBUG] - ImporterWorker.ImportJob(#1).FileUnfoldBlock: Successfully processed 2 MediaItems; time elapsed: 00:00:00.1153546; MaxDegreeOfParallelism(InnerBlock) = 1
    [2015-04-05 13:33:59,574] [114127 ] [5  ] [INFO ] - ImporterWorker.ImportJob(#1): Activated
    [2015-04-05 13:33:59,593] [114146 ] [35  ] [DEBUG] - PluginManager: Trying to activate plugin 'ShellThumbnailProvider' (id 'a2cf09c5-d4d0-43ac-89a8-3ecf5ed2510b')
    [2015-04-05 13:33:59,597] [114150 ] [35  ] [INFO ] - PluginManager: Plugin 'ShellThumbnailProvider' (id 'a2cf09c5-d4d0-43ac-89a8-3ecf5ed2510b') activated.
    [2015-04-05 13:33:59,599] [114152 ] [35  ] [DEBUG] - PluginManager: Trying to activate plugin 'WICThumbnailProvider' (id 'ff0f8b29-881e-48a9-9a47-4ef04c6c56e0')
    [2015-04-05 13:33:59,600] [114153 ] [35  ] [INFO ] - PluginManager: Plugin 'WICThumbnailProvider' (id 'ff0f8b29-881e-48a9-9a47-4ef04c6c56e0') activated.
    [2015-04-05 13:33:59,759] [114312 ] [35  ] [DEBUG] - MovieTheMovieDbMatcher: Try to lookup movie "1941" from cache: False
    [2015-04-05 13:34:00,081] [114634 ] [39  ] [WARN ] - Error handling SOAP request: Ungültige Daten auf Stammebene. Zeile 1, Position 1.
    [2015-04-05 13:34:00,267] [114820 ] [35  ] [DEBUG] - TheMovieDbWrapper  : Test Match for "1941"
    [2015-04-05 13:34:00,268] [114821 ] [35  ] [DEBUG] - TheMovieDbWrapper  : Multiple matches for "1941" (17). Try to find exact name match.
    [2015-04-05 13:34:00,276] [114829 ] [35  ] [DEBUG] - TheMovieDbWrapper  : Multiple matches found for "1941" (count: 3)
    [2015-04-05 13:34:00,277] [114830 ] [35  ] [DEBUG] - MovieTheMovieDbMatcher: No unique match found for "1941"
    [2015-04-05 13:34:00,277] [114830 ] [35  ] [DEBUG] - ImporterWorker.ImportJob(#1).MetadataExtractorBlock_Full: Successfully processed 2 MediaItems; time elapsed: 00:00:00.9155576; MaxDegreeOfParallelism(InnerBlock) = 20
    [2015-04-05 13:34:00,285] [114838 ] [35  ] [DEBUG] - ImporterWorker.ImportJob(#1).MediaItemSaveBlock: Successfully processed 1 MediaItems; time elapsed: 00:00:00.8177067; MaxDegreeOfParallelism(InnerBlock) = 1
    [2015-04-05 13:34:00,286] [114839 ] [35  ] [INFO ] - ImporterWorker.ImportJob(#1): Completed
    [2015-04-05 13:34:00,289] [114842 ] [35  ] [INFO ] - ImporterWorker.ImportJob(#1): Disposed
    To me this looks like perfectly right behavior. The TheMovieDbWrapper tries to find a unique match, but cannot because the file name has no IMDB number in it.
    Then I fired up the MP2-Client (with Titanium-Skin, 10th AE theme - as you did from your logs, breese) and entered the video section. On the server side this looks like
    Code:
    [2015-04-05 13:35:00,819] [175372 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.UserServices.FanArtService.AlbumThumbs' (Id '{C9D5883D-99C6-4607-8B22-EF5DB2CFBE7B}')
    [2015-04-05 13:35:00,822] [175375 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.UserServices.FanArtService.MediaItemThumbs' (Id '{D2D15B97-18F2-4224-8204-67C890403FDA}')
    [2015-04-05 13:35:00,822] [175375 ] [50  ] [DEBUG] - PluginManager: Trying to activate plugin 'Local FanArt provider' (id '584814be-14cb-4dfc-85f7-94b5a90f7fb3')
    [2015-04-05 13:35:00,823] [175376 ] [50  ] [DEBUG] - PluginManager: Checking activation of plugin dependency 'bda68c24-eea3-47d0-b43a-86e086e43ae1' for plugin 'Local FanArt provider'
    [2015-04-05 13:35:00,824] [175377 ] [50  ] [DEBUG] - PluginManager: Checking activation of plugin dependency '3f5077f0-16e8-47e7-ad4b-e295812c174a' for plugin 'Local FanArt provider'
    [2015-04-05 13:35:00,826] [175379 ] [50  ] [INFO ] - PluginManager: Plugin 'Local FanArt provider' (id '584814be-14cb-4dfc-85f7-94b5a90f7fb3') activated.
    [2015-04-05 13:35:00,827] [175380 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.UserServices.FanArtService.Local.LocalFanartProvider' (Id '{279D584D-9C31-425D-B71B-154FD84B8F9F}')
    [2015-04-05 13:35:00,829] [175382 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.UserServices.FanArtService.Local.MkvAttachmentsProvider' (Id '{B3B36840-C9E2-4B25-B630-7F6662E48D83}')
    [2015-04-05 13:35:00,829] [175382 ] [50  ] [DEBUG] - PluginManager: Trying to activate plugin 'Movies FanArt Provider' (id '43b51dc0-4ca0-4e55-9c0d-d25b06638909')
    [2015-04-05 13:35:00,830] [175383 ] [50  ] [DEBUG] - PluginManager: Checking activation of plugin dependency 'b32504f3-4374-4640-94a1-16e1dee84c3c' for plugin 'Movies FanArt Provider'
    [2015-04-05 13:35:00,831] [175384 ] [50  ] [DEBUG] - PluginManager: Checking activation of plugin dependency 'bda68c24-eea3-47d0-b43a-86e086e43ae1' for plugin 'Movies FanArt Provider'
    [2015-04-05 13:35:00,833] [175386 ] [50  ] [INFO ] - PluginManager: Plugin 'Movies FanArt Provider' (id '43b51dc0-4ca0-4e55-9c0d-d25b06638909') activated.
    [2015-04-05 13:35:00,834] [175387 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.UserServices.FanArtService.TMDB.MovieFanartProvider' (Id '{EFFB4535-C275-446D-AD60-0080D83470F5}')
    [2015-04-05 13:35:00,834] [175387 ] [50  ] [INFO ] - Successfully activated Fanart provider 'MediaPortal.Extensions.MetadataExtractors.SeriesMetadataExtractor.FanartProvider.SeriesFanartProvider' (Id '{73520BB9-112F-4208-90A8-C406E00AC192}')
    [2015-04-05 13:35:00,985] [175538 ] [53  ] [DEBUG] - No FanArt for 0d66a813-2cb4-4501-a904-43fe2daf1c11 'FanArt' of type 'Movie'
    [2015-04-05 13:35:01,051] [175604 ] [53  ] [DEBUG] - No FanArt for 0d66a813-2cb4-4501-a904-43fe2daf1c11 'Poster' of type 'Movie'
    [2015-04-05 13:35:02,957] [177510 ] [53  ] [DEBUG] - No FanArt for 0d66a813-2cb4-4501-a904-43fe2daf1c11 'FanArt' of type 'Movie'
    Again nothing wrong here.
    The MP2-Client looks like
    upload_2015-4-5_13-52-47.png

    (grid view), which is also fine.
    So there must be something different on your side, breese.
    Can you somehow play around with different views (grid view, list view) and filters or maybe remove all your shares and (as I did) only put that single video file in a directory, add it as MediaSource and see whether this exception still happens? Thanks!
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    67
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    Done what you asked.....
    Funny thing is I have not found a way to Duplicate that error.... Wish I could but there are a lot of issues I have reported sense these Weekly Releases.
    In some cases, Morph has not been able to reproduce yet found 1 or 2 issue fixes.

    Here is another one while trying to reproduce what you asked for.


    [2015-04-05 07:15:18,171] [21151 ] [DX Render] [DEBUG] - ScreenManager: Closing screen 'shares_config_edit_name'
    [2015-04-05 07:15:19,936] [22916 ] [DX Render] [DEBUG] - ContentManager: 0 resources deallocated, next cleanup in 10 seconds. 108.868869781494/100 MB
    [2015-04-05 07:15:20,221] [23201 ] [Thread15 ] [DEBUG] - ThreadPool.ProcessQueue(): Quitting (inUse: 0, total: 2)
    [2015-04-05 07:15:20,301] [23281 ] [AMQ 'MenuModel'] [ERROR] - Unhandled exception in message handler of async message queue 'MenuModel' when handling a message of type 'UpdateMenu'
    UPnP.Infrastructure.CP.UPnPException: Error invoking action 'X_MediaPortal_GetShares' ---> UPnP.Infrastructure.CP.UPnPRemoteException: Network error when invoking action 'X_MediaPortal_GetShares': The underlying connection was closed: The connection was closed unexpectedly.
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.AsyncActionCallResult.GetOutParams()
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.EndInvokeAction(IAsyncResult result)
    --- End of inner exception stack trace ---
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.EndInvokeAction(IAsyncResult result)
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.InvokeAction(IList`1 inParameters)
    at MediaPortal.Common.Services.ServerCommunication.UPnPContentDirectoryServiceProxy.GetShares(String systemId, SharesFilter sharesFilter)
    at MediaPortal.UiComponents.SkinBase.Actions.SetupDefaultSharesAction.get_CanSetupDefaultShares()
    at MediaPortal.UiComponents.SkinBase.Actions.SetupDefaultSharesAction.IsActionVisible(NavigationContext context)
    at MediaPortal.UI.Presentation.Workflow.WorkflowContributorAction.IsVisible(NavigationContext context)
    at MediaPortal.UiComponents.SkinBase.Models.MenuModel.TryUpdateMenuEntries(NavigationContext context, ItemsList menuItems, IList`1 newActions, ICollection`1& changedItems)
    at MediaPortal.UiComponents.SkinBase.Models.MenuModel.UpdateMenu(NavigationContext context)
    at MediaPortal.UiComponents.SkinBase.Models.MenuModel.UpdateMenus()
    at MediaPortal.UiComponents.SkinBase.Models.MenuModel.CheckUpdateMenus()
    at MediaPortal.UiComponents.SkinBase.Models.MenuModel.OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
    at MediaPortal.Common.Messaging.AsynchronousMessageQueue.DoWork()
    [2015-04-05 07:15:20,306] [23286 ] [AMQ 'SharesConfigModel'] [ERROR] - Unhandled exception in message handler of async message queue 'SharesConfigModel' when handling a message of type 'RegisteredSharesChanged'
    UPnP.Infrastructure.CP.UPnPException: Error invoking action 'X_MediaPortal_GetShares' ---> UPnP.Infrastructure.CP.UPnPRemoteException: Network error when invoking action 'X_MediaPortal_GetShares': The underlying connection was closed: The connection was closed unexpectedly.
    at UPnP.Infrastructure.CP.DeviceTree.CpAction.AsyncActionCallResult.GetOutParams()
     

    Attachments

    • Matches.xml
      336 bytes

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    And as a code investigation to MkvAttachmentsProvider:
    I did change this class during my NetworkRA rework. I changed this:
    Code:
    var resourceLocator = mediaItem.GetResourceLocator();
    using (var accessor = resourceLocator.CreateAccessor())
    {
       ILocalFsResourceAccessor fsra = accessor as ILocalFsResourceAccessor;
       if (fsra != null)
       {
          fileSystemPath = fsra.LocalFileSystemPath;
          var ext = Path.GetExtension(fileSystemPath);
          if (!SUPPORTED_EXTENSIONS.Contains(ext))
             return false;
          MatroskaInfoReader mkvReader = new MatroskaInfoReader(fileSystemPath);
          byte[] binaryData = null;
          if (patterns.Any(pattern => mkvReader.GetAttachmentByName(pattern, out binaryData)))
          {
             result = new List<FanArtImage> { new FanArtImage(name, binaryData) };
             return true;
          }
       }
    }
    into this:
    Code:
    var resourceLocator = mediaItem.GetResourceLocator();
    using (var accessor = resourceLocator.CreateAccessor())
    {
       ILocalFsResourceAccessor fsra = accessor as ILocalFsResourceAccessor;
       if (fsra != null)
       {
          var ext = Path.GetExtension(fsra.LocalFileSystemPath);
          if (!SUPPORTED_EXTENSIONS.Contains(ext))
             return false;
          MatroskaInfoReader mkvReader = new MatroskaInfoReader(fsra);
          byte[] binaryData = null;
          if (patterns.Any(pattern => mkvReader.GetAttachmentByName(pattern, out binaryData)))
          {
             result = new List<FanArtImage> { new FanArtImage(name, binaryData) };
             return true;
          }
       }
    }
    These changes were made so that we don't keep a LocalFileSystemPath without a using(fsra.EnsureLocalFileSystemAccess()). The first access to LocalFileSystemPath is only for purposes of a string operation (get the extension of the filename), which is why it is not necessary to ensure file system access. The second usage as changed. We now give the RA down to the MatroskaInfoReader so that the latter can directly use the extension-method to start an external process with access to that resource.
    In any case, both changes affect the code after "var resourceLocator = mediaItem.GetResourceLocator();" - and this is where the exception happens. So these changes are not related to that exception.

    Could the exception when creating a resource accessor could be related to my change in LFSRA regarding the FileShare.ReadWrite?
    Hmmmm... Theoretically this could be the case, but then it wouldn't have worked before, either, just with another (or no) error message...
    Assume that we open the file (before you did the change) with OpenRead. Then another process (such as MkvExtract) tried to access the file - which failed. Then we close our stream and reopen it with OpenRead, which worked.
    Now with your changes, behavior may be different. First OpenRead works. Now the external process would not fail (because we allow other processes to access the file while we have it open). Closing our first stream works as well. But depending on the open mode of the external process, opening the file a second time with OpenRead might fail if the external process hasn't finished, yet.
    So theoretically, yes, this could be the reason. When creating the RA, we do not call OpenRead, but we check for existence of the file or directory - no idea how File.Exists reacts on files that are opened by another process, though....

    So I'm still a bit clueless here...
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    67
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    While trying to figure out how to duplicate it... different menus, settings, etc....
    I went into TV and got an exception...
    Things seem to keep changing errors depending on what you do...

    [2015-04-05 07:40:24,834] [294219 ] [Thread96 ] [WARN ] - ThreadPool.ProcessQueue(): Exception during processing work ''
    System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
    at MediaPortal.Utilities.Collections.SafeDictionary`2.set_Item(TKey key, TValue value)
    at MediaPortal.Plugins.SlimTv.Client.Models.SlimTvClientModel.CreateProgramListItem(IProgram program, ListItem itemToUpdate, IProgram previousProgram)
    at MediaPortal.Plugins.SlimTv.Client.Models.SlimTvClientModel.GetNowAndNextProgramsList()
    at MediaPortal.Common.Threading.Work.Process()
    at MediaPortal.Common.Services.Threading.ThreadPool.ProcessQueue()
     

    Users who are viewing this thread

    Top Bottom