update selection buttons

pull/702/head
Luke Pulverenti 9 years ago
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 // We can really reduce the timeout for apps that are using the newer api
if (!string.IsNullOrWhiteSpace(job.PlaySessionId)) if (!string.IsNullOrWhiteSpace(job.PlaySessionId))
{ {
timerDuration = 120000; timerDuration = 300000;
} }
} }

@ -383,7 +383,7 @@ namespace MediaBrowser.Model.Dlna
if (subtitleStream != null) 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.SubtitleDeliveryMethod = subtitleProfile.Method;
playlistItem.SubtitleFormat = subtitleProfile.Format; playlistItem.SubtitleFormat = subtitleProfile.Format;
@ -413,7 +413,7 @@ namespace MediaBrowser.Model.Dlna
if (subtitleStream != null) 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.SubtitleDeliveryMethod = subtitleProfile.Method;
playlistItem.SubtitleFormat = subtitleProfile.Format; playlistItem.SubtitleFormat = subtitleProfile.Format;
@ -711,7 +711,7 @@ namespace MediaBrowser.Model.Dlna
{ {
if (subtitleStream != null) 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) if (subtitleProfile.Method != SubtitleDeliveryMethod.External && subtitleProfile.Method != SubtitleDeliveryMethod.Embed)
{ {
@ -723,8 +723,25 @@ namespace MediaBrowser.Model.Dlna
return IsAudioEligibleForDirectPlay(item, maxBitrate); 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) // Look for an external profile that matches the stream type (text/graphical)
foreach (SubtitleProfile profile in subtitleProfiles) 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) 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 SubtitleStreamInfo info = new SubtitleStreamInfo
{ {
IsForced = stream.IsForced, IsForced = stream.IsForced,

@ -256,7 +256,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
NotificationType = type 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["UserName"] = user == null ? "Unknown user" : user.Name;
notification.Variables["AppName"] = e.ClientName; notification.Variables["AppName"] = e.ClientName;
notification.Variables["DeviceName"] = e.DeviceName; notification.Variables["DeviceName"] = e.DeviceName;

@ -1,13 +1,10 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Naming.Common;
using MediaBrowser.Naming.Video; using MediaBrowser.Naming.Video;
using MediaBrowser.Server.Implementations.Logging;
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using MediaBrowser.Server.Implementations.Logging;
namespace MediaBrowser.Server.Implementations.Library.Resolvers namespace MediaBrowser.Server.Implementations.Library.Resolvers
{ {

@ -1467,5 +1467,6 @@
"HeaderDisplay": "Display", "HeaderDisplay": "Display",
"HeaderNavigation": "Navigation", "HeaderNavigation": "Navigation",
"LegendTheseSettingsShared": "These settings are shared on all devices", "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…
Cancel
Save