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; } }
public void SaveClients() { try { ProfileLinkSettings settings = new ProfileLinkSettings(); foreach (var item in _clientList) { var client = (ProfileLink)item.AdditionalProperties[Consts.KEY_CLIENT]; if (client.DefaultUserProfile == Guid.Empty.ToString()) { client.DefaultUserProfile = null; } settings.Links.Add(client); } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); serverSettings.Save(settings); } catch (NotConnectedException) { DisconnectedError(); } catch (Exception e) { ServiceRegistration.Get <ILogger>().Error("ClientConfigModel: Problems saving clients", e); } }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); OnlineLibrarySettings settings = serverSettings.Load <OnlineLibrarySettings>(); if (string.IsNullOrEmpty(settings.MusicLanguageCulture)) { settings.MusicLanguageCulture = "en-US"; } CultureInfo current = new CultureInfo(settings.MusicLanguageCulture); _items = new List <IResourceString>(_cultures.Count); for (int i = 0; i < _cultures.Count; i++) { CultureInfo ci = _cultures[i]; _items.Add(LocalizationHelper.CreateStaticString(ci.DisplayName)); if (ci.Equals(current)) { Selected = i; } } }
public override void Save() { if (!Enabled) { return; } base.Save(); ISettingsManager localSettings = ServiceRegistration.Get <ISettingsManager>(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); AudioMetadataExtractorSettings settings = serverSettings.Load <AudioMetadataExtractorSettings>(); settings.IncludeArtistDetails = _selected.Contains(0); settings.IncludeComposerDetails = _selected.Contains(1); settings.IncludeMusicLabelDetails = _selected.Contains(2); serverSettings.Save(settings); localSettings.Save(settings); NfoAudioMetadataExtractorSettings nfoSettings = serverSettings.Load <NfoAudioMetadataExtractorSettings>(); nfoSettings.IncludeArtistDetails = settings.IncludeArtistDetails; serverSettings.Save(nfoSettings); localSettings.Save(nfoSettings); }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); AudioMetadataExtractorSettings settings = serverSettings.Load <AudioMetadataExtractorSettings>(); if (settings.IncludeArtistDetails) { _selected.Add(0); } if (settings.IncludeComposerDetails) { _selected.Add(1); } if (settings.IncludeConductorDetails) { _selected.Add(2); } if (settings.IncludeMusicLabelDetails) { _selected.Add(3); } }
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); }
public override void Save() { if (!Enabled) { return; } base.Save(); ISettingsManager localSettings = ServiceRegistration.Get <ISettingsManager>(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); OnlineLibrarySettings settings = serverSettings.Load <OnlineLibrarySettings>(); int selectedNo = 0; foreach (MatcherSetting setting in settings.MovieMatchers) { if (setting.Id.Equals("MovieOmDbMatcher", StringComparison.InvariantCultureIgnoreCase)) { setting.Enabled = _selected.Contains(selectedNo); selectedNo++; } else if (setting.Id.Equals("MovieFanArtTvMatcher", StringComparison.InvariantCultureIgnoreCase)) { setting.Enabled = _selected.Contains(selectedNo); selectedNo++; } else if (setting.Id.Equals("MovieTheMovieDbMatcher", StringComparison.InvariantCultureIgnoreCase)) { setting.Enabled = _selected.Contains(selectedNo); selectedNo++; } } serverSettings.Save(settings); localSettings.Save(settings); }
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); } }
private void InitModel() { IServerSettingsClient settingsManager = ServiceRegistration.Get <IServerSettingsClient>(); ImporterWorkerSettings settings = settingsManager.Load <ImporterWorkerSettings>(); EnableAutoRefresh = settings.EnableAutoRefresh; RunAtHour = settings.ImporterStartTime; }
/// <summary> /// Saves the current state to the settings file. /// </summary> public void SaveSettings() { IServerSettingsClient settingsManager = ServiceRegistration.Get <IServerSettingsClient>(); ImporterWorkerSettings settings = settingsManager.Load <ImporterWorkerSettings>(); settings.EnableAutoRefresh = EnableAutoRefresh; settings.ImporterStartTime = RunAtHour; settingsManager.Save(settings); }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); _value = serverSettings.Load <FanArtSettings>().MaxDiscArt; }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); _yes = serverSettings.Load <ImageMetadataExtractorSettings>().IncludeGeoLocationDetails; }
private void InitModel() { IServerSettingsClient settingsManager = ServiceRegistration.Get <IServerSettingsClient>(); NetworkNeighborhoodResourceProviderSettings settings = settingsManager.Load <NetworkNeighborhoodResourceProviderSettings>(); ImpersonateInteractive = settings.ImpersonateInteractive; UseCredentials = settings.UseCredentials; NetworkUserName = settings.NetworkUserName; NetworkPassword = settings.NetworkPassword; }
public override void Load() { if (!Enabled) { return; } _items.Clear(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); OnlineLibrarySettings settings = serverSettings.Load <OnlineLibrarySettings>(); foreach (MatcherSetting setting in settings.SeriesMatchers) { if (setting.Id.Equals("SeriesOmDbMatcher", StringComparison.InvariantCultureIgnoreCase)) { _items.Add(LocalizationHelper.CreateStaticString("OMDBAPI.com")); if (setting.Primary) { _selected.Add(_items.Count - 1); } } else if (setting.Id.Equals("SeriesFanArtTvMatcher", StringComparison.InvariantCultureIgnoreCase)) { _items.Add(LocalizationHelper.CreateStaticString("Fanart.tv")); if (setting.Primary) { _selected.Add(_items.Count - 1); } } else if (setting.Id.Equals("SeriesTheMovieDbMatcher", StringComparison.InvariantCultureIgnoreCase)) { _items.Add(LocalizationHelper.CreateStaticString("TheMovieDB.org")); if (setting.Primary) { _selected.Add(_items.Count - 1); } } else if (setting.Id.Equals("SeriesTvDbMatcher", StringComparison.InvariantCultureIgnoreCase)) { _items.Add(LocalizationHelper.CreateStaticString("TheTVDB.com")); if (setting.Primary) { _selected.Add(_items.Count - 1); } } else if (setting.Id.Equals("SeriesTvMazeMatcher", StringComparison.InvariantCultureIgnoreCase)) { _items.Add(LocalizationHelper.CreateStaticString("TVmaze.com")); if (setting.Primary) { _selected.Add(_items.Count - 1); } } } }
/// <summary> /// Saves the current state to the settings file. /// </summary> public void SaveSettings() { IServerSettingsClient settingsManager = ServiceRegistration.Get <IServerSettingsClient>(); NetworkNeighborhoodResourceProviderSettings settings = settingsManager.Load <NetworkNeighborhoodResourceProviderSettings>(); settings.ImpersonateInteractive = ImpersonateInteractive; settings.UseCredentials = UseCredentials; settings.NetworkUserName = NetworkUserName; settings.NetworkPassword = NetworkPassword; settingsManager.Save(settings); }
public override void Save() { IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(false); if (serverSettings == null) { return; } SlimTvGenreColorSettings settings = serverSettings.Load <SlimTvGenreColorSettings>(); string genreColor = null; string colorName = _items[Selected].ResourceString.Evaluate(); string none = LocalizationHelper.Translate(RES_COLOR_NONE); if (none != colorName) { genreColor = ColorTranslator.ToHtml(_items[Selected].BackgroundColor); } switch (_genre) { case EpgGenre.Movie: settings.MovieGenreColor = genreColor; break; case EpgGenre.Series: settings.SeriesGenreColor = genreColor; break; case EpgGenre.Documentary: settings.DocumentaryGenreColor = genreColor; break; case EpgGenre.Music: settings.MusicGenreColor = genreColor; break; case EpgGenre.Kids: settings.KidsGenreColor = genreColor; break; case EpgGenre.News: settings.NewsGenreColor = genreColor; break; case EpgGenre.Sport: settings.SportGenreColor = genreColor; break; case EpgGenre.Special: settings.SpecialGenreColor = genreColor; break; } serverSettings.Save(settings); }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); MovieMetadataExtractorSettings settings = serverSettings.Load <MovieMetadataExtractorSettings>(); _yes = !settings.OnlyLocalMedia; }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); MediaServerSettings settings = serverSettings.Load <MediaServerSettings>(); Yes = settings.TranscodingAllowed; }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); MediaServerSettings settings = serverSettings.Load <MediaServerSettings>(); Yes = settings.ShowUserLogin; }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); TranscodingServiceSettings settings = serverSettings.Load <TranscodingServiceSettings>(); Yes = settings.ForceSubtitles; }
public override void Load() { if (!Enabled) { return; } IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); TranscodingServiceSettings settings = serverSettings.Load <TranscodingServiceSettings>(); Value = settings.CacheMaximumSizeInGB; }
public override void Save() { IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(false); if (serverSettings == null) { return; } SlimTvLogoSettings settings = serverSettings.Load <SlimTvLogoSettings>(); settings.LogoTheme = _items[Selected].Evaluate(); serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); ResourceMountingSettings settings = serverSettings.Load <ResourceMountingSettings>(); settings.DriveLetter = _items[Selected].ToString()[0]; serverSettings.Save(settings); }
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); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); MediaServerSettings settings = serverSettings.Load <MediaServerSettings>(); settings.TranscodingAllowed = Yes; serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); TranscodingServiceSettings settings = serverSettings.Load <TranscodingServiceSettings>(); settings.ForceSubtitles = Yes; serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); OnlineLibrarySettings settings = serverSettings.Load <OnlineLibrarySettings>(); settings.MovieLanguageCulture = _cultures[Selected].Name; serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); TranscodingServiceSettings settings = serverSettings.Load <TranscodingServiceSettings>(); settings.CacheMaximumSizeInGB = Convert.ToInt64(Value); serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); RegionSettings settings = serverSettings.Load <RegionSettings>(); settings.Culture = _cultures[Selected].Name; serverSettings.Save(settings); }
public override void Save() { if (!Enabled) { return; } base.Save(); IServerSettingsClient serverSettings = ServiceRegistration.Get <IServerSettingsClient>(); SeriesMetadataExtractorSettings settings = serverSettings.Load <SeriesMetadataExtractorSettings>(); settings.CacheOfflineFanArt = _selected.Contains(0); settings.CacheLocalFanArt = _selected.Contains(1); serverSettings.Save(settings); }