mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
fixes #592 - Add options to import missing and future episodes
This commit is contained in:
@@ -473,14 +473,17 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||
{
|
||||
var session = GetSessionForRemoteControl(sessionId);
|
||||
|
||||
var items = command.ItemIds.Select(i => _libraryManager.GetItemById(new Guid(i)))
|
||||
.ToList();
|
||||
|
||||
if (items.Any(i => i.LocationType == LocationType.Virtual))
|
||||
{
|
||||
throw new ArgumentException("Virtual items are not playable.");
|
||||
}
|
||||
|
||||
if (command.PlayCommand != PlayCommand.PlayNow)
|
||||
{
|
||||
if (command.ItemIds.Any(i =>
|
||||
{
|
||||
var item = _libraryManager.GetItemById(new Guid(i));
|
||||
|
||||
return !session.QueueableMediaTypes.Contains(item.MediaType, StringComparer.OrdinalIgnoreCase);
|
||||
}))
|
||||
if (items.Any(i => !session.QueueableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase)))
|
||||
{
|
||||
throw new ArgumentException(string.Format("Session {0} is unable to queue the requested media type.", session.Id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user