AddNewSeries now uses the created folder name wghen added the series (since windows trims some characters from the end [periods]).

CreateDirectory moved from AddExisting to AddNew, since we don't want to try to create a folder for existing series.
pull/4/head
Mark McDowall 13 years ago
parent 7786f6a914
commit be92686e0e

@ -108,6 +108,11 @@ namespace NzbDrone.Web.Controllers
public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId)
{
path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName));
//Create the folder for the new series
//Use the created folder name when adding the series
path = _diskProvider.CreateDirectory(path);
return AddExistingSeries(path, seriesName, seriesId, qualityProfileId);
}
@ -116,9 +121,6 @@ namespace NzbDrone.Web.Controllers
{
try
{
//Create the folder for the new series and then Add it
_diskProvider.CreateDirectory(path);
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
ScanNewSeries();
return Json(new NotificationResult() { Title = seriesName, Text = "Was added successfully" });

Loading…
Cancel
Save