disable remember track selections for live channels
This commit is contained in:
parent
34b72a98cf
commit
92bdbe22b4
|
@ -1555,6 +1555,15 @@ namespace MediaBrowser.Controller.Entities
|
|||
return null;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public virtual bool EnableRememberingTrackSelections
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a studio to the item
|
||||
/// </summary>
|
||||
|
|
|
@ -20,5 +20,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user);
|
||||
|
||||
bool EnableRememberingTrackSelections { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,15 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
set { }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public override bool EnableRememberingTrackSelections
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number.
|
||||
/// </summary>
|
||||
|
|
|
@ -269,13 +269,15 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
{
|
||||
var userData = item == null ? new UserItemData() : _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
|
||||
|
||||
SetDefaultAudioStreamIndex(source, userData, user);
|
||||
SetDefaultSubtitleStreamIndex(source, userData, user);
|
||||
var allowRememberingSelection = item == null || item.EnableRememberingTrackSelections;
|
||||
|
||||
SetDefaultAudioStreamIndex(source, userData, user, allowRememberingSelection);
|
||||
SetDefaultSubtitleStreamIndex(source, userData, user, allowRememberingSelection);
|
||||
}
|
||||
|
||||
private void SetDefaultSubtitleStreamIndex(MediaSourceInfo source, UserItemData userData, User user)
|
||||
private void SetDefaultSubtitleStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
|
||||
{
|
||||
if (userData.SubtitleStreamIndex.HasValue && user.Configuration.RememberSubtitleSelections && user.Configuration.SubtitleMode != SubtitlePlaybackMode.None)
|
||||
if (userData.SubtitleStreamIndex.HasValue && user.Configuration.RememberSubtitleSelections && user.Configuration.SubtitleMode != SubtitlePlaybackMode.None && allowRememberingSelection)
|
||||
{
|
||||
var index = userData.SubtitleStreamIndex.Value;
|
||||
// Make sure the saved index is still valid
|
||||
|
@ -304,9 +306,9 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
user.Configuration.SubtitleMode, audioLangage);
|
||||
}
|
||||
|
||||
private void SetDefaultAudioStreamIndex(MediaSourceInfo source, UserItemData userData, User user)
|
||||
private void SetDefaultAudioStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
|
||||
{
|
||||
if (userData.AudioStreamIndex.HasValue && user.Configuration.RememberAudioSelections)
|
||||
if (userData.AudioStreamIndex.HasValue && user.Configuration.RememberAudioSelections && allowRememberingSelection)
|
||||
{
|
||||
var index = userData.AudioStreamIndex.Value;
|
||||
// Make sure the saved index is still valid
|
||||
|
|
Loading…
Reference in New Issue
Block a user