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)
|
||||
{
|
||||
var series = _sonioRepo.Single<Series>(seriesId);
|
||||
var profile = _quality.Find(series.QualityProfile.ProfileId);
|
||||
var profile = _quality.Find(series.ProfileId);
|
||||
|
||||
return profile.Allowed.Contains(quality);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ namespace NzbDrone.Core.Providers
|
|||
repoSeries.Path = path;
|
||||
repoSeries.CleanTitle = Parser.NormalizeTitle(series.SeriesName);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 QualityProfile QualityProfile { get; set; }
|
||||
public virtual int ProfileId { get; set; }
|
||||
|
||||
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
|
||||
public virtual QualityProfile QualityProfile { get; set; }
|
||||
|
||||
[SubSonicToManyRelation]
|
||||
public virtual List<Season> Seasons { get; private set; }
|
||||
|
|
Loading…
Reference in New Issue