mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 04:59:35 -07:00
Merge 7778eec709
into 91f06801ca
This commit is contained in:
commit
a35c03f3d6
1 changed files with 14 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
|
@ -119,6 +120,17 @@ namespace NzbDrone.Core.Notifications.Plex.Server
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (location.Path.IsParentPath(mappedPath.FullPath))
|
||||||
|
{
|
||||||
|
var subfolderPath = location.Path.GetRelativePath(mappedPath.FullPath);
|
||||||
|
var newArtistRelativePath = Path.Combine(subfolderPath, artistRelativePath);
|
||||||
|
_logger.Debug("Updating matching section with parent location match, {0}", location.Path);
|
||||||
|
_logger.Debug("Prepending artist relative path with subfolder : {0} => {1}", artistRelativePath, newArtistRelativePath);
|
||||||
|
UpdateSectionPath(newArtistRelativePath, section, location, settings);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +140,8 @@ namespace NzbDrone.Core.Notifications.Plex.Server
|
||||||
{
|
{
|
||||||
foreach (var location in section.Locations)
|
foreach (var location in section.Locations)
|
||||||
{
|
{
|
||||||
UpdateSectionPath(artistRelativePath, section, location, settings);
|
// Do not include artistRelativePath so we trigger a full library scan since we aren't sure where the files actually are!
|
||||||
|
UpdateSectionPath("", section, location, settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue