mirror of
				https://github.com/karl0ss/JDRssDownloader.git
				synced 2025-11-04 00:21:00 +00: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 {
 | 
			
		||||
            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 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_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent'))
 | 
			
		||||
            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 { filterFeed } = require("./feed");
 | 
			
		||||
const lodash = require('lodash');
 | 
			
		||||
 | 
			
		||||
const log = require('simple-node-logger').createSimpleLogger('jdrssdownloader.log');
 | 
			
		||||
 | 
			
		||||
    (async function main() {
 | 
			
		||||
 | 
			
		||||
@ -25,7 +25,7 @@ const lodash = require('lodash');
 | 
			
		||||
        let updatedArray = lodash.unionBy(feed.items, items, 'title');
 | 
			
		||||
        
 | 
			
		||||
        // Save the file
 | 
			
		||||
        console.log(updatedArray.length)
 | 
			
		||||
        log.info(updatedArray.length + ' items in file cache')
 | 
			
		||||
        fs.writeFileSync(fileName, JSON.stringify(updatedArray));
 | 
			
		||||
 | 
			
		||||
        // run next part
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user