diff --git a/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs b/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs index 256ca617b..2eb535214 100644 --- a/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs +++ b/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs @@ -158,15 +158,27 @@ namespace MediaBrowser.Providers.Playlists private bool TryGetPlaylistItemPath(string itemPath, string playlistPath, List libraryPaths, out string path) { path = null; - var baseFolder = Path.GetDirectoryName(playlistPath); - var basePath = Path.Combine(baseFolder, itemPath); - var fullPath = Path.GetFullPath(basePath); + string pathToCheck; + if (File.Exists(itemPath)) + { + pathToCheck = itemPath; + } + else + { + var baseFolder = Path.GetDirectoryName(playlistPath); + var basePath = Path.Combine(baseFolder, itemPath); + pathToCheck = Path.GetFullPath(basePath); + if (!File.Exists(pathToCheck)) + { + return false; + } + } foreach (var libraryPath in libraryPaths) { - if (fullPath.StartsWith(libraryPath, StringComparison.OrdinalIgnoreCase) && File.Exists(fullPath)) + if (pathToCheck.StartsWith(libraryPath, StringComparison.OrdinalIgnoreCase)) { - path = fullPath; + path = pathToCheck; return true; } }