mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-23 22:25:14 -04:00
Fixed: Don't handle images in metadata folder as Roksbox images
(cherry picked from commit 95a8f59a32d55550d5367f08a964859a97a0df44)
This commit is contained in:
@@ -87,9 +87,7 @@ namespace NzbDrone.Common.Extensions
|
||||
|
||||
public static string GetParentPath(this string childPath)
|
||||
{
|
||||
var cleanPath = OsInfo.IsWindows
|
||||
? PARENT_PATH_END_SLASH_REGEX.Replace(childPath, "")
|
||||
: childPath.TrimEnd(Path.DirectorySeparatorChar);
|
||||
var cleanPath = childPath.GetCleanPath();
|
||||
|
||||
if (cleanPath.IsNullOrWhiteSpace())
|
||||
{
|
||||
@@ -99,6 +97,13 @@ namespace NzbDrone.Common.Extensions
|
||||
return Directory.GetParent(cleanPath)?.FullName;
|
||||
}
|
||||
|
||||
public static string GetParentName(this string childPath)
|
||||
{
|
||||
var cleanPath = childPath.GetCleanPath();
|
||||
|
||||
return Directory.GetParent(cleanPath)?.Name;
|
||||
}
|
||||
|
||||
public static string GetCleanPath(this string path)
|
||||
{
|
||||
var cleanPath = OsInfo.IsWindows
|
||||
|
||||
Reference in New Issue
Block a user