add option to have direct download instead of torrent
This commit is contained in:
parent
d8fff463de
commit
f3c9d7b7af
9 changed files with 42 additions and 3 deletions
|
|
@ -127,7 +127,7 @@ pandora.ui.editor = function(data) {
|
|||
pandora.$ui[dialog] = pandora.ui[dialog](data).open();
|
||||
},
|
||||
downloadvideo: function(data) {
|
||||
document.location.href = '/' + ui.item + '/torrent/';
|
||||
document.location.href = pandora.getDownloadLink(ui.item);
|
||||
},
|
||||
downloadselection: function(data) {
|
||||
document.location.href = '/' + ui.item
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ pandora.ui.player = function(data) {
|
|||
}), 'clip');
|
||||
},
|
||||
downloadvideo: function(data) {
|
||||
document.location.href = '/' + ui.item + '/torrent/';
|
||||
document.location.href = pandora.getDownloadLink(ui.item);
|
||||
},
|
||||
find: function(data) {
|
||||
pandora.UI.set({itemFind: data.find});
|
||||
|
|
|
|||
|
|
@ -928,6 +928,9 @@ pandora.getClipVideos = function(clip, resolution) {
|
|||
};
|
||||
}());
|
||||
|
||||
pandora.getDownloadLink = function(item) {
|
||||
return '/' + item + (pandora.site.video.torrent ? '/torrent/' : '/download/');
|
||||
}
|
||||
|
||||
pandora.getEditTooltip = function(title) {
|
||||
return function(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue