Only add internal files if the internal metadata path exists

Signed-off-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Cody Robibero
2022-02-27 19:45:15 -07:00
parent e26446f9c0
commit 40e413d575
4 changed files with 29 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using MediaBrowser.Model.IO;
@@ -78,5 +79,9 @@ namespace MediaBrowser.Controller.Providers
return filePaths;
}
/// <inheritdoc />
public bool PathExists(string path)
=> Directory.Exists(path);
}
}

View File

@@ -16,5 +16,12 @@ namespace MediaBrowser.Controller.Providers
IReadOnlyList<string> GetFilePaths(string path);
IReadOnlyList<string> GetFilePaths(string path, bool clearCache, bool sort = false);
/// <summary>
/// Does the path exist.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>Whether the path exists.</returns>
bool PathExists(string path);
}
}