small changes

pull/193/head
tidusjar 9 years ago
parent 9c61f909de
commit 07c00d232c

@ -139,7 +139,7 @@ namespace PlexRequests.Core
}
catch (Exception ex)
{
Log.Error("Failed to cache Sonarr quality profiles!", ex);
Log.Error(ex, "Failed to cache Sonarr quality profiles!");
}
}
@ -161,7 +161,7 @@ namespace PlexRequests.Core
}
catch (Exception ex)
{
Log.Error("Failed to cache CouchPotato quality profiles!", ex);
Log.Error(ex, "Failed to cache CouchPotato quality profiles!");
}
}

@ -96,8 +96,8 @@ namespace PlexRequests.Services.Jobs
if (libraries == null)
{
libraries = new List<PlexSearch>() { PlexApi.SearchContent(authSettings.PlexAuthToken, r.Title, plexSettings.FullUri) };
if (libraries == null)
libraries = new List<PlexSearch> { PlexApi.SearchContent(authSettings.PlexAuthToken, r.Title, plexSettings.FullUri) };
if (libraries.Count == 0)
{
Log.Trace("Could not find any matching result for this title.");
continue;
@ -105,7 +105,6 @@ namespace PlexRequests.Services.Jobs
}
Log.Trace("Search results from Plex for the following request: {0}", r.Title);
//Log.Trace(results.DumpJson());
var releaseDate = r.ReleaseDate == DateTime.MinValue ? string.Empty : r.ReleaseDate.ToString("yyyy");
@ -136,8 +135,7 @@ namespace PlexRequests.Services.Jobs
}
Log.Trace("Updating the requests now");
Log.Trace("Requests that will be updates:");
Log.Trace(modifiedModel.SelectMany(x => x.Title).DumpJson());
Log.Trace("Requests that will be updated count {0}", modifiedModel.Count);
if (modifiedModel.Any())
{
@ -257,9 +255,7 @@ namespace PlexRequests.Services.Jobs
}
else
{
results = Cache.GetOrSet(CacheKeys.PlexLibaries, () => {
return GetLibraries(authSettings, plexSettings);
}, 10);
results = Cache.GetOrSet(CacheKeys.PlexLibaries, () => GetLibraries(authSettings, plexSettings), 10);
}
return results;
}

@ -164,7 +164,6 @@ namespace PlexRequests.UI.Modules
private Response ProcessMovies(MovieSearchType searchType, string searchTerm)
{
List<Task> taskList = new List<Task>();
var cpSettings = CpService.GetSettings();
List<MovieResult> apiMovies = new List<MovieResult>();
taskList.Add(Task.Factory.StartNew<List<MovieResult>>(() =>
@ -264,9 +263,9 @@ namespace PlexRequests.UI.Modules
{
Log.Trace("Searching for TV Show {0}", searchTerm);
List<Task> taskList = new List<Task>();
var taskList = new List<Task>();
List<TvMazeSearch> apiTv = new List<TvMazeSearch>();
var apiTv = new List<TvMazeSearch>();
taskList.Add(Task.Factory.StartNew(() =>
{
return new TvMazeApi().Search(searchTerm);
@ -276,7 +275,7 @@ namespace PlexRequests.UI.Modules
apiTv = t.Result;
}));
Dictionary<int, RequestedModel> dbTv = new Dictionary<int, RequestedModel>();
var dbTv = new Dictionary<int, RequestedModel>();
taskList.Add(Task.Factory.StartNew(() =>
{
return RequestService.GetAll().Where(x => x.Type == RequestType.TvShow);

Loading…
Cancel
Save