Fixed issue with quality view
This commit is contained in:
parent
d50e31f994
commit
363ece3939
|
@ -173,7 +173,7 @@ namespace NzbDrone.Web.Controllers
|
|||
Bluray1080pMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 7).MaxSize
|
||||
};
|
||||
|
||||
ViewData["Profiles"] = profiles;
|
||||
ViewData["Profiles"] = profiles.Select(s => s.QualityProfileId).ToList();
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
@ -269,13 +269,15 @@ namespace NzbDrone.Web.Controllers
|
|||
Cutoff = QualityTypes.Unknown
|
||||
};
|
||||
|
||||
qualityProfile.QualityProfileId = _qualityProvider.Add(qualityProfile);
|
||||
var qualityProfileId = _qualityProvider.Add(qualityProfile);
|
||||
|
||||
return GetQualityProfileView(qualityProfile);
|
||||
return GetQualityProfileView(qualityProfileId);
|
||||
}
|
||||
|
||||
public PartialViewResult GetQualityProfileView(QualityProfile profile)
|
||||
public PartialViewResult GetQualityProfileView(int profileId)
|
||||
{
|
||||
var profile = _qualityProvider.Get(profileId);
|
||||
|
||||
var model = new QualityProfileModel();
|
||||
model.QualityProfileId = profile.QualityProfileId;
|
||||
model.Name = profile.Name;
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
</a>
|
||||
</div>
|
||||
<div id="profiles">
|
||||
@foreach (var item in (List<QualityProfile>)ViewData["Profiles"])
|
||||
@foreach (var profileId in (List<Int32>)ViewData["Profiles"])
|
||||
{
|
||||
Html.RenderAction("GetQualityProfileView", item);
|
||||
Html.RenderAction("GetQualityProfileView", new { profileId = profileId });
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue