Add stop playback option in mobile's layout context menu
This commit is contained in:
parent
21b17e8097
commit
737341934a
5 changed files with 18 additions and 13 deletions
|
@ -28,6 +28,14 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
|||
}
|
||||
}
|
||||
|
||||
if (playbackManager.getCurrentPlayer() !== null && options.stopPlayback) {
|
||||
commands.push({
|
||||
name: globalize.translate('StopPlayback'),
|
||||
id: 'stopPlayback',
|
||||
icon: 'stop'
|
||||
});
|
||||
}
|
||||
|
||||
if (playbackManager.canQueue(item)) {
|
||||
if (options.queue !== false) {
|
||||
commands.push({
|
||||
|
@ -44,13 +52,6 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
|||
icon: 'playlist_add'
|
||||
});
|
||||
}
|
||||
|
||||
//if (options.queueAllFromHere) {
|
||||
// commands.push({
|
||||
// name: globalize.translate("QueueAllFromHere"),
|
||||
// id: "queueallfromhere"
|
||||
// });
|
||||
//}
|
||||
}
|
||||
|
||||
if (item.IsFolder || item.Type === 'MusicArtist' || item.Type === 'MusicGenre') {
|
||||
|
@ -431,6 +432,9 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
|||
play(item, false, true, true);
|
||||
getResolveFunction(resolve, id)();
|
||||
break;
|
||||
case 'stopPlayback':
|
||||
playbackManager.stop();
|
||||
break;
|
||||
case 'record':
|
||||
require(['recordingCreator'], function (recordingCreator) {
|
||||
recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||
|
|
|
@ -3709,10 +3709,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return textStreamUrl;
|
||||
};
|
||||
|
||||
PlaybackManager.prototype.stop = function (player) {
|
||||
|
||||
player = player || this._currentPlayer;
|
||||
|
||||
PlaybackManager.prototype.stop = function (player = this._currentPlayer) {
|
||||
if (player) {
|
||||
|
||||
if (enableLocalPlaylistManagement(player)) {
|
||||
|
|
|
@ -185,9 +185,11 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
|||
if (autoFocusContextButton) {
|
||||
contextButton.focus();
|
||||
}
|
||||
let stopPlayback = false || layoutManager.mobile;
|
||||
var options = {
|
||||
play: false,
|
||||
queue: false,
|
||||
stopPlayback: stopPlayback,
|
||||
openAlbum: false,
|
||||
positionTo: contextButton
|
||||
};
|
||||
|
|
|
@ -1563,5 +1563,6 @@
|
|||
"EnableBlurhashHelp": "Images that are still being loaded will be displayed with a blurred placeholder",
|
||||
"ButtonSyncPlay": "SyncPlay",
|
||||
"ButtonCast": "Cast",
|
||||
"ButtonPlayer": "Player"
|
||||
"ButtonPlayer": "Player",
|
||||
"StopPlayback": "Stop playback"
|
||||
}
|
||||
|
|
|
@ -1573,5 +1573,6 @@
|
|||
"LabelRepositoryUrl": "URL del repositorio",
|
||||
"HeaderNewRepository": "Nuevo repositorio",
|
||||
"MessageNoRepositories": "Sin repositorios.",
|
||||
"Writers": "Escritores"
|
||||
"Writers": "Escritores",
|
||||
"StopPlayback": "Detener la reproducción"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue