mirror of
https://github.com/Readarr/Readarr
synced 2025-12-28 19:22:57 +01:00
Fixed: MediaManagement Settings (fresh db required)
This commit is contained in:
parent
8547af9fae
commit
6c7e4ca210
4 changed files with 5 additions and 5 deletions
|
|
@ -91,7 +91,7 @@ public void should_get_bad_request_if_artist_folder_format_does_not_contain_arti
|
|||
|
||||
var config = NamingConfig.GetSingle();
|
||||
config.RenameBooks = true;
|
||||
config.ArtistFolderFormat = "This and That";
|
||||
config.AuthorFolderFormat = "This and That";
|
||||
|
||||
var errors = NamingConfig.InvalidPut(config);
|
||||
errors.Should().NotBeNull();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public NamingConfigModule(INamingConfigService namingConfigService,
|
|||
Get("/examples", x => GetExamples(this.Bind<NamingConfigResource>()));
|
||||
|
||||
SharedValidator.RuleFor(c => c.StandardBookFormat).ValidBookFormat();
|
||||
SharedValidator.RuleFor(c => c.ArtistFolderFormat).ValidAuthorFolderFormat();
|
||||
SharedValidator.RuleFor(c => c.AuthorFolderFormat).ValidAuthorFolderFormat();
|
||||
}
|
||||
|
||||
private void UpdateNamingConfig(NamingConfigResource resource)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public class NamingConfigResource : RestResource
|
|||
public bool RenameBooks { get; set; }
|
||||
public bool ReplaceIllegalCharacters { get; set; }
|
||||
public string StandardBookFormat { get; set; }
|
||||
public string ArtistFolderFormat { get; set; }
|
||||
public string AuthorFolderFormat { get; set; }
|
||||
public bool IncludeArtistName { get; set; }
|
||||
public bool IncludeAlbumTitle { get; set; }
|
||||
public bool IncludeQuality { get; set; }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public static NamingConfigResource ToResource(this NamingConfig model)
|
|||
RenameBooks = model.RenameBooks,
|
||||
ReplaceIllegalCharacters = model.ReplaceIllegalCharacters,
|
||||
StandardBookFormat = model.StandardBookFormat,
|
||||
ArtistFolderFormat = model.AuthorFolderFormat
|
||||
AuthorFolderFormat = model.AuthorFolderFormat
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ public static NamingConfig ToModel(this NamingConfigResource resource)
|
|||
RenameBooks = resource.RenameBooks,
|
||||
ReplaceIllegalCharacters = resource.ReplaceIllegalCharacters,
|
||||
StandardBookFormat = resource.StandardBookFormat,
|
||||
AuthorFolderFormat = resource.ArtistFolderFormat,
|
||||
AuthorFolderFormat = resource.AuthorFolderFormat,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue