diff --git a/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs b/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs index b22961317..bfe801258 100644 --- a/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs +++ b/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs @@ -72,14 +72,12 @@ namespace PlexRequests.Services.Jobs private IRepository UserNotifyRepo { get; } public void CheckAndUpdateAll() { - Log.Trace("Getting the settings"); var plexSettings = Plex.GetSettings(); var authSettings = Auth.GetSettings(); - Log.Trace("Getting all the requests"); if (!ValidateSettings(plexSettings, authSettings)) { - Log.Info("Validation of the plex settings failed."); + Log.Debug("Validation of the plex settings failed."); return; } @@ -87,7 +85,7 @@ namespace PlexRequests.Services.Jobs if (libraries == null || !libraries.Any()) { - Log.Info("Did not find any libraries in Plex."); + Log.Debug("Did not find any libraries in Plex."); return; } @@ -97,21 +95,16 @@ namespace PlexRequests.Services.Jobs var requests = RequestService.GetAll(); var requestedModels = requests as RequestedModel[] ?? requests.Where(x => !x.Available).ToArray(); - Log.Trace("Requests Count {0}", requestedModels.Length); if (!requestedModels.Any()) { - Log.Info("There are no requests to check."); + Log.Debug("There are no requests to check."); return; } var modifiedModel = new List(); foreach (var r in requestedModels) { - Log.Trace("We are going to see if Plex has the following title: {0}", r.Title); - - Log.Trace("Search results from Plex for the following request: {0}", r.Title); - var releaseDate = r.ReleaseDate == DateTime.MinValue ? string.Empty : r.ReleaseDate.ToString("yyyy"); bool matchResult; @@ -136,12 +129,10 @@ namespace PlexRequests.Services.Jobs modifiedModel.Add(r); continue; } - - Log.Trace("The result from Plex where the title's match was null, so that means the content is not yet in Plex."); + } - - Log.Trace("Updating the requests now"); - Log.Trace("Requests that will be updated count {0}", modifiedModel.Count); + + Log.Debug("Requests that will be updated count {0}", modifiedModel.Count); if (modifiedModel.Any()) { @@ -248,8 +239,6 @@ namespace PlexRequests.Services.Jobs private List CachedLibraries(AuthenticationSettings authSettings, PlexSettings plexSettings, bool setCache) { - Log.Trace("Obtaining library sections from Plex"); - List results = new List(); if (!ValidateSettings(plexSettings, authSettings)) @@ -262,10 +251,8 @@ namespace PlexRequests.Services.Jobs { if (setCache) { - Log.Trace("Plex Lib API Call"); results = GetLibraries(authSettings, plexSettings); - Log.Trace("Plex Lib Cache Set Call"); if (results != null) { Cache.Set(CacheKeys.PlexLibaries, results, CacheKeys.TimeFrameMinutes.SchedulerCaching); @@ -273,12 +260,8 @@ namespace PlexRequests.Services.Jobs } else { - Log.Trace("Plex Lib GetSet Call"); results = Cache.GetOrSet(CacheKeys.PlexLibaries, () => - { - Log.Trace("Plex Lib API Call (inside getset)"); - return GetLibraries(authSettings, plexSettings); - }, CacheKeys.TimeFrameMinutes.SchedulerCaching); + GetLibraries(authSettings, plexSettings), CacheKeys.TimeFrameMinutes.SchedulerCaching); } } catch (Exception ex) @@ -298,7 +281,6 @@ namespace PlexRequests.Services.Jobs { foreach (var dir in sections.Directories) { - Log.Trace("Obtaining results from Plex for the following library section: {0}", dir.Title); var lib = PlexApi.GetLibrary(authSettings.PlexAuthToken, plexSettings.FullUri, dir.Key); if (lib != null) { @@ -306,8 +288,7 @@ namespace PlexRequests.Services.Jobs } } } - - Log.Trace("Returning Plex Libs"); + return libs; } @@ -335,7 +316,6 @@ namespace PlexRequests.Services.Jobs foreach (var model in modelChanged) { var selectedUsers = users.Select(x => x.Username).Intersect(model.RequestedUsers); - Log.Debug("Selected Users {0}", selectedUsers.DumpJson()); foreach (var user in selectedUsers) { Log.Info("Notifying user {0}", user); diff --git a/PlexRequests.Store/Repository/BaseGenericRepository.cs b/PlexRequests.Store/Repository/BaseGenericRepository.cs index ac8c45203..f92fdb218 100644 --- a/PlexRequests.Store/Repository/BaseGenericRepository.cs +++ b/PlexRequests.Store/Repository/BaseGenericRepository.cs @@ -83,8 +83,6 @@ namespace PlexRequests.Store.Repository public bool Update(T entity) { ResetCache(); - Log.Trace("Updating entity"); - Log.Trace(entity.DumpJson()); using (var db = Config.DbConnection()) { db.Open(); @@ -95,8 +93,6 @@ namespace PlexRequests.Store.Repository public async Task UpdateAsync(T entity) { ResetCache(); - Log.Trace("Updating entity"); - Log.Trace(entity.DumpJson()); using (var db = Config.DbConnection()) { db.Open(); diff --git a/PlexRequests.UI/Helpers/TvSender.cs b/PlexRequests.UI/Helpers/TvSender.cs index 06985add9..5074cb9fc 100644 --- a/PlexRequests.UI/Helpers/TvSender.cs +++ b/PlexRequests.UI/Helpers/TvSender.cs @@ -87,16 +87,11 @@ namespace PlexRequests.UI.Helpers qualityId = sickRageSettings.QualityProfile; } - Log.Trace("Calling `AddSeries` with the following settings:"); - Log.Trace(sickRageSettings.DumpJson()); - Log.Trace("And the following `model`:"); - Log.Trace(model.DumpJson()); var apiResult = SickrageApi.AddSeries(model.ProviderId, model.SeasonCount, model.SeasonList, qualityId, - sickRageSettings.ApiKey, sickRageSettings.FullUri); + sickRageSettings.ApiKey, sickRageSettings.FullUri); var result = apiResult.Result; - Log.Trace("SickRage Add Result: "); - Log.Trace(result.DumpJson()); + return result; } diff --git a/PlexRequests.UI/Modules/AdminModule.cs b/PlexRequests.UI/Modules/AdminModule.cs index 451a3ea3c..8d5dafc1e 100644 --- a/PlexRequests.UI/Modules/AdminModule.cs +++ b/PlexRequests.UI/Modules/AdminModule.cs @@ -224,8 +224,6 @@ namespace PlexRequests.UI.Modules private Negotiator Admin() { var settings = PrService.GetSettings(); - Log.Trace("Getting Settings:"); - Log.Trace(settings.DumpJson()); return View["Settings", settings]; } @@ -542,7 +540,6 @@ namespace PlexRequests.UI.Modules { return Response.AsJson(valid.SendJsonError()); } - Log.Trace(settings.DumpJson()); var result = PushbulletService.SaveSettings(settings); if (settings.Enabled) @@ -605,7 +602,6 @@ namespace PlexRequests.UI.Modules { return Response.AsJson(valid.SendJsonError()); } - Log.Trace(settings.DumpJson()); var result = PushoverService.SaveSettings(settings); if (settings.Enabled) @@ -731,7 +727,6 @@ namespace PlexRequests.UI.Modules Log.Info("Error validating Headphones settings, message: {0}", error.Message); return Response.AsJson(error); } - Log.Trace(settings.DumpJson()); var result = HeadphonesService.SaveSettings(settings); diff --git a/PlexRequests.UI/Modules/UserLoginModule.cs b/PlexRequests.UI/Modules/UserLoginModule.cs index 099545f65..f87201a79 100644 --- a/PlexRequests.UI/Modules/UserLoginModule.cs +++ b/PlexRequests.UI/Modules/UserLoginModule.cs @@ -93,8 +93,6 @@ namespace PlexRequests.UI.Modules var authenticated = false; var settings = AuthService.GetSettings(); - Log.Debug("Settings: "); - Log.Debug(settings.DumpJson()); if (IsUserInDeniedList(username, settings)) { @@ -187,8 +185,6 @@ namespace PlexRequests.UI.Modules private bool CheckIfUserIsInPlexFriends(string username, string authToken) { var users = Api.GetUsers(authToken); - Log.Trace("Plex Users: "); - Log.Trace(users.DumpJson()); var allUsers = users?.User?.Where(x => !string.IsNullOrEmpty(x.Title)); return allUsers != null && allUsers.Any(x => x.Title.Equals(username, StringComparison.CurrentCultureIgnoreCase)); }