Notify the user after auto skipping an intro
This commit is contained in:
parent
b439afdfbe
commit
ea83a7ef2b
@ -149,17 +149,30 @@ public class AutoSkip : IServerEntryPoint
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify the user that an introduction is being skipped for them.
|
||||||
|
_sessionManager.SendMessageCommand(
|
||||||
|
session.Id,
|
||||||
|
session.Id,
|
||||||
|
new MessageCommand()
|
||||||
|
{
|
||||||
|
Text = "Automatically skipped intro",
|
||||||
|
TimeoutMs = 2000,
|
||||||
|
},
|
||||||
|
CancellationToken.None);
|
||||||
|
|
||||||
// Send the seek command
|
// Send the seek command
|
||||||
_logger.LogDebug("Sending seek command to {Session}", deviceId);
|
_logger.LogDebug("Sending seek command to {Session}", deviceId);
|
||||||
|
|
||||||
var seekCommand = new PlaystateRequest
|
_sessionManager.SendPlaystateCommand(
|
||||||
{
|
session.Id,
|
||||||
Command = PlaystateCommand.Seek,
|
session.Id,
|
||||||
ControllingUserId = session.UserId.ToString("N"),
|
new PlaystateRequest
|
||||||
SeekPositionTicks = (long)intro.IntroEnd * TimeSpan.TicksPerSecond,
|
{
|
||||||
};
|
Command = PlaystateCommand.Seek,
|
||||||
|
ControllingUserId = session.UserId.ToString("N"),
|
||||||
_sessionManager.SendPlaystateCommand(session.Id, session.Id, seekCommand, CancellationToken.None);
|
SeekPositionTicks = (long)intro.IntroEnd * TimeSpan.TicksPerSecond,
|
||||||
|
},
|
||||||
|
CancellationToken.None);
|
||||||
|
|
||||||
// Flag that we've sent the seek command so that it's not sent repeatedly
|
// Flag that we've sent the seek command so that it's not sent repeatedly
|
||||||
lock (_sentSeekCommandLock)
|
lock (_sentSeekCommandLock)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user