mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public virtual bool EnableRememberingTrackSelections
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a studio to the item
|
/// Adds a studio to the item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -20,5 +20,7 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
/// <param name="userData">The user data.</param>
|
/// <param name="userData">The user data.</param>
|
||||||
/// <param name="user">The user.</param>
|
/// <param name="user">The user.</param>
|
||||||
void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user);
|
void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user);
|
||||||
|
|
||||||
|
bool EnableRememberingTrackSelections { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,15 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
set { }
|
set { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public override bool EnableRememberingTrackSelections
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the number.
|
/// Gets or sets the number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -269,13 +269,15 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
var userData = item == null ? new UserItemData() : _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
|
var userData = item == null ? new UserItemData() : _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
|
||||||
|
|
||||||
SetDefaultAudioStreamIndex(source, userData, user);
|
var allowRememberingSelection = item == null || item.EnableRememberingTrackSelections;
|
||||||
SetDefaultSubtitleStreamIndex(source, userData, user);
|
|
||||||
|
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;
|
var index = userData.SubtitleStreamIndex.Value;
|
||||||
// Make sure the saved index is still valid
|
// Make sure the saved index is still valid
|
||||||
@ -304,9 +306,9 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||||||
user.Configuration.SubtitleMode, audioLangage);
|
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;
|
var index = userData.AudioStreamIndex.Value;
|
||||||
// Make sure the saved index is still valid
|
// Make sure the saved index is still valid
|
||||||
|
Loading…
Reference in New Issue
Block a user