mirror of
https://github.com/jellyfin/jellyfin-chromecast.git
synced 2024-11-27 00:00:28 +00:00
Merge pull request #669 from 3flex/display-item-on-idle
Display content only if player is idle
This commit is contained in:
commit
1659262114
@ -83,7 +83,7 @@ export abstract class CommandHandler {
|
||||
}
|
||||
|
||||
static displayContentHandler(data: DataMessage): void {
|
||||
if (!PlaybackManager.isPlaying()) {
|
||||
if (PlaybackManager.isIdle()) {
|
||||
DocumentManager.showItemId((data.options as DisplayRequest).ItemId);
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,13 @@ export abstract class PlaybackManager {
|
||||
);
|
||||
}
|
||||
|
||||
static isIdle(): boolean {
|
||||
return (
|
||||
this.playerManager.getPlayerState() ===
|
||||
cast.framework.messages.PlayerState.IDLE
|
||||
);
|
||||
}
|
||||
|
||||
static async playFromOptions(options: PlayRequest): Promise<void> {
|
||||
const firstItem = options.items[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user