Esempio n. 1
0
        private void RecreateSaved()
        {
            LOGGER.Debug($"Recreating cache of saved tempaltes");
            Saved = new TemplateContainer();
            foreach (var template in Container.RegisteredTemplates)
            {
                LOGGER.Debug($"Recreating cache for template '{template.Name}'");
                var newTemplate = new Template(template.Id, template.Name, template.DefaultLanguage, template.Category, template.PublishTimes, template.PlannedVideos)
                {
                    AutoLevels          = template.AutoLevels,
                    Description         = template.Description,
                    IsEmbeddable        = template.IsEmbeddable,
                    License             = template.License,
                    NotifySubscribers   = template.NotifySubscribers,
                    PlannedVideos       = template.PlannedVideos,
                    Privacy             = template.Privacy,
                    PublicStatsViewable = template.PublicStatsViewable,
                    PublishTimes        = template.PublishTimes,
                    ShouldPublishAt     = template.ShouldPublishAt,
                    Stabilize           = template.Stabilize,
                    Tags                              = template.Tags,
                    ThumbnailPath                     = template.ThumbnailPath,
                    Title                             = template.Title,
                    CSharpCleanUpScript               = template.CSharpCleanUpScript,
                    CSharpPreparationScript           = template.CSharpPreparationScript,
                    EnableExpertMode                  = template.EnableExpertMode,
                    MailTo                            = template.MailTo,
                    NewVideoDesktopNotification       = template.NewVideoDesktopNotification,
                    NewVideoMailNotification          = template.NewVideoMailNotification,
                    NextUploadSuggestion              = template.NextUploadSuggestion,
                    ReferencedAssembliesText          = template.ReferencedAssembliesText,
                    UploadFailedDesktopNotification   = template.UploadFailedDesktopNotification,
                    UploadFailedMailNotification      = template.UploadFailedMailNotification,
                    UploadFinishedDesktopNotification = template.UploadFinishedDesktopNotification,
                    UploadFinishedMailNotification    = template.UploadFinishedMailNotification,
                    UploadStartedDesktopNotification  = template.UploadStartedDesktopNotification,
                    UploadStartedMailNotification     = template.UploadStartedMailNotification
                };

                Saved.RegisterTemplate(newTemplate);
            }
        }