mirror of https://github.com/lidarr/Lidarr
Fixed issue with storing and retrieving quality profile, checking the profile.
This commit is contained in:
parent
a7780fab67
commit
309e1ba249
|
@ -58,7 +58,7 @@ namespace NzbDrone.Core.Providers
|
||||||
public bool QualityWanted(int seriesId, QualityTypes quality)
|
public bool QualityWanted(int seriesId, QualityTypes quality)
|
||||||
{
|
{
|
||||||
var series = _sonioRepo.Single<Series>(seriesId);
|
var series = _sonioRepo.Single<Series>(seriesId);
|
||||||
var profile = _quality.Find(series.QualityProfile.ProfileId);
|
var profile = _quality.Find(series.ProfileId);
|
||||||
|
|
||||||
return profile.Allowed.Contains(quality);
|
return profile.Allowed.Contains(quality);
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ namespace NzbDrone.Core.Providers
|
||||||
repoSeries.Path = path;
|
repoSeries.Path = path;
|
||||||
repoSeries.CleanTitle = Parser.NormalizeTitle(series.SeriesName);
|
repoSeries.CleanTitle = Parser.NormalizeTitle(series.SeriesName);
|
||||||
repoSeries.Monitored = true; //New shows should be monitored
|
repoSeries.Monitored = true; //New shows should be monitored
|
||||||
repoSeries.QualityProfile = _quality.Find(Convert.ToInt32(_config.GetValue("Quality", 1, true)));
|
repoSeries.ProfileId = Convert.ToInt32(_config.GetValue("Quality", 1, true));
|
||||||
_sonioRepo.Add(repoSeries);
|
_sonioRepo.Add(repoSeries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace NzbDrone.Core.Repository.Quality
|
||||||
[SubSonicPrimaryKey(true)]
|
[SubSonicPrimaryKey(true)]
|
||||||
public int ProfileId { get; set; }
|
public int ProfileId { get; set; }
|
||||||
|
|
||||||
[Required (ErrorMessage = "A Name is Required")]
|
[Required(ErrorMessage = "A Name is Required")]
|
||||||
[DisplayName("Name")]
|
[DisplayName("Name")]
|
||||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
@ -52,5 +52,8 @@ namespace NzbDrone.Core.Repository.Quality
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SubSonicToManyRelation]
|
||||||
|
public virtual List<string> Series { get; private set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,10 @@ namespace NzbDrone.Core.Repository
|
||||||
|
|
||||||
public bool Monitored { get; set; }
|
public bool Monitored { get; set; }
|
||||||
|
|
||||||
public QualityProfile QualityProfile { get; set; }
|
public virtual int ProfileId { get; set; }
|
||||||
|
|
||||||
|
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
|
||||||
|
public virtual QualityProfile QualityProfile { get; set; }
|
||||||
|
|
||||||
[SubSonicToManyRelation]
|
[SubSonicToManyRelation]
|
||||||
public virtual List<Season> Seasons { get; private set; }
|
public virtual List<Season> Seasons { get; private set; }
|
||||||
|
|
Loading…
Reference in New Issue