Exemplo n.º 1
0
        private void DeleteSeries(ProgressNotification notification, int seriesId, bool deleteFiles)
        {
            Logger.Trace("Deleting Series [{0}]", seriesId);

            var series = _seriesProvider.GetSeries(seriesId);
            var title  = series.Title;

            notification.CurrentMessage = String.Format("Deleting '{0}' from database", title);

            _seriesProvider.DeleteSeries(seriesId);

            notification.CurrentMessage = String.Format("Successfully deleted '{0}' from database", title);

            if (deleteFiles)
            {
                notification.CurrentMessage = String.Format("Deleting files from disk for series '{0}'", title);

                _recycleBinProvider.DeleteDirectory(series.Path);

                notification.CurrentMessage = String.Format("Successfully deleted files from disk for series '{0}'", title);
            }
        }