1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Added more logging for series editor

This commit is contained in:
Mark McDowall 2014-04-08 15:41:14 -07:00
parent b582127e14
commit 492ffb5714

View File

@ -3,6 +3,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Common;
using NzbDrone.Common.EnsureThat; using NzbDrone.Common.EnsureThat;
using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.DataAugmentation.Scene;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
@ -197,14 +198,22 @@ public List<Series> UpdateSeries(List<Series> series)
{ {
foreach (var s in series) foreach (var s in series)
{ {
if (!String.IsNullOrWhiteSpace(s.RootFolderPath)) if (!s.RootFolderPath.IsNullOrWhiteSpace())
{ {
var folderName = new DirectoryInfo(s.Path).Name; var folderName = new DirectoryInfo(s.Path).Name;
s.Path = Path.Combine(s.RootFolderPath, folderName); s.Path = Path.Combine(s.RootFolderPath, folderName);
_logger.Trace("Changing path for {0} to {1}", s.Title, s.Path);
}
else
{
_logger.Trace("Not changing path for: {0}", s.Title);
} }
} }
_logger.Debug("Updating {0} series", series.Count);
_seriesRepository.UpdateMany(series); _seriesRepository.UpdateMany(series);
_logger.Debug("{0} series updated", series.Count);
return series; return series;
} }