From 282a8358156638eb1fac6a089a52aab6bed88f63 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 19 Feb 2012 19:05:13 +0000 Subject: [PATCH] hook up download --- static/js/pandora/item.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index d5dc907e..5c7a7731 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -135,6 +135,7 @@ pandora.ui.item = function() { clickLink: pandora.clickLink, cuts: result.data.cuts || [], duration: result.data.duration, + enableDownload: pandora.site.capabilities.canDownloadVideo[pandora.user.level] >= result.data.rightslevel, enableSubtitles: pandora.user.ui.videoSubtitles, find: pandora.user.ui.itemFind, getTimelineImageURL: function(i) { @@ -176,6 +177,9 @@ pandora.ui.item = function() { annotationssort: function(data) { pandora.UI.set({annotationsSort: data.sort}); }, + downloadvideo: function(data) { + document.location.href = '/' + pandora.user.ui.item + '/torrent/'; + }, find: function(data) { pandora.UI.set('itemFind', data.find); },