mirror of https://github.com/Sonarr/Sonarr
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.
This commit is contained in:
parent
7786f6a914
commit
be92686e0e
|
@ -108,6 +108,11 @@ namespace NzbDrone.Web.Controllers
|
||||||
public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
||||||
{
|
{
|
||||||
path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName));
|
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);
|
return AddExistingSeries(path, seriesName, seriesId, qualityProfileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,9 +121,6 @@ namespace NzbDrone.Web.Controllers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Create the folder for the new series and then Add it
|
|
||||||
_diskProvider.CreateDirectory(path);
|
|
||||||
|
|
||||||
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
|
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
|
||||||
ScanNewSeries();
|
ScanNewSeries();
|
||||||
return Json(new NotificationResult() { Title = seriesName, Text = "Was added successfully" });
|
return Json(new NotificationResult() { Title = seriesName, Text = "Was added successfully" });
|
||||||
|
|
Loading…
Reference in New Issue