mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 11:59:23 +01:00
quick config.json check
This commit is contained in:
parent
77f2029615
commit
25ed5af433
@ -9,14 +9,16 @@ global.log = require('simple-node-logger').createSimpleLogger({
|
||||
});
|
||||
|
||||
async function main() {
|
||||
let RSSFeedRefreshMins = JSON.parse(fs.readFileSync('config.json')).RSSFeedRefreshMins
|
||||
let JDPostLinksMins = JSON.parse(fs.readFileSync('config.json')).JDPostLinksMins
|
||||
|
||||
log.info('Running JDRssDownloader version ' + version)
|
||||
try {
|
||||
RSSFeedRefreshMins = JSON.parse(fs.readFileSync('config.json')).RSSFeedRefreshMins
|
||||
JDPostLinksMins = JSON.parse(fs.readFileSync('config.json')).JDPostLinksMins
|
||||
} catch (error) {
|
||||
log.error('config.json file is missing.')
|
||||
}
|
||||
log.info('Refreshing RSS Items every ' + RSSFeedRefreshMins + ' Minutes')
|
||||
log.info('Checking for links and sending to JDdownloader every ' + JDPostLinksMins + ' Minutes')
|
||||
|
||||
|
||||
setInterval(await feedUpdater, RSSFeedRefreshMins * 60000);
|
||||
setInterval(await filterFeed, JDPostLinksMins * 60000);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user