mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add DisplayTitle to media streams
This commit is contained in:
parent
e54e1697fd
commit
5712b78c3e
9 changed files with 72 additions and 20 deletions
|
@ -18,6 +18,14 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
|||
});
|
||||
}
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
|
||||
commands.push({
|
||||
name: globalize.translate('Refresh'),
|
||||
id: 'refresh'
|
||||
});
|
||||
}
|
||||
|
||||
if (item.Type != 'Timer' && user.Policy.EnablePublicSharing && appHost.supports('sharing')) {
|
||||
commands.push({
|
||||
name: globalize.translate('Share'),
|
||||
|
@ -56,6 +64,11 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
|||
reject();
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
case 'refresh':
|
||||
{
|
||||
refresh(apiClient, itemId);
|
||||
break;
|
||||
}
|
||||
case 'share':
|
||||
|
@ -75,6 +88,23 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
|||
});
|
||||
}
|
||||
|
||||
function refresh(apiClient, itemId) {
|
||||
|
||||
apiClient.refreshItem(itemId, {
|
||||
|
||||
Recursive: true,
|
||||
ImageRefreshMode: 'FullRefresh',
|
||||
MetadataRefreshMode: 'FullRefresh',
|
||||
ReplaceAllImages: false,
|
||||
ReplaceAllMetadata: true
|
||||
|
||||
});
|
||||
|
||||
require(['toast'], function (toast) {
|
||||
toast(globalize.translate('sharedcomponents#RefreshQueued'));
|
||||
});
|
||||
}
|
||||
|
||||
function show(options) {
|
||||
|
||||
return getCommands(options).then(function (commands) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue