mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fixed tags aggregation
This commit is contained in:
parent
73ddbeb4c1
commit
4959232b27
@ -1588,16 +1588,26 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
public List<string> GetInheritedTags()
|
public List<string> GetInheritedTags()
|
||||||
{
|
{
|
||||||
var list = new List<string>();
|
var list = new List<string>();
|
||||||
list.AddRange(Tags);
|
if (Tags is not null)
|
||||||
|
{
|
||||||
|
list.AddRange(Tags);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var parent in GetParents())
|
foreach (var parent in GetParents())
|
||||||
{
|
{
|
||||||
list.AddRange(parent.Tags);
|
if (parent.Tags is not null)
|
||||||
|
{
|
||||||
|
list.AddRange(parent.Tags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var folder in LibraryManager.GetCollectionFolders(this))
|
foreach (var folder in LibraryManager.GetCollectionFolders(this))
|
||||||
{
|
{
|
||||||
list.AddRange(folder.Tags);
|
if (folder.Tags is not null)
|
||||||
|
{
|
||||||
|
list.AddRange(folder.Tags);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return list.Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
return list.Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
||||||
@ -1785,7 +1795,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Studios = [..current, name];
|
Studios = [.. current, name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1807,7 +1817,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
var genres = Genres;
|
var genres = Genres;
|
||||||
if (!genres.Contains(name, StringComparison.OrdinalIgnoreCase))
|
if (!genres.Contains(name, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
Genres = [..genres, name];
|
Genres = [.. genres, name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1978,7 +1988,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
|
|
||||||
public void AddImage(ItemImageInfo image)
|
public void AddImage(ItemImageInfo image)
|
||||||
{
|
{
|
||||||
ImageInfos = [..ImageInfos, image];
|
ImageInfos = [.. ImageInfos, image];
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual Task UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken)
|
public virtual Task UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user