mirror of https://github.com/jellyfin/jellyfin.git
Change to float? instead of double?
This commit is contained in:
parent
d7c5f12d09
commit
6d13c95e84
|
@ -64,7 +64,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
|||
/// <summary>
|
||||
/// The internal playback speed.
|
||||
/// </summary>
|
||||
private double? _playbackSpeed = 1.0;
|
||||
private float? _playbackSpeed = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Group" /> class.
|
||||
|
@ -146,10 +146,10 @@ namespace Emby.Server.Implementations.SyncPlay
|
|||
/// Gets or sets the playback speed.
|
||||
/// </summary>
|
||||
/// <value>The playback speed.</value>
|
||||
public double? PlaybackSpeed
|
||||
public float? PlaybackSpeed
|
||||
{
|
||||
get => _playbackSpeed;
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1, 10.0);
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1f, 10.0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Session
|
|||
/// </summary>
|
||||
public class PlaybackProgressInfo
|
||||
{
|
||||
private double? _playbackSpeed = 1.0;
|
||||
private float? _playbackSpeed = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can seek.
|
||||
|
@ -117,10 +117,10 @@ namespace MediaBrowser.Model.Session
|
|||
/// Gets or sets the playback speed.
|
||||
/// </summary>
|
||||
/// <value>The playback speed.</value>
|
||||
public double? PlaybackSpeed
|
||||
public float? PlaybackSpeed
|
||||
{
|
||||
get => _playbackSpeed;
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1, 10.0);
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Session
|
|||
{
|
||||
public class PlayerStateInfo
|
||||
{
|
||||
private double? _playbackSpeed = 1.0;
|
||||
private float? _playbackSpeed = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing position ticks.
|
||||
|
@ -79,10 +79,10 @@ namespace MediaBrowser.Model.Session
|
|||
/// Gets or sets the playback speed.
|
||||
/// </summary>
|
||||
/// <value>The playback speed.</value>
|
||||
public double? PlaybackSpeed
|
||||
public float? PlaybackSpeed
|
||||
{
|
||||
get => _playbackSpeed;
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1, 10.0);
|
||||
set => _playbackSpeed = value is null ? null : Math.Clamp(value.Value, 0.1f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Model.SyncPlay
|
|||
/// <param name="shuffleMode">The shuffle mode.</param>
|
||||
/// <param name="repeatMode">The repeat mode.</param>
|
||||
/// <param name="playbackSpeed">The playback speed.</param>
|
||||
public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList<QueueItem> playlist, int playingItemIndex, long startPositionTicks, bool isPlaying, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode, double? playbackSpeed)
|
||||
public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList<QueueItem> playlist, int playingItemIndex, long startPositionTicks, bool isPlaying, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode, float? playbackSpeed)
|
||||
{
|
||||
Reason = reason;
|
||||
LastUpdate = lastUpdate;
|
||||
|
@ -30,7 +30,7 @@ namespace MediaBrowser.Model.SyncPlay
|
|||
IsPlaying = isPlaying;
|
||||
ShuffleMode = shuffleMode;
|
||||
RepeatMode = repeatMode;
|
||||
PlaybackSpeed = playbackSpeed is null ? null : Math.Clamp(playbackSpeed.Value, 0.1, 10.0);
|
||||
PlaybackSpeed = playbackSpeed is null ? null : Math.Clamp(playbackSpeed.Value, 0.1f, 10.0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -85,6 +85,6 @@ namespace MediaBrowser.Model.SyncPlay
|
|||
/// Gets the PlaybackSpeed.
|
||||
/// </summary>
|
||||
/// <value>The playback speed.</value>
|
||||
public double? PlaybackSpeed { get; }
|
||||
public float? PlaybackSpeed { get; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue