Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/src/commit/8d5e92d60265efed738e6fed41a3decf708d63b6/NzbDrone.Api/Qualities/QualityProfileSchemaModule.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Prowlarr/NzbDrone.Api/Qualities/QualityProfileSchemaModule.cs

39 lines
1.2 KiB

using System.Collections.Generic;
using NzbDrone.Core.Qualities;
using NzbDrone.Api.Mapping;
using System.Linq;
namespace NzbDrone.Api.Qualities
{
public class QualityProfileSchemaModule : NzbDroneRestModule<QualityProfileResource>
{
public QualityProfileSchemaModule()
: base("/qualityprofiles/schema")
{
GetResourceAll = GetAll;
}
private List<QualityProfileResource> GetAll()
{
var profile = new QualityProfile();
profile.Cutoff = Quality.Unknown;
profile.Allowed = new List<Quality>();
return new List<QualityProfileResource>{ QualityToResource(profile)};
}
private static QualityProfileResource QualityToResource(QualityProfile profile)
{
return new QualityProfileResource
{
Available = Quality.All()
.Where(c => !profile.Allowed.Any(q => c.Id == q.Id))
.InjectTo<List<QualityResource>>(),
Allowed = profile.Allowed.InjectTo<List<QualityResource>>(),
Name = profile.Name,
Id = profile.Id
};
}
}
}