mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-04 17:32:00 +01:00
fix refresh of tv recordings
This commit is contained in:
@@ -273,8 +273,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
{
|
||||
if (item.LocationType == LocationType.FileSystem)
|
||||
{
|
||||
return collections.Where(i => i.LocationType == LocationType.FileSystem &&
|
||||
i.PhysicalLocations.Contains(item.Path)).Cast<T>();
|
||||
return collections.Where(i => i.PhysicalLocations.Contains(item.Path)).Cast<T>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +282,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
{
|
||||
if (item.Id == user.RootFolder.Id)
|
||||
{
|
||||
return new T[] { item };
|
||||
return new[] { item };
|
||||
}
|
||||
|
||||
return new T[] { };
|
||||
|
||||
@@ -161,7 +161,6 @@ namespace MediaBrowser.Server.Implementations.IO
|
||||
.RootFolder
|
||||
.Children
|
||||
.OfType<Folder>()
|
||||
.Where(i => i.LocationType != LocationType.Remote && i.LocationType != LocationType.Virtual)
|
||||
.SelectMany(f => f.PhysicalLocations)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(i => i)
|
||||
|
||||
@@ -1399,22 +1399,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
.Distinct()
|
||||
.SelectMany(i => i.Children)
|
||||
.OfType<CollectionFolder>()
|
||||
.Where(i =>
|
||||
{
|
||||
var locationType = i.LocationType;
|
||||
|
||||
if (locationType == LocationType.Remote || locationType == LocationType.Virtual)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return i.PhysicalLocations.Contains(item.Path);
|
||||
})
|
||||
.Where(i => string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase) || i.PhysicalLocations.Contains(item.Path))
|
||||
.Select(i => i.CollectionType)
|
||||
.Where(i => !string.IsNullOrEmpty(i))
|
||||
.Distinct()
|
||||
|
||||
@@ -615,13 +615,9 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
}
|
||||
|
||||
var items = command.ItemIds.Select(i => _libraryManager.GetItemById(new Guid(i)))
|
||||
.Where(i => i.LocationType != LocationType.Virtual)
|
||||
.ToList();
|
||||
|
||||
if (items.Any(i => i.LocationType == LocationType.Virtual))
|
||||
{
|
||||
throw new ArgumentException("Virtual items are not playable.");
|
||||
}
|
||||
|
||||
if (command.PlayCommand != PlayCommand.PlayNow)
|
||||
{
|
||||
if (items.Any(i => !session.QueueableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase)))
|
||||
|
||||
Reference in New Issue
Block a user