mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
update library changed notifier
This commit is contained in:
@@ -2236,7 +2236,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
var filename = System.IO.Path.GetFileNameWithoutExtension(Path);
|
||||
var extensions = new List<string> { ".nfo", ".xml", ".srt" };
|
||||
var extensions = new List<string> { ".nfo", ".xml", ".srt", ".vtt", ".sub", ".idx", ".txt", ".edl" };
|
||||
extensions.AddRange(SupportedImageExtensions);
|
||||
|
||||
return FileSystem.GetFiles(FileSystem.GetDirectoryName(Path), extensions.ToArray(extensions.Count), false, false)
|
||||
|
||||
@@ -466,11 +466,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
item.SetParent(null);
|
||||
await LibraryManager.DeleteItem(item, new DeleteOptions { DeleteFileLocation = false }).ConfigureAwait(false);
|
||||
LibraryManager.ReportItemRemoved(item);
|
||||
LibraryManager.ReportItemRemoved(item, this);
|
||||
}
|
||||
}
|
||||
|
||||
LibraryManager.CreateItems(newItems, cancellationToken);
|
||||
LibraryManager.CreateItems(newItems, this, cancellationToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -195,16 +195,12 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <summary>
|
||||
/// Creates the item.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void CreateItem(BaseItem item, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the items.
|
||||
/// </summary>
|
||||
/// <param name="items">The items.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void CreateItems(IEnumerable<BaseItem> items, CancellationToken cancellationToken);
|
||||
void CreateItems(IEnumerable<BaseItem> items, BaseItem parent, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the item.
|
||||
@@ -237,8 +233,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <summary>
|
||||
/// Reports the item removed.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
void ReportItemRemoved(BaseItem item);
|
||||
void ReportItemRemoved(BaseItem item, BaseItem parent);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the type of the collection.
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <value>The item.</value>
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
public BaseItem Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user