aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-12-20 09:19:45 +0100
committerShadowghost <Ghost_of_Stone@web.de>2022-12-20 09:19:45 +0100
commitef085483b2ef54195e16f282330a3c204e3227b6 (patch)
tree643b41f915fede76716cd0c615a0472989993e76 /MediaBrowser.Controller
parentb725fbe51af22ca270912eeb4929a8ee2a3b37a4 (diff)
parentb0156792678b37563423c8fc0b10434a18a2a38a (diff)
Merge branch 'master' into network-rewrite
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs5
-rw-r--r--MediaBrowser.Controller/Entities/CollectionFolder.cs3
-rw-r--r--MediaBrowser.Controller/Entities/TV/Series.cs2
-rw-r--r--MediaBrowser.Controller/IServerApplicationPaths.cs18
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs10
-rw-r--r--MediaBrowser.Controller/Library/NameExtensions.cs3
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj2
-rw-r--r--MediaBrowser.Controller/Providers/IProviderManager.cs2
8 files changed, 18 insertions, 27 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 32fe1b3b02..49dd151f36 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -2451,6 +2451,11 @@ namespace MediaBrowser.Controller.Entities
return Task.FromResult(true);
}
+ if (video.OwnerId.Equals(default))
+ {
+ video.OwnerId = this.Id;
+ }
+
return RefreshMetadataForOwnedItem(video, copyTitleMetadata, newOptions, cancellationToken);
}
diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs
index 7dc7f774d0..5ac619d8f5 100644
--- a/MediaBrowser.Controller/Entities/CollectionFolder.cs
+++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs
@@ -355,8 +355,7 @@ namespace MediaBrowser.Controller.Entities
return PhysicalLocations
.Where(i => !FileSystem.AreEqual(i, Path))
.SelectMany(i => GetPhysicalParents(i, rootChildren))
- .GroupBy(x => x.Id)
- .Select(x => x.First());
+ .DistinctBy(x => x.Id);
}
private IEnumerable<Folder> GetPhysicalParents(string path, List<Folder> rootChildren)
diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs
index 02312757ce..e7a8a773ec 100644
--- a/MediaBrowser.Controller/Entities/TV/Series.cs
+++ b/MediaBrowser.Controller/Entities/TV/Series.cs
@@ -283,7 +283,7 @@ namespace MediaBrowser.Controller.Entities.TV
// This depends on settings for that series
// When this happens, remove the duplicate from season 0
- return allEpisodes.GroupBy(i => i.Id).Select(x => x.First()).Reverse();
+ return allEpisodes.DistinctBy(i => i.Id).Reverse();
}
public async Task RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress<double> progress, CancellationToken cancellationToken)
diff --git a/MediaBrowser.Controller/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.cs
index 1890dbb360..608286cd8a 100644
--- a/MediaBrowser.Controller/IServerApplicationPaths.cs
+++ b/MediaBrowser.Controller/IServerApplicationPaths.cs
@@ -51,24 +51,6 @@ namespace MediaBrowser.Controller
string YearPath { get; }
/// <summary>
- /// Gets the path to the General IBN directory.
- /// </summary>
- /// <value>The general path.</value>
- string GeneralPath { get; }
-
- /// <summary>
- /// Gets the path to the Ratings IBN directory.
- /// </summary>
- /// <value>The ratings path.</value>
- string RatingsPath { get; }
-
- /// <summary>
- /// Gets the media info images path.
- /// </summary>
- /// <value>The media info images path.</value>
- string MediaInfoImagesPath { get; }
-
- /// <summary>
/// Gets the path to the user configuration directory.
/// </summary>
/// <value>The user configuration directory path.</value>
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index 5905c25a57..f34e3d68d9 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -429,10 +429,16 @@ namespace MediaBrowser.Controller.Library
/// Gets the collection folders.
/// </summary>
/// <param name="item">The item.</param>
- /// <returns>IEnumerable&lt;Folder&gt;.</returns>
+ /// <returns>The folders that contain the item.</returns>
List<Folder> GetCollectionFolders(BaseItem item);
- List<Folder> GetCollectionFolders(BaseItem item, List<Folder> allUserRootChildren);
+ /// <summary>
+ /// Gets the collection folders.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <param name="allUserRootChildren">The root folders to consider.</param>
+ /// <returns>The folders that contain the item.</returns>
+ List<Folder> GetCollectionFolders(BaseItem item, IEnumerable<Folder> allUserRootChildren);
LibraryOptions GetLibraryOptions(BaseItem item);
diff --git a/MediaBrowser.Controller/Library/NameExtensions.cs b/MediaBrowser.Controller/Library/NameExtensions.cs
index 919570e893..ee37fb2dc2 100644
--- a/MediaBrowser.Controller/Library/NameExtensions.cs
+++ b/MediaBrowser.Controller/Library/NameExtensions.cs
@@ -10,8 +10,7 @@ namespace MediaBrowser.Controller.Library
public static class NameExtensions
{
public static IEnumerable<string> DistinctNames(this IEnumerable<string> names)
- => names.GroupBy(RemoveDiacritics, StringComparer.OrdinalIgnoreCase)
- .Select(x => x.First());
+ => names.DistinctBy(RemoveDiacritics, StringComparer.OrdinalIgnoreCase);
private static string RemoveDiacritics(string? name)
{
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 7e3d7a981b..4a66edb16f 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -19,7 +19,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
- <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
+ <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
</ItemGroup>
diff --git a/MediaBrowser.Controller/Providers/IProviderManager.cs b/MediaBrowser.Controller/Providers/IProviderManager.cs
index 32a7951f62..7e0a69586c 100644
--- a/MediaBrowser.Controller/Providers/IProviderManager.cs
+++ b/MediaBrowser.Controller/Providers/IProviderManager.cs
@@ -216,7 +216,7 @@ namespace MediaBrowser.Controller.Providers
/// <returns>Task{HttpResponseInfo}.</returns>
Task<HttpResponseMessage> GetSearchImage(string providerName, string url, CancellationToken cancellationToken);
- Dictionary<Guid, Guid> GetRefreshQueue();
+ HashSet<Guid> GetRefreshQueue();
void OnRefreshStart(BaseItem item);