1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 03:52:33 +02:00

cleanup series path on update.

This commit is contained in:
kay.one 2013-08-20 08:35:39 -07:00
parent af1d7b0e80
commit 1c62782fcd

View File

@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Linq;
using NLog;
using NzbDrone.Common.Messaging;
@ -82,6 +83,17 @@ private void RefreshSeriesInfo(Series series)
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);