From 3bd2754b3ad157b7d479ef41fe4e3045f256bf73 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 12 Jun 2022 16:34:37 +0100 Subject: [PATCH 1/9] onlyHEVC flag and more URL checking --- FeedFilter.js | 117 +++++++++++++++++++++++++++++++-------------- checkFileName.js | 12 +++++ config-sample.json | 1 + 3 files changed, 93 insertions(+), 37 deletions(-) create mode 100644 checkFileName.js diff --git a/FeedFilter.js b/FeedFilter.js index 6a4b1c5..3ca045c 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -1,52 +1,95 @@ const fs = require('fs') const { linkAdder } = require('./JDLinkAdder'); const { getLinksFromURL } = require('./LinkGrabber') +const { checkFileName } = require('./checkFileName') async function filterFeed() { let myshowlist = JSON.parse(fs.readFileSync('config.json')).Shows + let hevcSwitch = JSON.parse(fs.readFileSync('config.json')).OnlyHEVC let feed = JSON.parse(fs.readFileSync('./feedCache.json')); - myshowlist.forEach(async show => { - try { - // Find show on feed - let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) - if (list_filtered_for_show.length > 0) { - // If show is found get url then return all links on that page - let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) - // Only get urls with HEVC in name - let urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('HEVC')) - if (urls_with_HEVC_in_url.length == 0) { - // If no urls with HEVC check for H265 - urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('H265')) - } - // Only keep urls that match show quality - let urls_with_quality_in_url = urls_with_HEVC_in_url.filter(item => item.includes(show.Quality)) - // Remove any url trying to direct to a torrent site search - let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) - // Remove any url that doesn't include MeGusta - let only_MeGusta_links = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) - // NitroFlare doesn't group with the rest of the links in JD, remove them. - let remove_nitroflare = only_MeGusta_links.filter(item => !item.includes('nitro')) - // Send Links to JDdownloader - if (remove_nitroflare.length !== 0) { - log.info(remove_nitroflare.length + ' links for ' + show.Name + ' have been sent to JDdownloader') - linkAdder(remove_nitroflare) + + if (hevcSwitch) { + myshowlist.forEach(async show => { + try { + // Find show on feed + let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) + if (list_filtered_for_show.length > 0) { + // If show is found get url then return all links on that page + let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) + // Only get urls with HEVC in name + let urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('HEVC')) + if (urls_with_HEVC_in_url.length == 0) { + // If no urls with HEVC check for H265 + urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('H265')) + } + // Only keep urls that match show quality + let urls_with_quality_in_url = urls_with_HEVC_in_url.filter(item => item.includes(show.Quality)) + // Remove any url trying to direct to a torrent site search + let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) + // Remove any url that doesn't include MeGusta + let only_MeGusta_links = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) + // NitroFlare doesn't group with the rest of the links in JD, remove them. + let remove_nitroflare = only_MeGusta_links.filter(item => !item.includes('nitro')) + // Do some stuff + let download_list = checkFileName(remove_nitroflare) + // Send Links to JDdownloader + if (download_list.length !== 0) { + log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') + linkAdder(download_list) + } else { + // No HEVC links found + log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found') + } + } else { - // No HEVC links found - log.info(remove_nitroflare.length + ' HEVC links for ' + show.Name + ' have been found') + // Show not found on the current feed cache + log.info(show.Name + ' not on feed') } - - } else { - // Show not found on the current feed cache - log.info(show.Name + ' not on feed') + } catch (error) { + log.error('Something went wrong ' + error) } - } catch (error) { - log.error('Something went wrong ' + error) - } - }) - // log.info('Wiping feed cache') - // fs.writeFileSync(global.fileName, JSON.stringify('[]')); + }) + } else { + myshowlist.forEach(async show => { + try { + // Find show on feed + let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) + if (list_filtered_for_show.length > 0) { + // If show is found get url then return all links on that page + let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) + // Only keep urls that match show quality + let urls_with_quality_in_url = full_link_list_from_page.filter(item => item.includes(show.Quality)) + // Remove any url trying to direct to a torrent site search + let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) + // NitroFlare doesn't group with the rest of the links in JD, remove them. + let remove_nitroflare = urls_without_torrent_in_url.filter(item => !item.includes('nitro')) + // Do some stuff + let download_list = checkFileName(remove_nitroflare) + // Send Links to JDdownloader + if (download_list.length !== 0) { + log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') + linkAdder(download_list) + } else { + // No links found + log.info(download_list.length + ' links for ' + show.Name + ' have been found') + } + + } else { + // Show not found on the current feed cache + log.info(show.Name + ' not on feed') + } + } catch (error) { + log.error('Something went wrong ' + error) + } + + }) + } + + // + log.info('Wiping feed cache') + fs.writeFileSync('./feedCache.json', JSON.stringify('[]')); } module.exports = { diff --git a/checkFileName.js b/checkFileName.js new file mode 100644 index 0000000..03a6a31 --- /dev/null +++ b/checkFileName.js @@ -0,0 +1,12 @@ +function checkFileName(urls) { + let urlList = [] + urls.forEach(url => { + let cut = url.match(/([^\/]*$)/mg); + if (cut[0] !== '') { + urlList.push(url) + } + }); + return urlList +} + +module.exports = { checkFileName } \ No newline at end of file diff --git a/config-sample.json b/config-sample.json index 574f704..170f592 100644 --- a/config-sample.json +++ b/config-sample.json @@ -5,6 +5,7 @@ "RSSFeedRefreshMins": 10, "JDPostLinksMins": 180, "Autostart": false, + "OnlyHEVC": true, "Shows": [ { "Name": "", From 26658fdf8ae190816dd452083e3f7481b78b0547 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 12 Jun 2022 20:11:50 +0100 Subject: [PATCH 2/9] upversion --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb8b31e..e280cdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jdrssdownloader", - "version": "1.0.0", + "version": "1.0.1", "description": "", "main": "JDRssDownloader.js", "bin": "JDRssDownloader.js", From 0bbd83f3752c41f7415e914564cdc09d309e47f6 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Wed, 15 Jun 2022 18:26:59 +0100 Subject: [PATCH 3/9] working link deletion --- FeedFilter.js | 27 ++++++++++++++------------- JDRssDownloader.js | 16 ++++++++++------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/FeedFilter.js b/FeedFilter.js index 3ca045c..151da3e 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -7,10 +7,11 @@ async function filterFeed() { let myshowlist = JSON.parse(fs.readFileSync('config.json')).Shows let hevcSwitch = JSON.parse(fs.readFileSync('config.json')).OnlyHEVC let feed = JSON.parse(fs.readFileSync('./feedCache.json')); + let retry_show_cache = [] if (hevcSwitch) { - myshowlist.forEach(async show => { + for (let show of myshowlist) { try { // Find show on feed let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) @@ -39,9 +40,11 @@ async function filterFeed() { linkAdder(download_list) } else { // No HEVC links found - log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found') + log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found, will recheck next time.') + for (let feed_item of list_filtered_for_show) { + retry_show_cache.push(feed_item) + } } - } else { // Show not found on the current feed cache log.info(show.Name + ' not on feed') @@ -49,10 +52,9 @@ async function filterFeed() { } catch (error) { log.error('Something went wrong ' + error) } - - }) + } } else { - myshowlist.forEach(async show => { + for (let show of myshowlist) { try { // Find show on feed let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) @@ -73,9 +75,11 @@ async function filterFeed() { linkAdder(download_list) } else { // No links found - log.info(download_list.length + ' links for ' + show.Name + ' have been found') + log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found, will recheck next time.') + for (let feed_item of list_filtered_for_show) { + retry_show_cache.push(feed_item) + } } - } else { // Show not found on the current feed cache log.info(show.Name + ' not on feed') @@ -83,13 +87,10 @@ async function filterFeed() { } catch (error) { log.error('Something went wrong ' + error) } - - }) + } } - - // log.info('Wiping feed cache') - fs.writeFileSync('./feedCache.json', JSON.stringify('[]')); + fs.writeFileSync('./feedCache.json', JSON.stringify(retry_show_cache)); } module.exports = { diff --git a/JDRssDownloader.js b/JDRssDownloader.js index 7aec98f..d3102d8 100644 --- a/JDRssDownloader.js +++ b/JDRssDownloader.js @@ -6,12 +6,16 @@ global.log = require('simple-node-logger').createSimpleLogger({ 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 +async function main() { + 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') + 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); + setInterval(await feedUpdater, RSSFeedRefreshMins * 60000); + setInterval(await filterFeed, JDPostLinksMins * 60000); +} + +main() \ No newline at end of file From 41392b0da7bc163b40a6a61b4ffb896c32dc63d0 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Thu, 16 Jun 2022 07:41:15 +0100 Subject: [PATCH 4/9] new code for hevcswitch --- FeedFilter.js | 106 +++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 67 deletions(-) diff --git a/FeedFilter.js b/FeedFilter.js index 151da3e..b106d11 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -10,83 +10,55 @@ async function filterFeed() { let retry_show_cache = [] - if (hevcSwitch) { - for (let show of myshowlist) { - try { - // Find show on feed - let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) - if (list_filtered_for_show.length > 0) { - // If show is found get url then return all links on that page - let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) + for (let show of myshowlist) { + + try { + // Find show on feed + let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) + if (list_filtered_for_show.length > 0) { + // If show is found get url then return all links on that page + let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) + if (hevcSwitch) { // Only get urls with HEVC in name let urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('HEVC')) if (urls_with_HEVC_in_url.length == 0) { // If no urls with HEVC check for H265 - urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('H265')) - } - // Only keep urls that match show quality - let urls_with_quality_in_url = urls_with_HEVC_in_url.filter(item => item.includes(show.Quality)) - // Remove any url trying to direct to a torrent site search - let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) - // Remove any url that doesn't include MeGusta - let only_MeGusta_links = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) - // NitroFlare doesn't group with the rest of the links in JD, remove them. - let remove_nitroflare = only_MeGusta_links.filter(item => !item.includes('nitro')) - // Do some stuff - let download_list = checkFileName(remove_nitroflare) - // Send Links to JDdownloader - if (download_list.length !== 0) { - log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') - linkAdder(download_list) - } else { - // No HEVC links found - log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found, will recheck next time.') - for (let feed_item of list_filtered_for_show) { - retry_show_cache.push(feed_item) - } + urls_to_check = full_link_list_from_page.filter(item => item.includes('H265')) } } else { - // Show not found on the current feed cache - log.info(show.Name + ' not on feed') + urls_to_check = full_link_list_from_page } - } catch (error) { - log.error('Something went wrong ' + error) - } - } - } else { - for (let show of myshowlist) { - try { - // Find show on feed - let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) - if (list_filtered_for_show.length > 0) { - // If show is found get url then return all links on that page - let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) - // Only keep urls that match show quality - let urls_with_quality_in_url = full_link_list_from_page.filter(item => item.includes(show.Quality)) - // Remove any url trying to direct to a torrent site search - let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) - // NitroFlare doesn't group with the rest of the links in JD, remove them. - let remove_nitroflare = urls_without_torrent_in_url.filter(item => !item.includes('nitro')) - // Do some stuff - let download_list = checkFileName(remove_nitroflare) - // Send Links to JDdownloader - if (download_list.length !== 0) { - log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') - linkAdder(download_list) - } else { - // No links found - log.info(download_list.length + ' HEVC links for ' + show.Name + ' have been found, will recheck next time.') - for (let feed_item of list_filtered_for_show) { - retry_show_cache.push(feed_item) - } - } + // Only keep urls that match show quality + let urls_with_quality_in_url = urls_to_check.filter(item => item.includes(show.Quality)) + // Remove any url trying to direct to a torrent site search + let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) + // Remove any url that doesn't include MeGusta + if (hevcSwitch) { + pre_nitroFlare = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) } else { - // Show not found on the current feed cache - log.info(show.Name + ' not on feed') + pre_nitroFlare = urls_without_torrent_in_url } - } catch (error) { - log.error('Something went wrong ' + error) + // NitroFlare doesn't group with the rest of the links in JD, remove them. + let remove_nitroflare = pre_nitroFlare.filter(item => !item.includes('nitro')) + // Do some stuff + let download_list = checkFileName(remove_nitroflare) + // Send Links to JDdownloader + if (download_list.length !== 0) { + log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') + linkAdder(download_list) + } else { + // No HEVC links found + log.info(download_list.length + ' links for ' + show.Name + ' have been found, will recheck next time.') + for (let feed_item of list_filtered_for_show) { + retry_show_cache.push(feed_item) + } + } + } else { + // Show not found on the current feed cache + log.info(show.Name + ' not on feed') } + } catch (error) { + log.error('Something went wrong ' + error) } } log.info('Wiping feed cache') From 4a0460aea3a86f022ebdf9a40aec94dc08da3bea Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Thu, 16 Jun 2022 11:17:56 +0100 Subject: [PATCH 5/9] undefined --- FeedFilter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/FeedFilter.js b/FeedFilter.js index b106d11..7aaa5da 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -8,6 +8,7 @@ async function filterFeed() { let hevcSwitch = JSON.parse(fs.readFileSync('config.json')).OnlyHEVC let feed = JSON.parse(fs.readFileSync('./feedCache.json')); let retry_show_cache = [] + let urls_to_check = [] for (let show of myshowlist) { From 2df901b47e0e089bc62b3cfbf41bec8bf7243da6 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Thu, 16 Jun 2022 12:30:55 +0100 Subject: [PATCH 6/9] working logic fix --- FeedFilter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FeedFilter.js b/FeedFilter.js index 7aaa5da..d2e7db8 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -21,8 +21,8 @@ async function filterFeed() { let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) if (hevcSwitch) { // Only get urls with HEVC in name - let urls_with_HEVC_in_url = full_link_list_from_page.filter(item => item.includes('HEVC')) - if (urls_with_HEVC_in_url.length == 0) { + urls_to_check = full_link_list_from_page.filter(item => item.includes('HEVC')) + if (urls_to_check.length == 0) { // If no urls with HEVC check for H265 urls_to_check = full_link_list_from_page.filter(item => item.includes('H265')) } From a2f3a9ee69ed557180255db48d13cdc10754b6af Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sat, 18 Jun 2022 10:07:51 +0100 Subject: [PATCH 7/9] split files names out for logs --- checkFileName.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/checkFileName.js b/checkFileName.js index 03a6a31..adb89b0 100644 --- a/checkFileName.js +++ b/checkFileName.js @@ -1,12 +1,16 @@ function checkFileName(urls) { - let urlList = [] + let urlObj = { + "fileName": "", + "urlList": [] + } urls.forEach(url => { let cut = url.match(/([^\/]*$)/mg); if (cut[0] !== '') { - urlList.push(url) + urlObj.fileName = cut[0].replace('.html', '') + urlObj.urlList.push(url) } }); - return urlList + return urlObj } module.exports = { checkFileName } \ No newline at end of file From 8b0040d8ddabf2ac98921db2c0c3d248b0f209e2 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sat, 18 Jun 2022 10:08:05 +0100 Subject: [PATCH 8/9] download all if more than one post found --- FeedFilter.js | 71 +++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/FeedFilter.js b/FeedFilter.js index d2e7db8..05f876e 100644 --- a/FeedFilter.js +++ b/FeedFilter.js @@ -17,41 +17,44 @@ async function filterFeed() { // Find show on feed let list_filtered_for_show = feed.filter(item => item.title.includes(show.Name)) if (list_filtered_for_show.length > 0) { - // If show is found get url then return all links on that page - let full_link_list_from_page = await getLinksFromURL(list_filtered_for_show[0].link) - if (hevcSwitch) { - // Only get urls with HEVC in name - urls_to_check = full_link_list_from_page.filter(item => item.includes('HEVC')) - if (urls_to_check.length == 0) { - // If no urls with HEVC check for H265 - urls_to_check = full_link_list_from_page.filter(item => item.includes('H265')) + for (let match of list_filtered_for_show) { + // If show is found get url then return all links on that page + let full_link_list_from_page = await getLinksFromURL(match.link) + if (hevcSwitch) { + // Only get urls with HEVC in name + urls_to_check = full_link_list_from_page.filter(item => item.includes('HEVC')) + if (urls_to_check.length == 0) { + // If no urls with HEVC check for H265 + urls_to_check = full_link_list_from_page.filter(item => item.includes('H265')) + } + } else { + urls_to_check = full_link_list_from_page } - } else { - urls_to_check = full_link_list_from_page - } - // Only keep urls that match show quality - let urls_with_quality_in_url = urls_to_check.filter(item => item.includes(show.Quality)) - // Remove any url trying to direct to a torrent site search - let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) - // Remove any url that doesn't include MeGusta - if (hevcSwitch) { - pre_nitroFlare = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) - } else { - pre_nitroFlare = urls_without_torrent_in_url - } - // NitroFlare doesn't group with the rest of the links in JD, remove them. - let remove_nitroflare = pre_nitroFlare.filter(item => !item.includes('nitro')) - // Do some stuff - let download_list = checkFileName(remove_nitroflare) - // Send Links to JDdownloader - if (download_list.length !== 0) { - log.info(download_list.length + ' links for ' + show.Name + ' have been sent to JDdownloader') - linkAdder(download_list) - } else { - // No HEVC links found - log.info(download_list.length + ' links for ' + show.Name + ' have been found, will recheck next time.') - for (let feed_item of list_filtered_for_show) { - retry_show_cache.push(feed_item) + // Only keep urls that match show quality + let urls_with_quality_in_url = urls_to_check.filter(item => item.includes(show.Quality)) + // Remove any url trying to direct to a torrent site search + let urls_without_torrent_in_url = urls_with_quality_in_url.filter(item => !item.includes('torrent')) + // Remove any url that doesn't include MeGusta + if (hevcSwitch) { + pre_nitroFlare = urls_without_torrent_in_url.filter(item => item.includes('MeGusta')) + } else { + pre_nitroFlare = urls_without_torrent_in_url + } + // NitroFlare doesn't group with the rest of the links in JD, remove them. + let remove_nitroflare = pre_nitroFlare.filter(item => !item.includes('nitro')) + // Do some stuff + urlObj = checkFileName(remove_nitroflare) + let download_list = urlObj.urlList + // Send Links to JDdownloader + if (download_list.length !== 0) { + log.info(download_list.length + ' links for ' + urlObj.fileName + ' have been sent to JDdownloader') + linkAdder(download_list) + } else { + // No HEVC links found + log.info(download_list.length + ' links for ' + show.Name + ' have been found, will recheck next time.') + for (let feed_item of list_filtered_for_show) { + retry_show_cache.push(feed_item) + } } } } else { From 684644cdab63d0a3c9ffe3c8f3e409c4bddbcc9b Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sat, 18 Jun 2022 10:13:36 +0100 Subject: [PATCH 9/9] readme update --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bc0b120..c9dd888 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,19 @@ I have put together this simple project to allow me to do that, people may find - Specify time to check file cache to send links to JDownloader - Ability to add multiple shows to check for - Ability to check for different qualities per show you are looking for - +- Ability to turn OFF only HEVC search # Configuration -There is a ``config-sample.json`` file that needs to be renamed to ``config.json``, after this you can update it with your required settings. + +There is a `config-sample.json` file that needs to be renamed to `config.json`, after this you can update it with your required settings. - JDUserName - Your MyJDownloader Username - JDPassword - Your MyJDownloader Password -- RSSFeed - The url to the rss feed you want to watch (Only tested with - https://rlsbb.cc/feed/) +- RSSFeed - The url to the rss feed you want to watch (Only tested with - rlsbb) - RSSFeedRefreshMins - How often to poll your rss feed down to local file cache -- JDPostLinksMins": How often to check your file cache for your shows and send found links to JDownloader +- JDPostLinksMins - How often to check your file cache for your shows and send found links to JDownloader - Autostart - Tells JDownloader to add and start the downloads straight away (true/false) +- OnlyHEVC - If false, this will download any files that it finds on the post that matches the quality (true/false) - Shows - This needs to be a comma separated list of json objects of the show and quality you want to check for. An example shown below @@ -30,10 +32,11 @@ An example shown below { "JDUserName": "User", "JDPassword": "Pass", - "RSSFeed": "https://rlsbb.cc/feed/", + "RSSFeed": "https://mypage.com/feed/", "RSSFeedRefreshMins": 10, "JDPostLinksMins": 180, "Autostart": false, + "OnlyHEVC": true, "Shows": [ { "Name": "Obi-Wan Kenobi", @@ -46,17 +49,21 @@ An example shown below ] } ``` + # Running ## Release Version + Either download the version on the releases, as well as the `config-sample.json` and run execute, this is the simplest way, but may not be the latest code, and will not run in the background ## Source Version + You will need NodeJS installed, then you can checkout this repo. For basic usage you can just navigate into the folder and run - -- ``npm i`` to install the requirements. -- ``node JDRssDownloader.js`` This will execute the process and add the links if they are found. + +- `npm i` to install the requirements. +- `node JDRssDownloader.js` This will execute the process and add the links if they are found. My suggestion would be to use pm2 so it can run "in the background" @@ -64,11 +71,10 @@ My suggestion would be to use pm2 so it can run "in the background" Not alot of testing has gone into this, and I threw it together in a few hours, and only for my use case, so there are bound to be issues, please open them and let me know if you find any. - # Future -I have some ideas to make this a bit smarter, at the moment it doesn't clean the cache at all, and will keep sending the same links to JDownloader once they are in the cache, I am working on cleaning them out, but for now the best thing to do it to set JDownloader to automatically mark already downloaded links as finished, then it doesn't bother redownloading all the time. -Also want to add the ability to look at multiple RSS feeds, this seems quite easy, and I will do in the next couple of weeks. +I have some ideas to make this a bit smarter and I want to add the ability to look at multiple RSS feeds, this seems quite easy, and I will do in the next couple of weeks. # Thanks -Thank for all the people who made any of the modules that I used to create this. \ No newline at end of file + +Thank for all the people who made any of the modules that I used to create this.