refactor: short circuit previous installs when logdb is disabled
This commit is contained in:
parent
7f0eb0f4f6
commit
ea10fcb6a5
|
@ -48,10 +48,12 @@ namespace Sonarr.Api.V3.Update
|
||||||
installed.Installed = true;
|
installed.Installed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var updateHistory = _configFileProvider.LogDbEnabled
|
if (!_configFileProvider.LogDbEnabled)
|
||||||
? _updateHistoryService.InstalledSince(resources.Last().ReleaseDate)
|
{
|
||||||
: new List<UpdateHistory>();
|
return resources;
|
||||||
|
}
|
||||||
|
|
||||||
|
var updateHistory = _updateHistoryService.InstalledSince(resources.Last().ReleaseDate);
|
||||||
var installDates = updateHistory
|
var installDates = updateHistory
|
||||||
.DistinctBy(v => v.Version)
|
.DistinctBy(v => v.Version)
|
||||||
.ToDictionary(v => v.Version);
|
.ToDictionary(v => v.Version);
|
||||||
|
|
Loading…
Reference in New Issue