mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix recordings default action
This commit is contained in:
parent
63efbfc838
commit
674a50ac18
2 changed files with 28 additions and 1 deletions
|
@ -243,6 +243,33 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
||||||
else if (action == 'playmenu') {
|
else if (action == 'playmenu') {
|
||||||
showPlayMenu(card, target);
|
showPlayMenu(card, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (action == 'edit') {
|
||||||
|
getItem(target).then(function (item) {
|
||||||
|
editItem(item, serverId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function editItem(item, serverId) {
|
||||||
|
|
||||||
|
var apiClient = connectionManager.getApiClient(serverId);
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
if (item.Type == 'Timer') {
|
||||||
|
require(['recordingEditor'], function (recordingEditor) {
|
||||||
|
|
||||||
|
var serverId = apiClient.serverInfo().Id;
|
||||||
|
recordingEditor.show(item.Id, serverId).then(resolve, reject);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
require(['components/metadataeditor/metadataeditor'], function (metadataeditor) {
|
||||||
|
|
||||||
|
metadataeditor.show(item.Id).then(resolve, reject);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRecordCommand(serverId, id, type, timerId, seriesTimerId) {
|
function onRecordCommand(serverId, id, type, timerId, seriesTimerId) {
|
||||||
|
@ -322,6 +349,7 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClick(e) {
|
function onClick(e) {
|
||||||
|
|
||||||
var card = parentWithClass(e.target, 'itemAction');
|
var card = parentWithClass(e.target, 'itemAction');
|
||||||
|
|
||||||
if (card) {
|
if (card) {
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
showChannelName: true,
|
showChannelName: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
cardLayout: true,
|
cardLayout: true,
|
||||||
showDetailsMenu: true,
|
|
||||||
defaultAction: 'edit'
|
defaultAction: 'edit'
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue