mirror of https://github.com/calzoneman/sync.git
Fixes
This commit is contained in:
parent
fa9656432d
commit
aad1c2995c
|
@ -13,6 +13,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
var Server = require("./server");
|
||||
var Poll = require("./poll.js").Poll;
|
||||
var Media = require("./media.js").Media;
|
||||
var Logger = require("./logger.js");
|
||||
|
@ -124,7 +125,7 @@ var Channel = function(name) {
|
|||
self.ipkey += "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[parseInt(Math.random() * 65)]
|
||||
}
|
||||
|
||||
Server.db.loadChannelData(self, function (err) {
|
||||
Server.getServer().db.loadChannelData(self, function (err) {
|
||||
if (err && err === "channel_dead")
|
||||
return;
|
||||
else if (!err || err === "channel_unregistered")
|
||||
|
|
|
@ -9,6 +9,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
const VERSION = "2.4.3";
|
||||
var singleton = null;
|
||||
|
||||
module.exports = {
|
||||
|
@ -43,9 +44,6 @@ var Channel = require("./channel");
|
|||
var User = require("./user");
|
||||
var $util = require("./utilities");
|
||||
|
||||
const VERSION = "2.4.3";
|
||||
|
||||
|
||||
var Server = function (cfg) {
|
||||
var self = this;
|
||||
|
||||
|
@ -68,10 +66,10 @@ var Server = function (cfg) {
|
|||
// database init ------------------------------------------------------
|
||||
var Database = require("./database");
|
||||
self.db = new Database(self.cfg);
|
||||
self.actionlog = require("./actionlog");
|
||||
|
||||
// webserver init -----------------------------------------------------
|
||||
self.httplog = new Logger.Logger(path.join(__dirname,
|
||||
"../httpaccess.log"));
|
||||
// webserver init -----------------------------------------------------
|
||||
self.express = express();
|
||||
self.express.use(express.bodyParser());
|
||||
|
||||
|
@ -162,10 +160,6 @@ var Server = function (cfg) {
|
|||
|
||||
// background tasks init ----------------------------------------------
|
||||
require("./bgtask")(self);
|
||||
|
||||
// media metadata retriever init --------------------------------------
|
||||
// TODO make the constructor just accept cfg?
|
||||
self.infogetter = require("./get-info");
|
||||
};
|
||||
|
||||
Server.prototype.getHTTPIP = function (req) {
|
||||
|
|
Loading…
Reference in New Issue