support external subtitles (#745)

* support external subtitles in local movie libraries

* code cleanup

* simplify subtitle updating

* skip external subtitles from media servers

* fix plex subtitles
This commit is contained in:
Jason Dove
2022-04-20 15:54:53 -05:00
committed by GitHub
parent d755d0ae29
commit 3713711864
47 changed files with 12876 additions and 449 deletions
+18
View File
@@ -75,6 +75,24 @@ public class LocalFileSystem : ILocalFileSystem
return new List<string>();
}
public IEnumerable<string> ListFiles(string folder, string searchPattern)
{
if (Directory.Exists(folder))
{
try
{
return Directory.EnumerateFiles(folder, searchPattern, SearchOption.TopDirectoryOnly);
}
catch (Exception ex)
{
// do nothing
_client.Notify(ex);
}
}
return new List<string>();
}
public bool FileExists(string path) => File.Exists(path);
public bool FolderExists(string folder) => Directory.Exists(folder);