public override void Load()
        {
            if (!Enabled)
            {
                return;
            }
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            if (!settings.SkipOnlineSearches && !settings.SkipFanArtDownload)
            {
                Selected = 0;
            }
            else if (!settings.SkipOnlineSearches)
            {
                Selected = 1;
            }
            else if (!settings.SkipFanArtDownload)
            {
                Selected = 2;
            }
            else
            {
                Selected = 3;
            }
        }
示例#2
0
        public override void Save()
        {
            if (!Enabled)
            {
                return;
            }

            base.Save();

            ISettingsManager      localSettings  = ServiceRegistration.Get <ISettingsManager>();
            IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>();

            MovieMetadataExtractorSettings mainSettings = serverSettings.Load <MovieMetadataExtractorSettings>();

            mainSettings.IncludeActorDetails             = _selected.Contains(0);
            mainSettings.IncludeCharacterDetails         = _selected.Contains(1);
            mainSettings.IncludeDirectorDetails          = _selected.Contains(2);
            mainSettings.IncludeWriterDetails            = _selected.Contains(3);
            mainSettings.IncludeProductionCompanyDetails = _selected.Contains(4);
            serverSettings.Save(mainSettings);
            localSettings.Save(mainSettings);

            NfoMovieMetadataExtractorSettings nfoSettings = serverSettings.Load <NfoMovieMetadataExtractorSettings>();

            nfoSettings.IncludeActorDetails     = mainSettings.IncludeActorDetails;
            nfoSettings.IncludeCharacterDetails = mainSettings.IncludeCharacterDetails;
            nfoSettings.IncludeDirectorDetails  = mainSettings.IncludeDirectorDetails;
            serverSettings.Save(nfoSettings);
            localSettings.Save(nfoSettings);
        }
示例#3
0
        public override void Load()
        {
            if (!Enabled)
            {
                return;
            }
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            if (settings.IncludeActorDetails)
            {
                _selected.Add(0);
            }
            if (settings.IncludeCharacterDetails)
            {
                _selected.Add(1);
            }
            if (settings.IncludeDirectorDetails)
            {
                _selected.Add(2);
            }
            if (settings.IncludeWriterDetails)
            {
                _selected.Add(3);
            }
            if (settings.IncludeProductionCompanyDetails)
            {
                _selected.Add(4);
            }
        }
示例#4
0
        public override void Load()
        {
            if (!Enabled)
            {
                return;
            }
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            _yes = !settings.OnlyLocalMedia;
        }
示例#5
0
        public override void Save()
        {
            if (!Enabled)
            {
                return;
            }

            base.Save();
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            settings.OnlyLocalMedia = !_yes;
            serverSettings.Save(settings);
        }
示例#6
0
        public override void Save()
        {
            if (!Enabled)
            {
                return;
            }

            base.Save();
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            settings.CacheOfflineFanArt = _selected.Contains(0);
            settings.CacheLocalFanArt   = _selected.Contains(1);
            serverSettings.Save(settings);
        }
        public override void Load()
        {
            if (!Enabled)
            {
                return;
            }
            IServerSettingsClient          serverSettings = ServiceRegistration.Get <IServerSettingsClient>();
            MovieMetadataExtractorSettings settings       = serverSettings.Load <MovieMetadataExtractorSettings>();

            if (settings.CacheOfflineFanArt)
            {
                _selected.Add(0);
            }
            if (settings.CacheLocalFanArt)
            {
                _selected.Add(1);
            }
        }
        public override void Save()
        {
            if (!Enabled)
            {
                return;
            }

            base.Save();

            ISettingsManager      localSettings  = ServiceRegistration.Get <ISettingsManager>();
            IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>();

            MovieMetadataExtractorSettings settings = serverSettings.Load <MovieMetadataExtractorSettings>();

            if (Selected == 0)
            {
                settings.SkipOnlineSearches = false;
                settings.SkipFanArtDownload = false;
            }
            else if (Selected == 1)
            {
                settings.SkipOnlineSearches = false;
                settings.SkipFanArtDownload = true;
            }
            else if (Selected == 2)
            {
                settings.SkipOnlineSearches = true;
                settings.SkipFanArtDownload = false;
            }
            else
            {
                settings.SkipOnlineSearches = true;
                settings.SkipFanArtDownload = true;
            }
            serverSettings.Save(settings);
            localSettings.Save(settings);

            NfoMovieMetadataExtractorSettings nfoSettings = serverSettings.Load <NfoMovieMetadataExtractorSettings>();

            nfoSettings.SkipFanArtDownload = settings.SkipFanArtDownload;
            serverSettings.Save(nfoSettings);
            localSettings.Save(nfoSettings);
        }