From 1c62782fcd0af09aad93857cbf74d7e58c76a9fb Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 20 Aug 2013 08:35:39 -0700 Subject: [PATCH] cleanup series path on update. --- NzbDrone.Core/Tv/RefreshSeriesService.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NzbDrone.Core/Tv/RefreshSeriesService.cs b/NzbDrone.Core/Tv/RefreshSeriesService.cs index ac9517463..08c3aaf0f 100644 --- a/NzbDrone.Core/Tv/RefreshSeriesService.cs +++ b/NzbDrone.Core/Tv/RefreshSeriesService.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Linq; using NLog; using NzbDrone.Common.Messaging; @@ -82,6 +83,17 @@ namespace NzbDrone.Core.Tv series.SeriesType = SeriesTypes.Daily; } + try + { + series.Path = new DirectoryInfo(series.Path).FullName; + series.Path = series.Path.GetActualCasing(); + } + catch (Exception e) + { + _logger.WarnException("Couldn't update series path for " + series.Path, e); + } + + _seriesService.UpdateSeries(series); _refreshEpisodeService.RefreshEpisodeInfo(series, tuple.Item2);