From: <ze...@us...> - 2007-07-11 20:31:43
|
Revision: 682 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=682&view=rev Author: zebons Date: 2007-07-11 13:31:36 -0700 (Wed, 11 Jul 2007) Log Message: ----------- corrected bug in filename for searching movie (extra blank) Modified Paths: -------------- trunk/plugins/MyFilms/MesFilmsDetail.cs Modified: trunk/plugins/MyFilms/MesFilmsDetail.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-07-11 10:32:38 UTC (rev 681) +++ trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-07-11 20:31:36 UTC (rev 682) @@ -1092,7 +1092,7 @@ idMovie = update_database(file, select_item, idMovie); if (!multifile) { //case monofile search files belonging same movie (extension cdx or diskx) - string folder = file.Substring(0, file.LastIndexOf(@"\")); + string folder = file.Substring(0, file.LastIndexOf(@"\")).Trim(); //if ((folder.Length == 2) && (folder.Substring(1,1) == ":")) // file = folder +file.Substring(file.LastIndexOf(@"\") + 1); //else @@ -1426,12 +1426,12 @@ if (fi.Attributes.ToString() == "Directory") if (path.LastIndexOf(@"\") + 1 == path.Length) { - if (System.IO.File.Exists(path + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO")) - result.Add(path + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO"); + if (System.IO.File.Exists(path.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO")) + result.Add(path.Trim() + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO"); } else - if (System.IO.File.Exists(path + "\\" + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO")) - result.Add(path + " \\" + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO"); + if (System.IO.File.Exists(path.Trim() + "\\" + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO")) + result.Add(path.Trim() + "\\" + fi.Name.Trim() + "\\VIDEO_TS\\VIDEO_TS.IFO"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |