const moment = require('moment');
const PlayerDB = require('../../db/PlayerDB');
let db = new PlayerDB();
const Schedulesdb = require('../../db/schedulesDB');
const Announcesdb = require('../../db/announcesDB');
const SMGPush = require('../../push/SMGPush');
const Utils = require('../../utils/smgutils');
let utils = new Utils();
require('linqjs')



async function Main() {
    //await config
    let config = utils.readConfig();
    config.Settings.deviceID = 7787;
    global.deviceID = config.Settings.deviceID;
    global.url = config.Settings.downloadURL;

    await db.initsync();
    global.db = db;
    let schedulesdb = new Schedulesdb({ db, moment });
    let announcesdb = new Announcesdb({ db, moment });


    var schedulePlayer = require('./schedulePlayer')
    var sp = new schedulePlayer({db,moment,utils,schedulesdb,announcesdb})
}



Main()

setInterval(()=>{},500)