@ -183,12 +183,12 @@ namespace NzbDrone.Core.Applications.Sonarr
{
var cacheKey = $"{Settings.BaseUrl}" ;
var schemas = _schemaCache . Get ( cacheKey , ( ) = > _sonarrV3Proxy . GetIndexerSchema ( Settings ) , TimeSpan . FromDays ( 7 ) ) ;
var syncFields = new List < string > { "baseUrl" , "apiPath" , "apiKey" , "categories" , "animeCategories" , " minimumSeeders", "seedCriteria.seedRatio" , "seedCriteria.seedTime" , "seedCriteria.seasonPackSeedTime" } ;
var syncFields = new List < string > { "baseUrl" , "apiPath" , "apiKey" , "categories" , "animeCategories" , " animeStandardFormatSearch", " minimumSeeders", "seedCriteria.seedRatio" , "seedCriteria.seedTime" , "seedCriteria.seasonPackSeedTime" } ;
if ( id = = 0 )
{
// Ensuring backward compatibility with older versions on first sync
syncFields . AddRange ( new List < string > { "a nimeStandardFormatSearch", "a dditionalParameters" } ) ;
syncFields . AddRange ( new List < string > { "a dditionalParameters" } ) ;
}
var newznab = schemas . First ( i = > i . Implementation = = "Newznab" ) ;
@ -218,6 +218,11 @@ namespace NzbDrone.Core.Applications.Sonarr
sonarrIndexer . Fields . FirstOrDefault ( x = > x . Name = = "categories" ) . Value = JArray . FromObject ( indexer . Capabilities . Categories . SupportedCategories ( Settings . SyncCategories . ToArray ( ) ) ) ;
sonarrIndexer . Fields . FirstOrDefault ( x = > x . Name = = "animeCategories" ) . Value = JArray . FromObject ( indexer . Capabilities . Categories . SupportedCategories ( Settings . AnimeSyncCategories . ToArray ( ) ) ) ;
if ( sonarrIndexer . Fields . Any ( x = > x . Name = = "animeStandardFormatSearch" ) )
{
sonarrIndexer . Fields . FirstOrDefault ( x = > x . Name = = "animeStandardFormatSearch" ) . Value = Settings . SyncAnimeStandardFormatSearch ;
}
if ( indexer . Protocol = = DownloadProtocol . Torrent )
{
sonarrIndexer . Fields . FirstOrDefault ( x = > x . Name = = "minimumSeeders" ) . Value = ( ( ITorrentIndexerSettings ) indexer . Settings ) . TorrentBaseSettings . AppMinimumSeeders ? ? indexer . AppProfile . Value . MinimumSeeders ;