private static bool LoadScript() { string scriptFileName = InternalScriptDirectory + @"\InternalActorMoviesGrabber.csscript"; // Script support script.csscript if (!File.Exists(scriptFileName)) { Log.Error("InternalActorMoviesGrabber LoadScript() - grabber script not found: {0}", scriptFileName); return(false); } try { Environment.CurrentDirectory = Config.GetFolder(Config.Dir.Base); _asmHelper = new AsmHelper(CSScript.Load(scriptFileName, null, false)); InternalActorsGrabber = (IIMDBInternalActorsScriptGrabber)_asmHelper.CreateObject("InternalActorsGrabber"); } catch (Exception ex) { Log.Error("InternalActorMoviesGrabber LoadScript() - file: {0}, message : {1}", scriptFileName, ex.Message); return(false); } return(true); }
public static void ResetGrabber() { if (_asmHelper != null) { _asmHelper.Dispose(); _asmHelper = null; } if (_internalActorsGrabber != null) { _internalActorsGrabber.SafeDispose(); _internalActorsGrabber = null; } _internalActorsGrabberLoaded = false; }
private static bool LoadScript() { string scriptFileName = InternalScriptDirectory + @"\InternalActorMoviesGrabber.csscript"; // Script support script.csscript if (!File.Exists(scriptFileName)) { Log.Error("InternalActorMoviesGrabber LoadScript() - grabber script not found: {0}", scriptFileName); return false; } try { Environment.CurrentDirectory = Config.GetFolder(Config.Dir.Base); _asmHelper = new AsmHelper(CSScript.Load(scriptFileName, null, false)); InternalActorsGrabber = (IIMDBInternalActorsScriptGrabber) _asmHelper.CreateObject("InternalActorsGrabber"); } catch (Exception ex) { Log.Error("InternalActorMoviesGrabber LoadScript() - file: {0}, message : {1}", scriptFileName, ex.Message); return false; } return true; }
public static void ResetGrabber() { if (_asmHelper != null) { _asmHelper.Dispose(); _asmHelper = null; } if (_internalActorsGrabber != null) { _internalActorsGrabber.SafeDispose(); _internalActorsGrabber = null; } _internalActorsGrabberLoaded = false; }