aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-19 14:57:01 -0400
committerGitHub <noreply@github.com>2016-08-19 14:57:01 -0400
commit0780889c51819c9f1c3b01f5bcdae9806c219c10 (patch)
treee91e8542e997c25992fd24e0b40fd7a765c45d62 /MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
parentac8c4ccc3ce53a4eafbd0493e9fe333d95b28730 (diff)
parent003f61c8914706c6ea1d211644dabf5a5fbd759e (diff)
Merge pull request #2080 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs')
-rw-r--r--MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
index 8c2b927e3..ea9e58ee4 100644
--- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
+++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs
@@ -38,7 +38,6 @@ namespace MediaBrowser.Server.Implementations.IO
/// </summary>
private readonly IReadOnlyList<string> _alwaysIgnoreFiles = new List<string>
{
- "thumbs.db",
"small.jpg",
"albumart.jpg",
@@ -47,6 +46,16 @@ namespace MediaBrowser.Server.Implementations.IO
"TempSBE"
};
+ private readonly IReadOnlyList<string> _alwaysIgnoreExtensions = new List<string>
+ {
+ // thumbs.db
+ ".db",
+
+ // bts sync files
+ ".bts",
+ ".sync"
+ };
+
/// <summary>
/// Add the path to our temporary ignore list. Use when writing to a path within our listening scope.
/// </summary>
@@ -411,7 +420,9 @@ namespace MediaBrowser.Server.Implementations.IO
var filename = Path.GetFileName(path);
- var monitorPath = !(!string.IsNullOrEmpty(filename) && _alwaysIgnoreFiles.Contains(filename, StringComparer.OrdinalIgnoreCase));
+ var monitorPath = !string.IsNullOrEmpty(filename) &&
+ !_alwaysIgnoreFiles.Contains(filename, StringComparer.OrdinalIgnoreCase) &&
+ !_alwaysIgnoreExtensions.Contains(Path.GetExtension(path) ?? string.Empty, StringComparer.OrdinalIgnoreCase);
// Ignore certain files
var tempIgnorePaths = _tempIgnoredPaths.Keys.ToList();