/*
 * Copyright (c) Created by Can Kuşcu on 26/4/2018
 */

const moment = require('moment');
const PlayerDB = require('../PlayerDB');
const DM = require('../../downloader/DownloadManager').DownloadManager;
const dm = new DM();
let db = new PlayerDB();
global.db = db;
global.deviceID = 7787;
global.url = 'http://cdn.smg.com.tr/';
const schedules = require('../schedulesDB');
let sch = new schedules({db, moment});

main();
console.log('uyandi');
db.initsync()
async function main() {

    //let q = await ann.checkAnnouncesWithPriority();
    let q = await sch.checkDownloads();
    //let q3 = await ann.rawQuerryTest();
    console.log('bitti');

    // await q.forEach(obj => {
    //     //console.log(obj.FileName);
    //     dm.addFileToQue(obj.FileName);
    // });
}

//dm.start();