use direct download for private items. Torrents only work if item is public

This commit is contained in:
j 2013-11-18 09:52:44 +00:00
commit d74a264a6a
3 changed files with 12 additions and 6 deletions

View file

@ -928,8 +928,14 @@ pandora.getClipVideos = function(clip, resolution) {
};
}());
pandora.getDownloadLink = function(item) {
return '/' + item + (pandora.site.video.torrent ? '/torrent/' : '/download/');
pandora.getDownloadLink = function(item, rightslevel) {
console.log('pandora.getDownloadLink', item, rightslevel);
var torrent = pandora.site.video.torrent;
if (arguments.length == 2 && torrent &&
pandora.site.capabilities.canSeeItem.guest < rightslevel) {
torrent = false;
}
return '/' + item + (torrent ? '/torrent/' : '/download/');
}
pandora.getEditTooltip = function(title) {