allow trailing slash in plex path replacement (#108)
* add test for unc path replacement * allow trailing slash in plex path replacement
This commit is contained in:
@@ -36,7 +36,8 @@ namespace ErsatzTV.Core.Plex
|
||||
r =>
|
||||
{
|
||||
string separatorChar = IsWindows(r.PlexMediaSource) ? @"\" : @"/";
|
||||
return path.StartsWith(r.PlexPath + separatorChar);
|
||||
string prefix = r.PlexPath.EndsWith(separatorChar) ? r.PlexPath : r.PlexPath + separatorChar;
|
||||
return path.StartsWith(prefix);
|
||||
});
|
||||
return maybeReplacement.Match(
|
||||
replacement =>
|
||||
|
||||
Reference in New Issue
Block a user