private void Request_RequestFailed(PollingRequest request, Exception error) { string logMessage = string.Format(TimedTextMediaPluginResources.DownloadFailedLogMessage, error.Message); SendLogEntry(KnownLogEntryTypes.TimedTextMarkerProviderDownloadFailed, LogLevel.Warning, logMessage); RetrieveMarkersFailed.IfNotNull(i => i(this, error)); }
void LogParseError(Exception err) { string logMessage = string.Format(TimedTextMediaPluginResources.ParseErrorLogMessage, err.Message); SendLogEntry(KnownLogEntryTypes.TimedTextMarkerProviderErrorOccurred, LogLevel.Warning, logMessage); RetrieveMarkersFailed.IfNotNull(i => i(this, err)); }
protected void LoadMastDoc(string mastData) { if (mastData != null) { try { Mainsail.AddMastDoc(mastData); } catch (Exception ex) { SendLogEntry(LogEntryTypes.ErrorOccurred, LogLevel.Warning, string.Format(MastMarkerProviderResources.ParseErrorLogMessage, ex.Message)); RetrieveMarkersFailed.IfNotNull(i => i(this, ex)); } } // monitor the player for when the item starts Mainsail.MastInterface.OnItemStarting += MastInterface_OnItemStarting; Mainsail.MastInterface.OnItemStart += MastInterface_OnItemStart; Mainsail.MastInterface.OnError += MastInterface_OnError; // tell the player we are now monitoring it. This will fire off events if any occurred before we were listening Mainsail.MastInterface.Ready(); }