Example #1
0
        public void DeleteLocalVideo(string dir, string thumbdir)
        {
            dir = dir.Replace('*', '\\');

            thumbdir = thumbdir.Replace('*', '\\');

            try
            {
                string path = @"wwwroot" + '\\' + dir;

                System.IO.File.Delete(path);

                Logger.Info("Deleted local video at " + path);
            }
            catch (Exception e)
            {
                Logger.Info("Could not delete Video");

                Logger.Error(e.Message);

                return;
            }

            try
            {
                string path = @"wwwroot" + '\\' + thumbdir;

                System.IO.File.Delete(path);

                Logger.Info("Deleted thumbnail at " + path);
            }
            catch (Exception e)
            {
                Logger.Info("Could not delete thumbnail");

                Logger.Error(e.Message);

                return;
            }

            LocalCollection.CollectAllDownloadedVideos();
        }