Happy2Play 8297 Posted August 11, 2015 Share Posted August 11, 2015 (edited) @@chef It launches now. Ran search on movies and got Unhandled exception. An item with the same key has already been added System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at ThumbMaker.MediaLocator.VB$StateMachine_2_MovieNames.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state) ************** Loaded Assemblies **************mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------Thumb Maker Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/Thumb%20Maker.exe----------------------------------------Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 12.0.52242.36242 built by: FX452RTMLDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------MediaBrowser.Model Assembly Version: 3.0.5666.4 Win32 Version: 3.0.5666.4 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/MediaBrowser.Model.DLL----------------------------------------MediaBrowser.ApiInteraction Assembly Version: 3.0.5664.41652 Win32 Version: 3.0.5664.41652 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/MediaBrowser.ApiInteraction.DLL----------------------------------------System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------Newtonsoft.Json Assembly Version: 6.0.0.0 Win32 Version: 6.0.8.18111 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/Newtonsoft.Json.DLL----------------------------------------System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll----------------------------------------System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll----------------------------------------System.Xml.Linq Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll----------------------------------------System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll---------------------------------------- ************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled. For example: <configuration> <system.windows.forms jitDebugging="true" /></configuration> When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box. Value cannot be null See the end of this message for details on invokingjust-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************System.ArgumentNullException: Value cannot be null.Parameter name: address at System.Net.WebClient.DownloadData(String address) at ThumbMaker.ShowThumb.ShowThumb_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies **************mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------Thumb Maker Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/Thumb%20Maker.exe----------------------------------------Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 12.0.52242.36242 built by: FX452RTMLDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------MediaBrowser.Model Assembly Version: 3.0.5666.4 Win32 Version: 3.0.5666.4 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/MediaBrowser.Model.DLL----------------------------------------MediaBrowser.ApiInteraction Assembly Version: 3.0.5664.41652 Win32 Version: 3.0.5664.41652 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/MediaBrowser.ApiInteraction.DLL----------------------------------------System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------Newtonsoft.Json Assembly Version: 6.0.0.0 Win32 Version: 6.0.8.18111 CodeBase: file:///C:/Users/Doug/Desktop/Thumb%20Maker/Thumb%20Maker/Newtonsoft.Json.DLL----------------------------------------System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll----------------------------------------System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll----------------------------------------System.Xml.Linq Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll----------------------------------------System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll---------------------------------------- ************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled. For example: <configuration> <system.windows.forms jitDebugging="true" /></configuration> When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box. Edited August 11, 2015 by Happy2Play 1 Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 11, 2015 Share Posted August 11, 2015 Image where logo didn't get placed correctly (have several like this) This image causes the null address error every time. Might be that the movie name starts with a special character? 1 Link to comment Share on other sites More sharing options...
Happy2Play 8297 Posted August 11, 2015 Share Posted August 11, 2015 Looks like "Value cannot be null." is thrown for not having a "LOGO" image. 2 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 11, 2015 Share Posted August 11, 2015 (edited) Thanks guys! I have to fix a couple I found too, like when there is no logo present to overlay. If there is no logo present, maybe just text for the name? I have to work on the sizing of the logo. It seems there have to be serveral sizing conditions if the logo is to tall or to long for the thumb. There maybe a very large Select condition to try and size the logo properly. The same key error is because of the dictionary it uses to sort the titles. I will have to look further into that error. The tv series scan not ending is an interesting one. There will have to be conditions to exit the query if all series have thumbs. Currently I am actually missing quite a few, so I'll try and finish this so I can see where the query needs to end in the code. Edited August 11, 2015 by chef 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 12, 2015 Share Posted August 12, 2015 Almost there! Wanna see if this fixes some errors? And if it places logos better? 1. Use text graphics to write the Media Item name on the thumb image, if a logo doesn't exist. 2. The placement of the logos as an overlay uses better conditions, but some of the math to re-size the logo properly (and keep aspect ratio of the image) is really hard, I had to figure out percentages of reduced height and apply it to the width. The math might be wrong. https://dl.dropboxusercontent.com/u/46151346/Thumb%20Maker.zip 1 Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 12, 2015 Share Posted August 12, 2015 (edited) Got this error on a few of my movies. There is a backdrop and logo in folder Log file: http://pastebin.com/QChvfrA2 Long titles run off the side when using text The odd sized logos still don't display correctly, but it looks like they are in a different location now Fixed for me: I'm no longer having the issue with the search not finishing for episodes when all have thumbs Process no longer hangs in task manager with Close button (noticed I had several I had to kill in task manager) Edited August 12, 2015 by FrostByte 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 12, 2015 Share Posted August 12, 2015 @@FrostByte The Index Pixel format error... I am trying to figure out which graphic it is referring too (Is it a movie which is trying to overlay the logo, or is it a movie which is trying to add text graphics?). Could you tell me if your movie "Rope" has a logo.png? Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 12, 2015 Share Posted August 12, 2015 (edited) Yes, the movie Rope has both. I found at least 3 movies I get this same error on. Oddly they are all older movies. Edit: backdrop is 1280x720 (smaller than most) and logo is 800x310. The backdrop1 and backdrop2 files are the normal size 1920x1200 Edited August 12, 2015 by FrostByte Link to comment Share on other sites More sharing options...
chef 3746 Posted August 12, 2015 Share Posted August 12, 2015 I found a fix (http://stackoverflow.com/questions/17313285/graphics-on-indexed-image), but it is going to take a bit of coding. It would seem that the entire image has to be built from an empty bitmap, instead of trying to overlay the logo directly on a re-sized version of a backdrop. Not a huge deal, but it is going to take a bit to write. 1 Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 12, 2015 Share Posted August 12, 2015 Could also look for another backdrop that is the correct size if that's easier, in this case the backdrop2 and 3 were both 1920x1200. Though your other code may still be needed in the event they are all incorrect I suppose. Link to comment Share on other sites More sharing options...
ebr 14934 Posted August 12, 2015 Share Posted August 12, 2015 Chef - the math for resizing the logo preserving the aspect ratio should be: Take current image height and divide it by the width - save that float number - then resize the image to whatever width it needs to be and the height should be the width multiplied by your saved float. i.e. newWidth = [whatever] newHeight = newWidth * (OriginalHeight/OriginalWidth) 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 12, 2015 Share Posted August 12, 2015 Thank you ebr. I could get the float, but wasn't sure what happened next. Much appreciated. Link to comment Share on other sites More sharing options...
ebr 14934 Posted August 12, 2015 Share Posted August 12, 2015 Oops - I did the math backwards. Original post edited... 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 12, 2015 Share Posted August 12, 2015 Thanks to ebrs formula, the logo is now re-sized properly. There is a save button, but I am not sure if the location is going to be written correctly if it is saving remotely. https://dl.dropboxusercontent.com/u/46151346/Thumb%20Maker.zip 1 Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 13, 2015 Share Posted August 13, 2015 The calculations appear to be off still. Some of them are really off like this one. None of the thumbs save, even the ones that look correct. All my media is on local drives right now. \\PCname.domainname\path it looks like. Nothing shows up in the folders after saving Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 13, 2015 Share Posted August 13, 2015 Others are just off a little. I do have a lot like the one above though where the logo and backdrop look like two seperate images. About 80 - 90 are correct though, but they don't save either Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 13, 2015 Share Posted August 13, 2015 This one doesn't even show the logo. There is a logo in the folder though Link to comment Share on other sites More sharing options...
Happy2Play 8297 Posted August 13, 2015 Share Posted August 13, 2015 Mixed results Not saving same results locally and remote. 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted August 13, 2015 Share Posted August 13, 2015 (edited) Interesting... the "Open Season" image is strange. Why would it be so small, the api requests images at a certain size, so it shouldn't be smaller then the picture box it is being displayed in. I know why Barnyard isn't fitting properly though, I can fix that one. And I see that the image save string isn't being calculated properly. I added a msgbox to test it properly before it tried to save to wrong folders. I should be able to get that working. Edited August 13, 2015 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted August 13, 2015 Share Posted August 13, 2015 This time I forced the Backdrop Image to become its own Bitmap Object before adding it to the main image. This forces the Backdrop image to maintain it's size. I also fixed the issue where logos were not re-sized before they were graphically drawn to the backdrop. But, the saving still needs work. https://dl.dropboxusercontent.com/u/46151346/Thumb%20Maker.zip 1 Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 13, 2015 Share Posted August 13, 2015 Ok, all mine with logos appear to be good now. The only ones I'm still having issues with are long movies names where the text is still running off the side. Has new test message on save, but still doesn't save anything as you mentioned. Files are local Link to comment Share on other sites More sharing options...
Happy2Play 8297 Posted August 13, 2015 Share Posted August 13, 2015 (edited) Looking good. Text size difference, only found this one so far. 1280x720 backdrop 1920x1080 backbrop Save - additional non-existing path (remote) Edited August 13, 2015 by Happy2Play Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted August 13, 2015 Share Posted August 13, 2015 Good catch. The extra folder name in the path shows up locally too (see my post #46). There is an extra \Mystic River before thumb.jpg Link to comment Share on other sites More sharing options...
chef 3746 Posted August 13, 2015 Share Posted August 13, 2015 (edited) What are the odds that people will be using this remotely? If the program runs on their server machine only then saving the thumb would be simple. If it is run remotely then there has to be a function which try's to string together the remote path (which is obviously causing some format issues). The text graphic is set in a Try and catch statement ( if the logo isn't present then catch the error and set the text graphic ), but text graphics look kind of crappy, and in order to set them properly as an overlay, they're going to have to be set in an empty bitmap first as well, and then resized and set. Gotta find a decent font, Segoe isn't cutting it. Edited August 13, 2015 by chef Link to comment Share on other sites More sharing options...
Happy2Play 8297 Posted August 13, 2015 Share Posted August 13, 2015 (edited) @@chef Locally I still get this. From server desktop. TV - should be Z:\ServerFolders\Videos\TV Series\Lucifer [Drama] or \\WHS2011-HOME\Videos\TV Series\Lucifer [Drama] Movies should be Z:\ServerFolders\Videos\Movies\Big Jake (1971) [Western] or \\WHS2011-HOME\Videos\Movies\Big[/url] Jake (1971) [Western] Library Edited August 13, 2015 by Happy2Play 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