/// <summary>
 /// Instantiates a <see cref="NfoArtistReader"/> object
 /// </summary>
 /// <param name="debugLogger">Debug logger to log to</param>
 /// <param name="miNumber">Unique number of the MediaItem for which the nfo-file is parsed</param>
 /// <param name="forceQuickMode">If true, no long lasting operations such as parsing images are performed</param>
 /// <param name="httpClient"><see cref="HttpClient"/> used to download from http URLs contained in nfo-files</param>
 /// <param name="settings">Settings of the <see cref="NfoMovieMetadataExtractor"/></param>
 public NfoArtistReader(ILogger debugLogger, long miNumber, bool forceQuickMode, HttpClient httpClient, NfoAudioMetadataExtractorSettings settings)
     : base(debugLogger, miNumber, forceQuickMode, httpClient, settings)
 {
     _settings = settings;
     InitializeSupportedElements();
     InitializeSupportedAttributes();
 }
        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);
        }
Example #3
0
        public override void Save()
        {
            if (!Enabled)
            {
                return;
            }

            base.Save();

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

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

            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);

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

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