/// <summary> /// checks whether valid detection has occured /// if not it will attempt to create a new cuefile without non-BINARY entries and parse this /// </summary> /// <param name="res"></param> /// <param name="cuePath"></param> /// <param name="intensive"></param> /// <returns></returns> public static DiscInspector CueRoutine(DiscInspector res, string cuePath, bool intensive) { if (res == null || res.DetectedDiscType == DetectedDiscType.UnknownFormat || res.DetectedDiscType == DetectedDiscType.UnknownCDFS) { // try again after calling the cue parser string newCue = CueHandler.ParseCue(cuePath); // if newcue is the same as cuepath return straight away if (newCue == cuePath) { return(res); } // run interrogator again with the newly generated cue (sans non-binary tracks) var inter = new Interrogator(newCue, intensive); res = inter.Start(); // check for null if (res == null) { return(null); } // set res cue back res.CuePath = cuePath; // delete newCue if it is different from cuePath (i.e a new cue file HAS been generated) if (File.Exists(newCue) && newCue != cuePath) { File.Delete(newCue); } } return(res); }
/* Specific system targetted scans */ public static DiscInspector ScanPSX(string cuePath) { var inter = new Interrogator(cuePath, true); var res = inter.Start(DetectedDiscType.SonyPSX); // run the cue routine res = CueHandler.CueRoutine(res, cuePath, true); return(res); }
/// <summary> /// Return a DiscInspector Object /// IntensiveScan will return more matches but may take longer /// </summary> /// <param name="cuePath"></param> /// <param name="IntensiveScan"></param> public static DiscInspector ScanDisc(string cuePath, bool IntensiveScan) { var inter = new Interrogator(cuePath, IntensiveScan); var res = inter.Start(); // run the cue routine res = CueHandler.CueRoutine(res, cuePath, IntensiveScan); return(res); }