mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-06 10:16:18 +00:00
update play media source feature
This commit is contained in:
@@ -109,6 +109,18 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
dict["StartPositionTicks"] = command.StartPositionTicks.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (command.AudioStreamIndex.HasValue)
|
||||
{
|
||||
dict["AudioStreamIndex"] = command.AudioStreamIndex.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (command.SubtitleStreamIndex.HasValue)
|
||||
{
|
||||
dict["SubtitleStreamIndex"] = command.SubtitleStreamIndex.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(command.MediaSourceId))
|
||||
{
|
||||
dict["MediaSourceId"] = command.MediaSourceId;
|
||||
}
|
||||
|
||||
return SendMessage(command.PlayCommand.ToString(), dict, cancellationToken);
|
||||
}
|
||||
|
||||
@@ -972,7 +972,6 @@ namespace Emby.Server.Implementations.Session
|
||||
if (command.PlayCommand == PlayCommand.PlayInstantMix)
|
||||
{
|
||||
items = command.ItemIds.SelectMany(i => TranslateItemForInstantMix(i, user))
|
||||
.Where(i => i.LocationType != LocationType.Virtual)
|
||||
.ToList();
|
||||
|
||||
command.PlayCommand = PlayCommand.PlayNow;
|
||||
@@ -986,9 +985,7 @@ namespace Emby.Server.Implementations.Session
|
||||
list.AddRange(subItems);
|
||||
}
|
||||
|
||||
items = list
|
||||
.Where(i => i.LocationType != LocationType.Virtual)
|
||||
.ToList();
|
||||
items = list;
|
||||
}
|
||||
|
||||
if (command.PlayCommand == PlayCommand.PlayShuffle)
|
||||
@@ -1074,7 +1071,8 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
ItemFields.SortName
|
||||
}
|
||||
}
|
||||
},
|
||||
IsVirtualItem = false
|
||||
});
|
||||
|
||||
return FilterToSingleMediaType(items)
|
||||
@@ -1097,7 +1095,8 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
ItemFields.SortName
|
||||
}
|
||||
}
|
||||
},
|
||||
IsVirtualItem = false
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user