mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5581 from jellyfin-web/release-10.9.z
Fix missing policy check for download all
Original-merge: bb9b4ce8bb
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
80abbb4574
commit
d6130751e8
1 changed files with 24 additions and 21 deletions
|
@ -169,12 +169,30 @@ export function getCommands(options) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type === 'Season' || item.Type == 'Series') {
|
if (appHost.supports('filedownload')) {
|
||||||
commands.push({
|
// CanDownload should probably be updated to return true for these items?
|
||||||
name: globalize.translate('DownloadAll'),
|
if (user.Policy.EnableContentDownloading && (item.Type === 'Season' || item.Type == 'Series')) {
|
||||||
id: 'downloadall',
|
commands.push({
|
||||||
icon: 'file_download'
|
name: globalize.translate('DownloadAll'),
|
||||||
});
|
id: 'downloadall',
|
||||||
|
icon: 'file_download'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Books are promoted to major download Button and therefor excluded in the context menu
|
||||||
|
if (item.CanDownload && item.Type !== 'Book') {
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('Download'),
|
||||||
|
id: 'download',
|
||||||
|
icon: 'file_download'
|
||||||
|
});
|
||||||
|
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('CopyStreamURL'),
|
||||||
|
id: 'copy-stream',
|
||||||
|
icon: 'content_copy'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CanDelete && options.deleteItem !== false) {
|
if (item.CanDelete && options.deleteItem !== false) {
|
||||||
|
@ -193,21 +211,6 @@ export function getCommands(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Books are promoted to major download Button and therefor excluded in the context menu
|
|
||||||
if ((item.CanDownload && appHost.supports('filedownload')) && item.Type !== 'Book') {
|
|
||||||
commands.push({
|
|
||||||
name: globalize.translate('Download'),
|
|
||||||
id: 'download',
|
|
||||||
icon: 'file_download'
|
|
||||||
});
|
|
||||||
|
|
||||||
commands.push({
|
|
||||||
name: globalize.translate('CopyStreamURL'),
|
|
||||||
id: 'copy-stream',
|
|
||||||
icon: 'content_copy'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (commands.length) {
|
if (commands.length) {
|
||||||
commands.push({
|
commands.push({
|
||||||
divider: true
|
divider: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue