Fixed: Remove old naming config from API responses

Closes #9741
pull/9759/head
Qstick 9 months ago
parent ed340be2b1
commit 38cd130da5

@ -1,12 +0,0 @@
namespace NzbDrone.Core.Organizer
{
public class BasicNamingConfig
{
public bool IncludeSeriesTitle { get; set; }
public bool IncludeEpisodeTitle { get; set; }
public bool IncludeQuality { get; set; }
public bool ReplaceSpaces { get; set; }
public string Separator { get; set; }
public string NumberStyle { get; set; }
}
}

@ -24,7 +24,6 @@ namespace NzbDrone.Core.Organizer
{
string BuildFileName(Movie movie, MovieFile movieFile, NamingConfig namingConfig = null, List<CustomFormat> customFormats = null);
string BuildFilePath(Movie movie, string fileName, string extension);
BasicNamingConfig GetBasicNamingConfig(NamingConfig nameSpec);
string GetMovieFolder(Movie movie, NamingConfig namingConfig = null);
}
@ -155,11 +154,6 @@ namespace NzbDrone.Core.Organizer
return Path.Combine(path, fileName + extension);
}
public BasicNamingConfig GetBasicNamingConfig(NamingConfig nameSpec)
{
return new BasicNamingConfig(); // For now let's be lazy
}
public string GetMovieFolder(Movie movie, NamingConfig namingConfig = null)
{
if (namingConfig == null)

@ -44,12 +44,6 @@ namespace Radarr.Api.V3.Config
var nameSpec = _namingConfigService.GetConfig();
var resource = nameSpec.ToResource();
if (resource.StandardMovieFormat.IsNotNullOrWhiteSpace())
{
var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
basicConfig.AddToResource(resource);
}
return resource;
}

@ -10,9 +10,5 @@ namespace Radarr.Api.V3.Config
public ColonReplacementFormat ColonReplacementFormat { get; set; }
public string StandardMovieFormat { get; set; }
public string MovieFolderFormat { get; set; }
public bool IncludeQuality { get; set; }
public bool ReplaceSpaces { get; set; }
public string Separator { get; set; }
public string NumberStyle { get; set; }
}
}

@ -20,23 +20,10 @@ namespace Radarr.Api.V3.Config
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
ColonReplacementFormat = model.ColonReplacementFormat,
StandardMovieFormat = model.StandardMovieFormat,
MovieFolderFormat = model.MovieFolderFormat,
// IncludeQuality
// ReplaceSpaces
// Separator
// NumberStyle
MovieFolderFormat = model.MovieFolderFormat
};
}
public static void AddToResource(this BasicNamingConfig basicNamingConfig, NamingConfigResource resource)
{
resource.IncludeQuality = basicNamingConfig.IncludeQuality;
resource.ReplaceSpaces = basicNamingConfig.ReplaceSpaces;
resource.Separator = basicNamingConfig.Separator;
resource.NumberStyle = basicNamingConfig.NumberStyle;
}
public static NamingConfig ToModel(this NamingConfigResource resource)
{
return new NamingConfig

Loading…
Cancel
Save