mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 20:03:40 +01:00
little updates to logging
This commit is contained in:
parent
a3987c67bb
commit
711b3412bc
2
feed.js
2
feed.js
@ -11,7 +11,7 @@ function filterFeed(fileName) {
|
|||||||
try {
|
try {
|
||||||
let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name))
|
let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name))
|
||||||
let extracted_urls_for_show = extractUrls(list_filtered_for_show[0]["content:encoded"]);
|
let extracted_urls_for_show = extractUrls(list_filtered_for_show[0]["content:encoded"]);
|
||||||
let urls_with_HEVC_in_url = extracted_urls_for_show.filter(item => item.includes('HEVC'))
|
let urls_with_HEVC_in_url = extracted_urls_for_show.filter(item => item.includes('HEVC') || item.includes('H265'))
|
||||||
let urls_with_quality_in_url = urls_with_HEVC_in_url.filter(item => item.includes(show.Quality))
|
let urls_with_quality_in_url = urls_with_HEVC_in_url.filter(item => item.includes(show.Quality))
|
||||||
let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent'))
|
let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent'))
|
||||||
log.info(show.Name + ' - ' + urls_without_torrent_in_url)
|
log.info(show.Name + ' - ' + urls_without_torrent_in_url)
|
||||||
|
4
main.js
4
main.js
@ -3,7 +3,7 @@ const fs = require("fs");
|
|||||||
const Parser = require("rss-parser");
|
const Parser = require("rss-parser");
|
||||||
const { filterFeed } = require("./feed");
|
const { filterFeed } = require("./feed");
|
||||||
const lodash = require('lodash');
|
const lodash = require('lodash');
|
||||||
|
const log = require('simple-node-logger').createSimpleLogger('jdrssdownloader.log');
|
||||||
|
|
||||||
(async function main() {
|
(async function main() {
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ const lodash = require('lodash');
|
|||||||
let updatedArray = lodash.unionBy(feed.items, items, 'title');
|
let updatedArray = lodash.unionBy(feed.items, items, 'title');
|
||||||
|
|
||||||
// Save the file
|
// Save the file
|
||||||
console.log(updatedArray.length)
|
log.info(updatedArray.length + ' items in file cache')
|
||||||
fs.writeFileSync(fileName, JSON.stringify(updatedArray));
|
fs.writeFileSync(fileName, JSON.stringify(updatedArray));
|
||||||
|
|
||||||
// run next part
|
// run next part
|
||||||
|
Loading…
x
Reference in New Issue
Block a user