mirror of https://github.com/jellyfin/jellyfin.git
Clamp PlaybackSpeed values instead of erroring
This commit is contained in:
parent
bb840a2e70
commit
750feaf693
|
@ -126,9 +126,13 @@ namespace MediaBrowser.Model.Session
|
|||
|
||||
set
|
||||
{
|
||||
if (value > 10 || value < 0.1)
|
||||
if (value > 10)
|
||||
{
|
||||
throw new InvalidOperationException("PlaybackSpeed must be between 0.1 and 10.0");
|
||||
_playbackSpeed = 10;
|
||||
}
|
||||
else if (value < 0.1)
|
||||
{
|
||||
_playbackSpeed = 0.1;
|
||||
}
|
||||
|
||||
_playbackSpeed = value;
|
||||
|
|
|
@ -88,9 +88,13 @@ namespace MediaBrowser.Model.Session
|
|||
|
||||
set
|
||||
{
|
||||
if (value > 10 || value < 0.1)
|
||||
if (value > 10)
|
||||
{
|
||||
throw new InvalidOperationException("PlaybackSpeed must be between 0.1 and 10.0");
|
||||
_playbackSpeed = 10;
|
||||
}
|
||||
else if (value < 0.1)
|
||||
{
|
||||
_playbackSpeed = 0.1;
|
||||
}
|
||||
|
||||
_playbackSpeed = value;
|
||||
|
|
Loading…
Reference in New Issue