diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index 417464ec..cab51f1a 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -12,6 +12,11 @@ "annotations": { "showUsers": false }, + "cantPlay": { + "icon": "NoCopyright", + "link": "/rights", + "text": "This part of this video is not available in
your part of your country. Sorry for that." + }, /* Capabilities are per user level. They can either be general: diff --git a/static/js/pandora/editor.js b/static/js/pandora/editor.js index 8ebf0303..fba77bed 100644 --- a/static/js/pandora/editor.js +++ b/static/js/pandora/editor.js @@ -14,6 +14,8 @@ pandora.ui.editor = function(data) { annotationsSize: pandora.user.ui.annotationsSize, annotationsSort: pandora.user.ui.annotationsSort, censored: data.censored, + censoredIcon: pandora.site.cantPlay.icon, + censoredTooltip: pandora.site.cantPlay.text, clickLink: pandora.clickLink, cuts: data.cuts || [], duration: data.duration, @@ -106,6 +108,9 @@ pandora.ui.editor = function(data) { annotationssort: function(data) { pandora.UI.set({annotationsSort: data.sort}); }, + censored: function() { + pandora.URL.push(pandora.site.cantPlay.link); + }, define: function(data) { var dialog = data.type + 'sDialog'; pandora.$ui[dialog] && pandora.$ui[dialog].remove(); diff --git a/static/js/pandora/player.js b/static/js/pandora/player.js index 1166511d..0a9b019c 100644 --- a/static/js/pandora/player.js +++ b/static/js/pandora/player.js @@ -14,6 +14,8 @@ pandora.ui.player = function(data) { annotationsSize: pandora.user.ui.annotationsSize, annotationsSort: pandora.user.ui.annotationsSort, censored: data.censored, + censoredIcon: pandora.site.cantPlay.icon, + censoredTooltip: pandora.site.cantPlay.text, clickLink: pandora.clickLink, cuts: data.cuts || [], duration: data.duration, @@ -61,6 +63,12 @@ pandora.ui.player = function(data) { annotationssort: function(data) { pandora.UI.set({annotationsSort: data.sort}); }, + censored: function() { + pandora.$ui.player.options('fullscreen') && pandora.$ui.player.options({ + fullscreen: false + }); + pandora.URL.push(pandora.site.cantPlay.link); + }, downloadvideo: function(data) { document.location.href = '/' + pandora.user.ui.item + '/torrent/'; }, diff --git a/static/js/pandora/timeline.js b/static/js/pandora/timeline.js index 3006d3f2..383fba8d 100644 --- a/static/js/pandora/timeline.js +++ b/static/js/pandora/timeline.js @@ -14,6 +14,8 @@ pandora.ui.timeline = function(data) { annotationsSize: ui.annotationsSize, annotationsSort: ui.annotationsSort, censored: data.censored, + censoredIcon: pandora.site.cantPlay.icon, + censoredTooltip: pandora.site.cantPlay.text, clickLink: pandora.clickLink, cuts: data.cuts || [], duration: data.duration, @@ -59,6 +61,9 @@ pandora.ui.timeline = function(data) { annotationssort: function(data) { pandora.UI.set({annotationsSort: data.sort}); }, + censored: function() { + pandora.URL.push(pandora.site.cantPlay.link); + }, follow: function(data) { pandora.UI.set('followPlayer', data.follow); },