Add check that an item can be played before playing via default action
This commit is contained in:
parent
76d2b7018c
commit
481e62a6e0
1 changed files with 9 additions and 5 deletions
|
@ -204,11 +204,15 @@ import toast from './toast/toast';
|
|||
} else if (action === 'play' || action === 'resume') {
|
||||
const startPositionTicks = parseInt(card.getAttribute('data-positionticks') || '0');
|
||||
|
||||
if (playbackManager.canPlay(item)) {
|
||||
playbackManager.play({
|
||||
ids: [playableItemId],
|
||||
startPositionTicks: startPositionTicks,
|
||||
serverId: serverId
|
||||
});
|
||||
} else {
|
||||
console.warn('Unable to play item', item);
|
||||
}
|
||||
} else if (action === 'queue') {
|
||||
if (playbackManager.isPlaying()) {
|
||||
playbackManager.queue({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue