mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-26 11:29:25 +00:00
Fixed: MediaManagement Settings (fresh db required)
This commit is contained in:
@@ -91,7 +91,7 @@ namespace NzbDrone.Integration.Test.ApiTests
|
|||||||
|
|
||||||
var config = NamingConfig.GetSingle();
|
var config = NamingConfig.GetSingle();
|
||||||
config.RenameBooks = true;
|
config.RenameBooks = true;
|
||||||
config.ArtistFolderFormat = "This and That";
|
config.AuthorFolderFormat = "This and That";
|
||||||
|
|
||||||
var errors = NamingConfig.InvalidPut(config);
|
var errors = NamingConfig.InvalidPut(config);
|
||||||
errors.Should().NotBeNull();
|
errors.Should().NotBeNull();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Readarr.Api.V1.Config
|
|||||||
Get("/examples", x => GetExamples(this.Bind<NamingConfigResource>()));
|
Get("/examples", x => GetExamples(this.Bind<NamingConfigResource>()));
|
||||||
|
|
||||||
SharedValidator.RuleFor(c => c.StandardBookFormat).ValidBookFormat();
|
SharedValidator.RuleFor(c => c.StandardBookFormat).ValidBookFormat();
|
||||||
SharedValidator.RuleFor(c => c.ArtistFolderFormat).ValidAuthorFolderFormat();
|
SharedValidator.RuleFor(c => c.AuthorFolderFormat).ValidAuthorFolderFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateNamingConfig(NamingConfigResource resource)
|
private void UpdateNamingConfig(NamingConfigResource resource)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Readarr.Api.V1.Config
|
|||||||
public bool RenameBooks { get; set; }
|
public bool RenameBooks { get; set; }
|
||||||
public bool ReplaceIllegalCharacters { get; set; }
|
public bool ReplaceIllegalCharacters { get; set; }
|
||||||
public string StandardBookFormat { get; set; }
|
public string StandardBookFormat { get; set; }
|
||||||
public string ArtistFolderFormat { get; set; }
|
public string AuthorFolderFormat { get; set; }
|
||||||
public bool IncludeArtistName { get; set; }
|
public bool IncludeArtistName { get; set; }
|
||||||
public bool IncludeAlbumTitle { get; set; }
|
public bool IncludeAlbumTitle { get; set; }
|
||||||
public bool IncludeQuality { get; set; }
|
public bool IncludeQuality { get; set; }
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Readarr.Api.V1.Config
|
|||||||
RenameBooks = model.RenameBooks,
|
RenameBooks = model.RenameBooks,
|
||||||
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
|
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
|
||||||
StandardBookFormat = model.StandardBookFormat,
|
StandardBookFormat = model.StandardBookFormat,
|
||||||
ArtistFolderFormat = model.AuthorFolderFormat
|
AuthorFolderFormat = model.AuthorFolderFormat
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ namespace Readarr.Api.V1.Config
|
|||||||
RenameBooks = resource.RenameBooks,
|
RenameBooks = resource.RenameBooks,
|
||||||
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
|
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
|
||||||
StandardBookFormat = resource.StandardBookFormat,
|
StandardBookFormat = resource.StandardBookFormat,
|
||||||
AuthorFolderFormat = resource.ArtistFolderFormat,
|
AuthorFolderFormat = resource.AuthorFolderFormat,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user