When scanning movie folders to movie db .iso and .img are not properly added to the list.
it can be fixed VERY crude by adding :
if (item.Path.ToLower().IndexOf(".iso") >= 0)
availableFiles.Add(item.Path);
if (item.Path.ToLower().IndexOf(".img") >= 0)
availableFiles.Add(item.Path);
to
private static void CountFiles(string path, ref ArrayList availableFiles) in IMDBFetcher.cs but that is far from pretty.
and if it could refrain from mounting in deamon tools (takes forever) it would be nice to.
The changed method looks like this.
private static void CountFiles(string path, ref ArrayList availableFiles)
{
//
// Count the files in the current directory
// and add them to the list of availble files
//
try
{
VirtualDirectory dir = new VirtualDirectory();
dir.SetExtensions(MediaPortal.Util.Utils.VideoExtensions);
ArrayList items = dir.GetDirectoryUnProtected(path, true);
foreach (GUIListItem item in items)
{
if (item.IsFolder)
{
if (item.Label != "..")
{
if (item.Path.ToLower().IndexOf("video_ts") >= 0)
{
string strFile = String.Format(@"{0}\VIDEO_TS.IFO", item.Path);
availableFiles.Add(strFile);
//System.Windows.Forms.MessageBox.Show(strFile);
}
else
{
if (item.Path.ToLower().IndexOf(".iso") >= 0)
availableFiles.Add(item.Path);
if (item.Path.ToLower().IndexOf(".img") >= 0)
availableFiles.Add(item.Path);
//System.Windows.Forms.MessageBox.Show(item.Path);
CountFiles(item.Path, ref availableFiles);
}
}
}
else
{
availableFiles.Add(item.Path);
// System.Windows.Forms.MessageBox.Show(item.Path);
}
}
}
catch (Exception e)
{
Log.Info("Exception counting files:{0}", e);
// Ignore
}
}
it can be fixed VERY crude by adding :
if (item.Path.ToLower().IndexOf(".iso") >= 0)
availableFiles.Add(item.Path);
if (item.Path.ToLower().IndexOf(".img") >= 0)
availableFiles.Add(item.Path);
to
private static void CountFiles(string path, ref ArrayList availableFiles) in IMDBFetcher.cs but that is far from pretty.
and if it could refrain from mounting in deamon tools (takes forever) it would be nice to.
The changed method looks like this.
private static void CountFiles(string path, ref ArrayList availableFiles)
{
//
// Count the files in the current directory
// and add them to the list of availble files
//
try
{
VirtualDirectory dir = new VirtualDirectory();
dir.SetExtensions(MediaPortal.Util.Utils.VideoExtensions);
ArrayList items = dir.GetDirectoryUnProtected(path, true);
foreach (GUIListItem item in items)
{
if (item.IsFolder)
{
if (item.Label != "..")
{
if (item.Path.ToLower().IndexOf("video_ts") >= 0)
{
string strFile = String.Format(@"{0}\VIDEO_TS.IFO", item.Path);
availableFiles.Add(strFile);
//System.Windows.Forms.MessageBox.Show(strFile);
}
else
{
if (item.Path.ToLower().IndexOf(".iso") >= 0)
availableFiles.Add(item.Path);
if (item.Path.ToLower().IndexOf(".img") >= 0)
availableFiles.Add(item.Path);
//System.Windows.Forms.MessageBox.Show(item.Path);
CountFiles(item.Path, ref availableFiles);
}
}
}
else
{
availableFiles.Add(item.Path);
// System.Windows.Forms.MessageBox.Show(item.Path);
}
}
}
catch (Exception e)
{
Log.Info("Exception counting files:{0}", e);
// Ignore
}
}