Binders full of women are no longer ignored
This commit is contained in:
parent
21ccdaa68b
commit
d50e31f994
|
@ -17,8 +17,9 @@ Thumbs.db
|
||||||
*.cache
|
*.cache
|
||||||
*.ilk
|
*.ilk
|
||||||
*.log
|
*.log
|
||||||
[Bb]in*/
|
[Bb]in
|
||||||
[Dd]ebug*/
|
[Dd]ebug*/
|
||||||
|
[Rrelease]*/
|
||||||
*.lib
|
*.lib
|
||||||
*.sbr
|
*.sbr
|
||||||
*.nzb
|
*.nzb
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
using NzbDrone.Core.Repository.Quality;
|
||||||
|
|
||||||
|
namespace NzbDrone.Web.Helpers.Binders
|
||||||
|
{
|
||||||
|
public class QualityTypesBinder : IModelBinder
|
||||||
|
{
|
||||||
|
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
|
||||||
|
{
|
||||||
|
var value = bindingContext.ValueProvider.GetValue("quality");
|
||||||
|
var quality = QualityTypes.FindById(Convert.ToInt32(value.AttemptedValue));
|
||||||
|
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue