Super957 23 Posted May 12, 2022 Share Posted May 12, 2022 (edited) I search to update my libraries because i insert ne library "Music"...no info are found. So i open and log file and i ask you why so many error.... Could it be a consequence of the synchronization of the disks on the Qnap as I am expanding the capacity of the disks by replacing them one by one? Thank Hispa embyserver (10).rar Edited May 12, 2022 by Super957 Link to comment Share on other sites More sharing options...
Solution Luke 37112 Posted May 12, 2022 Solution Share Posted May 12, 2022 Hi, try removing the Iconic plugin. 1 Link to comment Share on other sites More sharing options...
roaku 795 Posted May 12, 2022 Share Posted May 12, 2022 (edited) @Luke Yes, Iconic is error-ing out near the beginning of its process when it tries to find the library the item of the requested image is in. This is to determine if that library is activated for Iconic. That's also the first point in the code the plugin attempts to use the Plugin.Instance.PluginConfiguration object. So, I would guess that Iconic's configuration xml file isn't readable for some reason right now or is otherwise malformed, preventing Emby from serializing the xml into the configuration object Iconic reads from, resulting in the null reference. The only other thing I can think of is that my code assumes ILibraryManager.GetCollectionFolders will never return null. If that method returns null, the plugin would react badly like this. Edited May 12, 2022 by roaku Link to comment Share on other sites More sharing options...
Luke 37112 Posted May 12, 2022 Share Posted May 12, 2022 If you want to show me the code for the Supports method I might be able to spot something. Link to comment Share on other sites More sharing options...
roaku 795 Posted May 13, 2022 Share Posted May 13, 2022 3 minutes ago, Luke said: If you want to show me the code for the Supports method I might be able to spot something. Sure, thanks. The exception is happening in the GetLibraryId method, which Supports is calling, so I'm showing both here: bool IImageEnhancer.Supports(BaseItem item, ImageType imageType) { if (!CheckPlatform()) { return false; } //The call that leads to the error Nullable<Guid> libraryIdOption = GetLibraryId(item); if (!libraryIdOption.HasValue) { return false; } LibraryGroup libraryGroup = GetLibraryGroup(libraryIdOption.Value); if (libraryGroup == null || !libraryGroup.Active) { return false; } return DoProcess(item); } private Nullable<Guid> GetLibraryId(BaseItem item) { Nullable<Guid> libraryIdOption = null; //I'm not expecting/handling a null here Folder[] test = _libraryManager.GetCollectionFolders(item); foreach (Folder f in test) { //If some portion of this object doesn't exist, I expect this ContainsKey check would trigger the null exception if (Plugin.Instance.PluginConfiguration.LibraryGroups.ContainsKey(f.Id)) { libraryIdOption = f.Id; break; } } return libraryIdOption; } Link to comment Share on other sites More sharing options...
Luke 37112 Posted May 13, 2022 Share Posted May 13, 2022 Try just using var instead of the Folder class, in both places in the GetLibraryId method. Link to comment Share on other sites More sharing options...
roaku 795 Posted May 13, 2022 Share Posted May 13, 2022 1 hour ago, Luke said: Try just using var instead of the Folder class, in both places in the GetLibraryId method. Ok, I'll revisit that code soon. 1 Link to comment Share on other sites More sharing options...
Super957 23 Posted May 13, 2022 Author Share Posted May 13, 2022 (edited) 20 hours ago, Luke said: Hi, try removing the Iconic plugin. Yep thank i uninstall and solved Hispa Edited May 13, 2022 by Super957 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now