Ferkner / mediarenamer

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

Error Parsing File.... Index and Length must refer to a location within the string. #38

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Under Movies Tab, selected a folder where my movies are stored (D:\!Movies)
2. Clicked on Start Scan.
3. Chose the correct name from the popup. Hit OK.
4. Got error.

What is the expected output? What do you see instead?
Screen shot is available here:
http://www.grabout.com/H2LzGaMk

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

Please provide any additional information below.
Using Windows 7 Ultimate 32bit.

Original issue reported on code.google.com by saash...@gmail.com on 8 May 2010 at 7:33

Attachments:

GoogleCodeExporter commented 8 years ago
The exception gets thrown from line 39 in Movies/OnlineParserTMDB.cs
This seems to happen when one of the search results has an empty release node 
such as
"<release></release>"
I made this change to the code:

if ((node.SelectSingleNode("release") != null) &&
(node.SelectSingleNode("release").InnerText != string.Empty))
{
  year = Int32.Parse(node.SelectSingleNode("release").InnerText.Substring(0, 4));
}

and recompiled and it seems to have fixed the issue.

Original comment by far2cle...@gmail.com on 1 Jun 2010 at 9:02

GoogleCodeExporter commented 8 years ago
same problem to me with the same release (2.1.3732.32766, Windows XP SP3 32bit 
x86).
this problem comes out also when the popup is not shown, just on filename scan.

Original comment by albem...@gmail.com on 4 Jun 2010 at 8:55

GoogleCodeExporter commented 8 years ago
same issue in 2.1.3732.32766.  happens to about 1/3 movie files.

Original comment by hoff0...@gmail.com on 24 Sep 2010 at 10:36

GoogleCodeExporter commented 8 years ago
I also needed to add a trap in Movies/OnlineParserTMDB.cs for:

   "md.Name = node.SelectSingleNode("title").InnerText;"

I changed it to:

if ((node.SelectSingleNode("title") != null) &&
    (node.SelectSingleNode("title").InnerText != string.Empty))
{
    md.Name = node.SelectSingleNode("title").InnerText;
}
else
{
    md.Name = "nothing";
}

It kept failing as previously described due to a bad 
"node.SelectSingleNode("title")" value.

Original comment by mrfres...@gmail.com on 7 Oct 2010 at 12:52