From e1d76689f7eb5a2c82bd1edc701b70b3a423bb28 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 16 May 2023 20:53:48 +0300 Subject: [PATCH] Fixed: (Notifications) Calculate mapped path in Plex only when MapTo is not empty --- .../Notifications/Plex/Server/PlexServerService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs index 4fd661122..6702a9e3e 100644 --- a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs +++ b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs @@ -103,7 +103,14 @@ namespace NzbDrone.Core.Notifications.Plex.Server foreach (var location in section.Locations) { var rootFolder = new OsPath(rootFolderPath); - var mappedPath = new OsPath(settings.MapTo) + (rootFolder - new OsPath(settings.MapFrom)); + var mappedPath = rootFolder; + + if (settings.MapTo.IsNotNullOrWhiteSpace()) + { + mappedPath = new OsPath(settings.MapTo) + (rootFolder - new OsPath(settings.MapFrom)); + + _logger.Trace("Mapping Path from {0} to {1} for partial scan", rootFolder, mappedPath); + } if (location.Path.PathEquals(mappedPath.FullPath)) {