mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update subtitle editor
This commit is contained in:
parent
6697f8685d
commit
5361e0d2a5
18 changed files with 446 additions and 406 deletions
|
@ -32,6 +32,15 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper'], function (ap
|
|||
});
|
||||
}
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program' && item.LocationType != 'Virtual') {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#EditSubtitles'),
|
||||
id: 'editsubtitles'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (item.CanDownload && appHost.supports('filedownload')) {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Download'),
|
||||
|
@ -109,6 +118,15 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper'], function (ap
|
|||
reject();
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
case 'editsubtitles':
|
||||
{
|
||||
require(['subtitleEditor'], function (subtitleEditor) {
|
||||
|
||||
var serverId = apiClient.serverInfo().Id;
|
||||
subtitleEditor.show(itemId, serverId).then(resolve, reject);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'refresh':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue