lthobois / mediarenamer

Automatically exported from code.google.com/p/mediarenamer
0 stars 0 forks source link

Error Parsing File, Object reference not set to an instance of an object. #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to parse a file with the following name:

3.10 to Yuma (2007).mkv
brooklyns finest.mkv
zeitgeist final edition.avi
several others....

What is the expected output? What do you see instead?

I expect that the file will either be found or not but it throws the exception:

Error Parsing file<Filepath>

Object reference not set to an instance of an object. 
MediaRenamer
  at
MediaRenamer.Movies.OnlineParserTMDB.getMovieData(Movie & movie)
  at MediaRenamer.Movies.Movie.parseFile(String file)

This is very annoying when trying to parse a large folder of files. I haven't 
been able to figure out a pattern to the unparsable movie files. Some have 
special characters, some do not. I can list more if it would help. 

What version of the product are you using? On what operating system?

Windows 7, 
Media Renamer 2.1.3972.24112 (happened with previous version as well)

Original issue reported on code.google.com by joseph.h...@gmail.com on 28 Nov 2010 at 7:37

Attachments:

GoogleCodeExporter commented 9 years ago
Hi. I changed the online datasource from to IMDB.com and I no longer get the 
parse options. It must be part of the online lookup. 

Original comment by joseph.h...@gmail.com on 28 Nov 2010 at 8:15

GoogleCodeExporter commented 9 years ago
I also noticed that when prompted to select a movie in the IMDB search, if I 
click OK without selecting a movie I get the same error. It might be that the 
fuzzy match from TheMovieDB fails to bring up a dialog with options and jumps 
straight to the exception. 

Original comment by joseph.h...@gmail.com on 28 Nov 2010 at 8:18

GoogleCodeExporter commented 9 years ago
I came across this too. Try applying the patch from Issue 44 and see if it is 
resolved.

Original comment by bdo...@gmail.com on 28 Nov 2010 at 11:52

GoogleCodeExporter commented 9 years ago
Thanks, bdoona. I did checkout the source to poke around but I do not have the 
time to fire up a .Net environment to apply a patch and rebuild the 
application. I tried to determine the difference from the patch but it's quite 
a big patch for what appears to be a simple null reference.

If only it were in one of the other 10 languages I am fluent in =)

Original comment by joseph.h...@gmail.com on 29 Nov 2010 at 2:43

GoogleCodeExporter commented 9 years ago
You are right but I did some other stuff too.

The bit that is relevant to this issue is just the OnlineParserTMDB.cs part of 
the patch.

I surrounded the problem bit with the mentioned simple null reference check, 
then added an else to return an empty movie. The patch got bulked up because I 
changed the indentation of the existing code in the if statement.

Once I got over this problem, I found lots of movies that didn't match and I 
didn't want to rename - hence the other stuff I added in the patch (the button 
to only select movies which were successfully looked up). Anyway, hopefully 
when one of the owners gets a chance, the parts that they like can be evaluated 
and included.

C# isnt my strong suit either.

Original comment by bdo...@gmail.com on 29 Nov 2010 at 5:46