mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
update library changed notifier
This commit is contained in:
@@ -237,7 +237,7 @@ namespace Emby.Server.Implementations.IO
|
||||
/// <param name="e">The <see cref="ItemChangeEventArgs"/> instance containing the event data.</param>
|
||||
void LibraryManager_ItemRemoved(object sender, ItemChangeEventArgs e)
|
||||
{
|
||||
if (e.Item.GetParent() is AggregateFolder)
|
||||
if (e.Parent is AggregateFolder)
|
||||
{
|
||||
StopWatchingPath(e.Item.Path);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ namespace Emby.Server.Implementations.IO
|
||||
/// <param name="e">The <see cref="ItemChangeEventArgs"/> instance containing the event data.</param>
|
||||
void LibraryManager_ItemAdded(object sender, ItemChangeEventArgs e)
|
||||
{
|
||||
if (e.Item.GetParent() is AggregateFolder)
|
||||
if (e.Parent is AggregateFolder)
|
||||
{
|
||||
StartWatching(e.Item);
|
||||
}
|
||||
@@ -320,7 +320,8 @@ namespace Emby.Server.Implementations.IO
|
||||
IncludeSubdirectories = true
|
||||
};
|
||||
|
||||
if (_environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
if (_environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows ||
|
||||
_environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.OSX)
|
||||
{
|
||||
newWatcher.InternalBufferSize = 32767;
|
||||
}
|
||||
|
||||
@@ -473,6 +473,11 @@ namespace Emby.Server.Implementations.IO
|
||||
|
||||
public void SetHidden(string path, bool isHidden)
|
||||
{
|
||||
if (_environmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sharpCifsFileSystem.IsEnabledForPath(path))
|
||||
{
|
||||
_sharpCifsFileSystem.SetHidden(path, isHidden);
|
||||
@@ -498,6 +503,11 @@ namespace Emby.Server.Implementations.IO
|
||||
|
||||
public void SetReadOnly(string path, bool isReadOnly)
|
||||
{
|
||||
if (_environmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sharpCifsFileSystem.IsEnabledForPath(path))
|
||||
{
|
||||
_sharpCifsFileSystem.SetReadOnly(path, isReadOnly);
|
||||
@@ -523,6 +533,11 @@ namespace Emby.Server.Implementations.IO
|
||||
|
||||
public void SetAttributes(string path, bool isHidden, bool isReadOnly)
|
||||
{
|
||||
if (_environmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sharpCifsFileSystem.IsEnabledForPath(path))
|
||||
{
|
||||
_sharpCifsFileSystem.SetAttributes(path, isHidden, isReadOnly);
|
||||
|
||||
Reference in New Issue
Block a user