mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Resharper code cleanup
This commit is contained in:
parent
c7286863b0
commit
d00744aafa
11 changed files with 46 additions and 130 deletions
|
@ -36,11 +36,8 @@ namespace NzbDrone.Core.Providers
|
|||
return _sonioRepo.Single<Series>(s => s.TvdbId == tvdbId.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SyncSeriesWithDisk()
|
||||
{
|
||||
|
||||
foreach (string seriesFolder in _diskProvider.GetDirectories(_config.SeriesRoot))
|
||||
{
|
||||
var cleanPath = DiskProvider.CleanPath(new DirectoryInfo(seriesFolder).FullName);
|
||||
|
@ -50,7 +47,6 @@ namespace NzbDrone.Core.Providers
|
|||
AddShow(cleanPath);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -58,10 +54,7 @@ namespace NzbDrone.Core.Providers
|
|||
private void AddShow(string path)
|
||||
{
|
||||
var searchResults = _tvDb.SearchSeries(new DirectoryInfo(path).Name);
|
||||
if (searchResults.Count != 0 && !_sonioRepo.Exists<Series>(s => s.TvdbId == searchResults[0].Id.ToString()))
|
||||
{
|
||||
AddShow(path, _tvDb.GetSeries(searchResults[0].Id, searchResults[0].Language));
|
||||
}
|
||||
if (searchResults.Count != 0 && !_sonioRepo.Exists<Series>(s => s.TvdbId == searchResults[0].Id.ToString())) AddShow(path, _tvDb.GetSeries(searchResults[0].Id, searchResults[0].Language));
|
||||
}
|
||||
|
||||
private void AddShow(string path, TvdbSeries series)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue