mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Fixed: Validate metadata and quality profiles for root folders
Don't allow `0` as possible value for metadata and quality profiles, and permit to edit root folders with bad values in UI.
This commit is contained in:
@@ -7,17 +7,17 @@ namespace Readarr.Api.V1.Profiles.Quality
|
||||
[V1ApiController("qualityprofile/schema")]
|
||||
public class QualityProfileSchemaController : Controller
|
||||
{
|
||||
private readonly IProfileService _profileService;
|
||||
private readonly IQualityProfileService _qualityProfileService;
|
||||
|
||||
public QualityProfileSchemaController(IProfileService profileService)
|
||||
public QualityProfileSchemaController(IQualityProfileService qualityProfileService)
|
||||
{
|
||||
_profileService = profileService;
|
||||
_qualityProfileService = qualityProfileService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public QualityProfileResource GetSchema()
|
||||
{
|
||||
var qualityProfile = _profileService.GetDefaultProfile(string.Empty);
|
||||
var qualityProfile = _qualityProfileService.GetDefaultProfile(string.Empty);
|
||||
|
||||
return qualityProfile.ToResource();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user