\r
updateInterval = 500;\r
\r
+function getURLParam( name )\r
+{\r
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");\r
+ var regexS = "[\\?&]"+name+"=([^&#]*)";\r
+ var regex = new RegExp( regexS );\r
+ var results = regex.exec( window.location.href );\r
+ if( results == null )\r
+ return "";\r
+ else\r
+ return results[1];\r
+}\r
+\r
function getPluginWidth()\r
{\r
return 800;\r
var tot_s = Math.floor(len / 1000 % 60);\r
var tot_min = Math.floor((len / 1000) / 60);\r
\r
+ if(isNaN(crt_s)) crt_s = 0;\r
+ if(isNaN(crt_min)) crt_min = 0;\r
+ if(isNaN(tot_s)) tot_s = 0;\r
+ if(isNaN(tot_min)) tot_min = 0;\r
+\r
$("#nsTime").html("" + pad(crt_min, 2) + ":" + pad(crt_s, 2)\r
+ " / " + pad(tot_min, 2) + ":" + pad(tot_s, 2));\r
}\r
timerHandle = setTimeout("update()", updateInterval);\r
}\r
\r
-function displayNextSharePC(torrent)\r
+function displayNextSharePC(torrent, html5)\r
{\r
+ if(html5 == true)\r
+ {\r
+ document.write('<video src="'+torrent+'" controls="controls" width="800" height="600">');\r
+ document.write(' Error: Your browser does not support HTML5!');\r
+ document.write('</video>');\r
+ document.write('<br /><br /><p><a href="' + window.location.href.replace('&html5=1', '') + '">');\r
+ document.write('Play video using VLC with NextSharePC</a></p>');\r
+\r
+ return true;\r
+ }\r
+\r
if (navigator.appName == "Netscape")\r
{\r
document.write('<embed type="application/x-ns-stream"');\r
+ '</table>');\r
\r
$("nsTable").css("width", getPluginWidth());\r
+\r
+ document.write('<br /><p><a href="' + window.location.href + '&html5=1">');\r
+ document.write('Play video using HTML5 with SwarmPlayer</a></p>');\r
+\r
+ return true;\r
}\r
\r
function onSliderStop(event, ui)\r
title = file.readline().strip()
if not Content.encodeAlias(title) in content_aliases:
- print '*'
# Database operations:
contentId = Content.getContentId(dbCur, category)
# Add entry in cms_content table
if thumbsDir != None:
# Configure thumbnail images
alias = content.content_alias
- basename = thumbsDir + "/" + torrent.rpartition('/')[2].rpartition('_')[0]
+ basename = thumbsDir + torrent.rpartition('/')[2].rpartition('_')[0]
##print 'basename: ' + basename + '; alias: ' + alias
os.system("./config_thumbnails.sh " + basename + " " + alias)