Add 'Clear Queue' option
This commit is contained in:
parent
737341934a
commit
08a995fe2c
7 changed files with 50 additions and 13 deletions
|
@ -28,12 +28,21 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
|||
}
|
||||
}
|
||||
|
||||
if (playbackManager.getCurrentPlayer() !== null && options.stopPlayback) {
|
||||
commands.push({
|
||||
name: globalize.translate('StopPlayback'),
|
||||
id: 'stopPlayback',
|
||||
icon: 'stop'
|
||||
});
|
||||
if (playbackManager.getCurrentPlayer() !== null) {
|
||||
if (options.stopPlayback) {
|
||||
commands.push({
|
||||
name: globalize.translate('StopPlayback'),
|
||||
id: 'stopPlayback',
|
||||
icon: 'stop'
|
||||
});
|
||||
}
|
||||
if (options.clearQueue) {
|
||||
commands.push({
|
||||
name: globalize.translate('ClearQueue'),
|
||||
id: 'clearQueue',
|
||||
icon: 'clear_all'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (playbackManager.canQueue(item)) {
|
||||
|
@ -435,6 +444,9 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
|||
case 'stopPlayback':
|
||||
playbackManager.stop();
|
||||
break;
|
||||
case 'clearQueue':
|
||||
playbackManager.clearQueue();
|
||||
break;
|
||||
case 'record':
|
||||
require(['recordingCreator'], function (recordingCreator) {
|
||||
recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue