mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-29 11:58:27 +01:00
update active recordings
This commit is contained in:
@@ -23,9 +23,9 @@ namespace MediaBrowser.Providers.Books
|
||||
var sourceItem = source.Item;
|
||||
var targetItem = target.Item;
|
||||
|
||||
if (replaceData || targetItem.Artists.Count == 0)
|
||||
if (replaceData || targetItem.Artists.Length == 0)
|
||||
{
|
||||
targetItem.Artists = sourceItem.Artists.ToList();
|
||||
targetItem.Artists = sourceItem.Artists;
|
||||
}
|
||||
|
||||
if (replaceData || string.IsNullOrEmpty(targetItem.Album))
|
||||
|
||||
@@ -23,9 +23,9 @@ namespace MediaBrowser.Providers.Books
|
||||
var sourceItem = source.Item;
|
||||
var targetItem = target.Item;
|
||||
|
||||
if (replaceData || targetItem.Artists.Count == 0)
|
||||
if (replaceData || targetItem.Artists.Length == 0)
|
||||
{
|
||||
targetItem.Artists = sourceItem.Artists.ToList();
|
||||
targetItem.Artists = sourceItem.Artists;
|
||||
}
|
||||
|
||||
if (replaceData || string.IsNullOrEmpty(targetItem.Album))
|
||||
|
||||
@@ -41,11 +41,7 @@ namespace MediaBrowser.Providers.BoxSets
|
||||
|
||||
if (mergeMetadataSettings)
|
||||
{
|
||||
// Retain shortcut children
|
||||
var linkedChildren = sourceItem.LinkedChildren.ToList();
|
||||
linkedChildren.AddRange(sourceItem.LinkedChildren.Where(i => i.Type == LinkedChildType.Shortcut));
|
||||
|
||||
targetItem.LinkedChildren = linkedChildren.ToArray(linkedChildren.Count);
|
||||
targetItem.LinkedChildren = sourceItem.LinkedChildren;
|
||||
targetItem.Shares = sourceItem.Shares;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
private string GetAudioImagePath(Audio item)
|
||||
{
|
||||
var filename = item.Album ?? string.Empty;
|
||||
filename += string.Join(",", item.Artists.ToArray(item.Artists.Count));
|
||||
filename += string.Join(",", item.Artists);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(item.Album))
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
}
|
||||
|
||||
audio.Album = data.Album;
|
||||
audio.Artists = data.Artists.ToList();
|
||||
audio.Artists = data.Artists;
|
||||
audio.AlbumArtists = data.AlbumArtists;
|
||||
audio.IndexNumber = data.IndexNumber;
|
||||
audio.ParentIndexNumber = data.ParentIndexNumber;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace MediaBrowser.Providers.Music
|
||||
.SelectMany(i => i.Artists)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(i => i)
|
||||
.ToList();
|
||||
.ToArray();
|
||||
|
||||
if (!item.Artists.SequenceEqual(artists, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ namespace MediaBrowser.Providers.Music
|
||||
var sourceItem = source.Item;
|
||||
var targetItem = target.Item;
|
||||
|
||||
if (replaceData || targetItem.Artists.Count == 0)
|
||||
if (replaceData || targetItem.Artists.Length == 0)
|
||||
{
|
||||
targetItem.Artists = sourceItem.Artists;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace MediaBrowser.Providers.Music
|
||||
}) :
|
||||
item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder);
|
||||
|
||||
var currentList = item.Genres.ToList();
|
||||
var currentList = item.Genres;
|
||||
|
||||
item.Genres = taggedItems.SelectMany(i => i.Genres)
|
||||
.DistinctNames()
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace MediaBrowser.Providers.Music
|
||||
var sourceItem = source.Item;
|
||||
var targetItem = target.Item;
|
||||
|
||||
if (replaceData || targetItem.Artists.Count == 0)
|
||||
if (replaceData || targetItem.Artists.Length == 0)
|
||||
{
|
||||
targetItem.Artists = sourceItem.Artists.ToList();
|
||||
targetItem.Artists = sourceItem.Artists;
|
||||
}
|
||||
|
||||
if (replaceData || string.IsNullOrEmpty(targetItem.Album))
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace MediaBrowser.Providers.Music
|
||||
targetItem.Album = sourceItem.Album;
|
||||
}
|
||||
|
||||
if (replaceData || targetItem.Artists.Count == 0)
|
||||
if (replaceData || targetItem.Artists.Length == 0)
|
||||
{
|
||||
targetItem.Artists = sourceItem.Artists.ToList();
|
||||
targetItem.Artists = sourceItem.Artists;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,12 +42,9 @@ namespace MediaBrowser.Providers.Playlists
|
||||
{
|
||||
if (!item.IsLocked && !item.LockedFields.Contains(MetadataFields.Genres))
|
||||
{
|
||||
var items = item.GetLinkedChildren()
|
||||
.ToList();
|
||||
var currentList = item.Genres;
|
||||
|
||||
var currentList = item.Genres.ToList();
|
||||
|
||||
item.Genres = items.SelectMany(i => i.Genres)
|
||||
item.Genres = item.GetLinkedChildren().SelectMany(i => i.Genres)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user