mirror of https://github.com/calzoneman/sync.git
Merge branch 'master' into dev
This commit is contained in:
commit
0611a6b0a6
14
get-info.js
14
get-info.js
|
@ -30,7 +30,12 @@ function getJSON(options, callback) {
|
|||
catch(e) {
|
||||
Logger.errlog.log("JSON fail: " + options.path);
|
||||
var m = buffer.match(/<internalReason>([^<]+)<\/internalReason>/);
|
||||
callback(m[1] || true, res.statusCode, null);
|
||||
if(m) {
|
||||
callback(m[1], res.statusCode, null);
|
||||
}
|
||||
else {
|
||||
callback(true, res.statusCode, null);
|
||||
}
|
||||
return;
|
||||
}
|
||||
callback(false, res.statusCode, data);
|
||||
|
@ -55,7 +60,12 @@ function getJSONHTTPS(options, callback) {
|
|||
catch(e) {
|
||||
Logger.errlog.log("JSON fail: " + options.path);
|
||||
var m = buffer.match(/<internalReason>([^<]+)<\/internalReason>/);
|
||||
callback(m[1] || true, res.statusCode, null);
|
||||
if(m) {
|
||||
callback(m[1], res.statusCode, null);
|
||||
}
|
||||
else {
|
||||
callback(true, res.statusCode, null);
|
||||
}
|
||||
return;
|
||||
}
|
||||
callback(false, res.statusCode, data);
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
<input type="text" id="channame" placeholder="Channel Name">
|
||||
<button class="btn" id="chanlog">Channel log</button>
|
||||
</div>
|
||||
<button class="btn" id="log_reverse">Reverse Log</button>
|
||||
</form>
|
||||
<pre id="log"></pre>
|
||||
</div>
|
||||
|
|
|
@ -123,6 +123,12 @@ $("#actionlog_time").click(function() {
|
|||
tableResort($("#actionlog table"), "time");
|
||||
});
|
||||
|
||||
function reverseLog() {
|
||||
$("#log").text($("#log").text().split("\n").reverse().join("\n"));
|
||||
}
|
||||
|
||||
$("#log_reverse").click(reverseLog);
|
||||
|
||||
function getSyslog() {
|
||||
$.ajax(WEB_URL+"/api/plain/readlog?type=sys&"+AUTH).done(function(data) {
|
||||
$("#log").text(data);
|
||||
|
|
|
@ -58,6 +58,7 @@ var Player = function(data) {
|
|||
this.nullPlayer();
|
||||
break;
|
||||
}
|
||||
this.load(data);
|
||||
}
|
||||
|
||||
Player.prototype.nullPlayer = function() {
|
||||
|
@ -114,19 +115,23 @@ Player.prototype.initYouTube = function() {
|
|||
}
|
||||
|
||||
this.pause = function() {
|
||||
this.player.pauseVideo();
|
||||
if(this.player.pauseVideo)
|
||||
this.player.pauseVideo();
|
||||
}
|
||||
|
||||
this.play = function() {
|
||||
this.player.playVideo();
|
||||
if(this.player.playVideo)
|
||||
this.player.playVideo();
|
||||
}
|
||||
|
||||
this.getTime = function(callback) {
|
||||
callback(this.player.getCurrentTime());
|
||||
if(this.player.getCurrentTime)
|
||||
callback(this.player.getCurrentTime());
|
||||
}
|
||||
|
||||
this.seek = function(time) {
|
||||
this.player.seekTo(time, true);
|
||||
if(this.player.seekTo)
|
||||
this.player.seekTo(time, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -190,6 +190,8 @@ $("#userpl_save").click(function() {
|
|||
var caret = btn.find(".caret").detach();
|
||||
btn.text($(select).text());
|
||||
caret.appendTo(btn);
|
||||
if(PLAYER.type == "yt" && PLAYER.player.setPlaybackQuality)
|
||||
PLAYER.player.setPlaybackQuality(VIDEOQUALITY);
|
||||
});
|
||||
}
|
||||
qualHandler("#quality_240p", "small");
|
||||
|
@ -199,6 +201,12 @@ $("#userpl_save").click(function() {
|
|||
qualHandler("#quality_1080p", "hd1080");
|
||||
})();
|
||||
|
||||
$("#mediarefresh").click(function() {
|
||||
PLAYER.type = "";
|
||||
PLAYER.id = "";
|
||||
socket.emit("playerReady");
|
||||
});
|
||||
|
||||
/* playlist controls */
|
||||
|
||||
$("#queue").sortable({
|
||||
|
|
|
@ -156,6 +156,7 @@
|
|||
<li><a id="quality_1080p" href="javascript:void(0)">1080p</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn btn-small" id="mediarefresh">Refresh Media</button>
|
||||
</div>
|
||||
<!-- electric boogaloo -->
|
||||
<div class="span12" id="queue_align2"></div>
|
||||
|
|
Loading…
Reference in New Issue