mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
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 (playbackManager.canQueue(item)) {
|
||||||
if (options.queue !== false) {
|
if (options.queue !== false) {
|
||||||
commands.push({
|
commands.push({
|
||||||
|
@ -44,13 +52,6 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||||
icon: 'playlist_add'
|
icon: 'playlist_add'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (options.queueAllFromHere) {
|
|
||||||
// commands.push({
|
|
||||||
// name: globalize.translate("QueueAllFromHere"),
|
|
||||||
// id: "queueallfromhere"
|
|
||||||
// });
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.IsFolder || item.Type === 'MusicArtist' || item.Type === 'MusicGenre') {
|
if (item.IsFolder || item.Type === 'MusicArtist' || item.Type === 'MusicGenre') {
|
||||||
|
@ -431,6 +432,9 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||||
play(item, false, true, true);
|
play(item, false, true, true);
|
||||||
getResolveFunction(resolve, id)();
|
getResolveFunction(resolve, id)();
|
||||||
break;
|
break;
|
||||||
|
case 'stopPlayback':
|
||||||
|
playbackManager.stop();
|
||||||
|
break;
|
||||||
case 'record':
|
case 'record':
|
||||||
require(['recordingCreator'], function (recordingCreator) {
|
require(['recordingCreator'], function (recordingCreator) {
|
||||||
recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
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;
|
return textStreamUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
PlaybackManager.prototype.stop = function (player) {
|
PlaybackManager.prototype.stop = function (player = this._currentPlayer) {
|
||||||
|
|
||||||
player = player || this._currentPlayer;
|
|
||||||
|
|
||||||
if (player) {
|
if (player) {
|
||||||
|
|
||||||
if (enableLocalPlaylistManagement(player)) {
|
if (enableLocalPlaylistManagement(player)) {
|
||||||
|
|
|
@ -185,9 +185,11 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||||
if (autoFocusContextButton) {
|
if (autoFocusContextButton) {
|
||||||
contextButton.focus();
|
contextButton.focus();
|
||||||
}
|
}
|
||||||
|
let stopPlayback = false || layoutManager.mobile;
|
||||||
var options = {
|
var options = {
|
||||||
play: false,
|
play: false,
|
||||||
queue: false,
|
queue: false,
|
||||||
|
stopPlayback: stopPlayback,
|
||||||
openAlbum: false,
|
openAlbum: false,
|
||||||
positionTo: contextButton
|
positionTo: contextButton
|
||||||
};
|
};
|
||||||
|
|
|
@ -1563,5 +1563,6 @@
|
||||||
"EnableBlurhashHelp": "Images that are still being loaded will be displayed with a blurred placeholder",
|
"EnableBlurhashHelp": "Images that are still being loaded will be displayed with a blurred placeholder",
|
||||||
"ButtonSyncPlay": "SyncPlay",
|
"ButtonSyncPlay": "SyncPlay",
|
||||||
"ButtonCast": "Cast",
|
"ButtonCast": "Cast",
|
||||||
"ButtonPlayer": "Player"
|
"ButtonPlayer": "Player",
|
||||||
|
"StopPlayback": "Stop playback"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1573,5 +1573,6 @@
|
||||||
"LabelRepositoryUrl": "URL del repositorio",
|
"LabelRepositoryUrl": "URL del repositorio",
|
||||||
"HeaderNewRepository": "Nuevo repositorio",
|
"HeaderNewRepository": "Nuevo repositorio",
|
||||||
"MessageNoRepositories": "Sin repositorios.",
|
"MessageNoRepositories": "Sin repositorios.",
|
||||||
"Writers": "Escritores"
|
"Writers": "Escritores",
|
||||||
|
"StopPlayback": "Detener la reproducción"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue