mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Apply suggestions from review
This commit is contained in:
parent
d29a423475
commit
c5dae18034
@ -255,27 +255,18 @@ namespace Jellyfin.Api.Helpers
|
|||||||
streamInfo.PlaySessionId = playSessionId;
|
streamInfo.PlaySessionId = playSessionId;
|
||||||
streamInfo.StartPositionTicks = startTimeTicks;
|
streamInfo.StartPositionTicks = startTimeTicks;
|
||||||
|
|
||||||
if (mediaSource.SupportsDirectPlay)
|
|
||||||
{
|
|
||||||
mediaSource.SupportsDirectPlay = streamInfo.PlayMethod == PlayMethod.DirectPlay;
|
mediaSource.SupportsDirectPlay = streamInfo.PlayMethod == PlayMethod.DirectPlay;
|
||||||
}
|
|
||||||
|
|
||||||
// Players do not handle this being set according to PlayMethod
|
// Players do not handle this being set according to PlayMethod
|
||||||
if (mediaSource.SupportsDirectStream)
|
|
||||||
{
|
|
||||||
mediaSource.SupportsDirectStream =
|
mediaSource.SupportsDirectStream =
|
||||||
options.EnableDirectStream
|
options.EnableDirectStream
|
||||||
? streamInfo.PlayMethod == PlayMethod.DirectPlay || streamInfo.PlayMethod == PlayMethod.DirectStream
|
? streamInfo.PlayMethod == PlayMethod.DirectPlay || streamInfo.PlayMethod == PlayMethod.DirectStream
|
||||||
: streamInfo.PlayMethod == PlayMethod.DirectPlay;
|
: streamInfo.PlayMethod == PlayMethod.DirectPlay;
|
||||||
}
|
|
||||||
|
|
||||||
if (mediaSource.SupportsTranscoding)
|
|
||||||
{
|
|
||||||
mediaSource.SupportsTranscoding =
|
mediaSource.SupportsTranscoding =
|
||||||
streamInfo.PlayMethod == PlayMethod.DirectStream
|
streamInfo.PlayMethod == PlayMethod.DirectStream
|
||||||
|| mediaSource.TranscodingContainer != null
|
|| mediaSource.TranscodingContainer != null
|
||||||
|| profile.TranscodingProfiles.Any(i => i.Type == streamInfo.MediaType && i.Context == options.Context);
|
|| profile.TranscodingProfiles.Any(i => i.Type == streamInfo.MediaType && i.Context == options.Context);
|
||||||
}
|
|
||||||
|
|
||||||
if (item is Audio)
|
if (item is Audio)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user