mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update selection buttons
This commit is contained in:
parent
b1be4939df
commit
7736bab314
@ -340,7 +340,7 @@ namespace MediaBrowser.Api
|
||||
// We can really reduce the timeout for apps that are using the newer api
|
||||
if (!string.IsNullOrWhiteSpace(job.PlaySessionId))
|
||||
{
|
||||
timerDuration = 120000;
|
||||
timerDuration = 300000;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (subtitleStream != null)
|
||||
{
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context);
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context, directPlay.Value);
|
||||
|
||||
playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method;
|
||||
playlistItem.SubtitleFormat = subtitleProfile.Format;
|
||||
@ -413,7 +413,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (subtitleStream != null)
|
||||
{
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context);
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context, PlayMethod.Transcode);
|
||||
|
||||
playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method;
|
||||
playlistItem.SubtitleFormat = subtitleProfile.Format;
|
||||
@ -711,7 +711,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (subtitleStream != null)
|
||||
{
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context);
|
||||
SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile.SubtitleProfiles, options.Context, playMethod);
|
||||
|
||||
if (subtitleProfile.Method != SubtitleDeliveryMethod.External && subtitleProfile.Method != SubtitleDeliveryMethod.Embed)
|
||||
{
|
||||
@ -723,8 +723,25 @@ namespace MediaBrowser.Model.Dlna
|
||||
return IsAudioEligibleForDirectPlay(item, maxBitrate);
|
||||
}
|
||||
|
||||
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, SubtitleProfile[] subtitleProfiles, EncodingContext context)
|
||||
public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, SubtitleProfile[] subtitleProfiles, EncodingContext context, PlayMethod playMethod)
|
||||
{
|
||||
if (playMethod != PlayMethod.Transcode)
|
||||
{
|
||||
// Look for supported embedded subs
|
||||
foreach (SubtitleProfile profile in subtitleProfiles)
|
||||
{
|
||||
if (!profile.SupportsLanguage(subtitleStream.Language))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (profile.Method == SubtitleDeliveryMethod.Embed && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
|
||||
{
|
||||
return profile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Look for an external profile that matches the stream type (text/graphical)
|
||||
foreach (SubtitleProfile profile in subtitleProfiles)
|
||||
{
|
||||
|
@ -329,7 +329,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
private SubtitleStreamInfo GetSubtitleStreamInfo(MediaStream stream, string baseUrl, string accessToken, long startPositionTicks, SubtitleProfile[] subtitleProfiles)
|
||||
{
|
||||
SubtitleProfile subtitleProfile = StreamBuilder.GetSubtitleProfile(stream, subtitleProfiles, Context);
|
||||
SubtitleProfile subtitleProfile = StreamBuilder.GetSubtitleProfile(stream, subtitleProfiles, Context, PlayMethod);
|
||||
SubtitleStreamInfo info = new SubtitleStreamInfo
|
||||
{
|
||||
IsForced = stream.IsForced,
|
||||
|
@ -256,7 +256,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||
NotificationType = type
|
||||
};
|
||||
|
||||
notification.Variables["ItemName"] = item.Name;
|
||||
if (e.Item != null)
|
||||
{
|
||||
notification.Variables["ItemName"] = GetItemName(e.Item);
|
||||
}
|
||||
else
|
||||
{
|
||||
notification.Variables["ItemName"] = item.Name;
|
||||
}
|
||||
|
||||
notification.Variables["UserName"] = user == null ? "Unknown user" : user.Name;
|
||||
notification.Variables["AppName"] = e.ClientName;
|
||||
notification.Variables["DeviceName"] = e.DeviceName;
|
||||
|
@ -1,13 +1,10 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Naming.Common;
|
||||
using MediaBrowser.Naming.Video;
|
||||
using MediaBrowser.Server.Implementations.Logging;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Server.Implementations.Logging;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||
{
|
||||
|
@ -1467,5 +1467,6 @@
|
||||
"HeaderDisplay": "Display",
|
||||
"HeaderNavigation": "Navigation",
|
||||
"LegendTheseSettingsShared": "These settings are shared on all devices",
|
||||
"OptionEnableAutomaticServerUpdates": "Enable automatic server updates"
|
||||
"OptionEnableAutomaticServerUpdates": "Enable automatic server updates",
|
||||
"OptionOtherTrailers": "Include trailers from older movies"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user