mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Fixed logging for Settings Controller and QualityProvider
Setup/Update of Default QualityProfiles will occur on start
This commit is contained in:
parent
519e2df560
commit
48e5b36936
4 changed files with 165 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
using SubSonic.Repository;
|
||||
|
||||
|
@ -10,6 +11,7 @@ namespace NzbDrone.Core.Providers
|
|||
public class QualityProvider : IQualityProvider
|
||||
{
|
||||
private IRepository _sonicRepo;
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public QualityProvider(IRepository sonicRepo)
|
||||
{
|
||||
|
@ -27,8 +29,8 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
if (!_sonicRepo.Exists<QualityProfile>(q => q.ProfileId == profile.ProfileId))
|
||||
{
|
||||
//Log Error
|
||||
throw new InvalidOperationException("Unable to update none existing profile");
|
||||
Logger.Error("Unable to update non-existing profile");
|
||||
throw new InvalidOperationException("Unable to update non-existing profile");
|
||||
}
|
||||
|
||||
_sonicRepo.Update(profile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue