download button only if permission

This commit is contained in:
Sarab Singh 2020-05-02 00:57:51 +05:30
parent 96cfabeffe
commit 31f53d0855
3 changed files with 21 additions and 14 deletions

View File

@ -34,6 +34,7 @@
- [Ryan Hartzell](https://github.com/ryan-hartzell)
- [Thibault Nocchi](https://github.com/ThibaultNocchi)
- [MrTimscampi](https://github.com/MrTimscampi)
- [Sarab Singh](https://github.com/sarab97)
# Emby Contributors

View File

@ -21,19 +21,25 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
var index = options.startIndex || 0;
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
items: options.items,
startIndex: index,
interval: 11000,
interactive: true
var apiClient = connectionManager.currentApiClient();
apiClient.getCurrentUser().then(function(result){
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
items: options.items,
startIndex: index,
interval: 11000,
interactive: true,
user: result
});
newSlideShow.show();
resolve();
});
});
newSlideShow.show();
resolve();
});
});
};

View File

@ -167,9 +167,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
if (!actionButtonsOnTop) {
html += '<div class="slideshowBottomBar hide">';
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true, true);
if (appHost.supports('filedownload')) {
if (appHost.supports('filedownload') && options.user.Policy.EnableContentDownloading) {
html += getIcon('file_download', 'btnDownload slideshowButton', true);
}
if (appHost.supports('sharing')) {