mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 11:59:23 +01:00
18 lines
741 B
JavaScript
18 lines
741 B
JavaScript
const fs = require("fs");
|
|
const { feedUpdater } = require('./FeedUpdater')
|
|
const { filterFeed } = require('./FeedFilter')
|
|
global.log = require('simple-node-logger').createSimpleLogger({
|
|
logFilePath: 'jdrssdownloader.log',
|
|
timestampFormat: 'YYYY-MM-DD HH:mm:ss.SSS'
|
|
});
|
|
|
|
let RSSFeedRefreshMins = JSON.parse(fs.readFileSync('config.json')).RSSFeedRefreshMins
|
|
let JDPostLinksMins = JSON.parse(fs.readFileSync('config.json')).JDPostLinksMins
|
|
|
|
log.info('Refreshing RSS Items every ' + RSSFeedRefreshMins + ' Minutes')
|
|
log.info('Checking for links and sending to JDdownloader every ' + JDPostLinksMins + ' Minutes')
|
|
|
|
|
|
setInterval(feedUpdater, RSSFeedRefreshMins * 60000);
|
|
setInterval(filterFeed, JDPostLinksMins * 60000);
|