1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

updated translations

This commit is contained in:
Luke Pulverenti 2015-05-16 23:17:23 -04:00
parent 89e0515a15
commit 0a670a4635
15 changed files with 57 additions and 41 deletions

View file

@ -14,6 +14,15 @@
return String.fromCharCode.apply(null, new Uint16Array(buf));
}
function getResultCode(result) {
if (result != null && result.resultCode != null) {
return result.resultCode;
}
return result;
}
function findServersInternal(timeoutMs) {
var deferred = DeferredBuilder.Deferred();
@ -36,6 +45,8 @@
function startTimer() {
console.log('starting udp receive timer with timeout ms: ' + timeoutMs);
timeout = setTimeout(function () {
isTimedOut = true;
@ -83,9 +94,9 @@
console.log('chrome.sockets.udp.bind');
chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', port, function (result) {
chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function (result) {
if (result != 0) {
if (getResultCode(result) != 0) {
console.log('bind fail: ' + result);
deferred.resolveWith(null, [servers]);
chrome.sockets.udp.close(createInfo.socketId);
@ -97,7 +108,7 @@
console.log('chrome.sockets.udp.send');
chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (result) {
if (result != 0) {
if (getResultCode(result) != 0) {
console.log('send fail: ' + result);
deferred.resolveWith(null, [servers]);
chrome.sockets.udp.close(createInfo.socketId);