mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 20:03:40 +01:00
commit
1f5d18615d
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,3 +9,6 @@ dist/jdrssdownloader-linux
|
|||||||
dist/jdrssdownloader-win.exe
|
dist/jdrssdownloader-win.exe
|
||||||
dist/jdrssdownloader-macos
|
dist/jdrssdownloader-macos
|
||||||
downloadHistory.json
|
downloadHistory.json
|
||||||
|
shows.json
|
||||||
|
shows.json
|
||||||
|
cache/retryCache.json
|
||||||
|
@ -3,12 +3,14 @@ const { linkAdder } = require('./JDLinkAdder');
|
|||||||
const { getLinksFromURL } = require('./LinkGrabber')
|
const { getLinksFromURL } = require('./LinkGrabber')
|
||||||
const { checkFileName } = require('./checkFileName')
|
const { checkFileName } = require('./checkFileName')
|
||||||
const { checkDownloadHistory } = require('./checkDownloadHistory')
|
const { checkDownloadHistory } = require('./checkDownloadHistory')
|
||||||
|
const { retryCache } = require('./retryCache')
|
||||||
|
|
||||||
async function filterFeed() {
|
async function filterFeed() {
|
||||||
let myshowlist = JSON.parse(fs.readFileSync('config.json')).Shows
|
|
||||||
let hevcSwitch = JSON.parse(fs.readFileSync('config.json')).OnlyHEVC
|
let hevcSwitch = JSON.parse(fs.readFileSync('config.json')).OnlyHEVC
|
||||||
let feed = JSON.parse(fs.readFileSync('./feedCache.json'));
|
let myshowlist = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
let retryShowCache = []
|
let rssFeed = JSON.parse(fs.readFileSync('./cache/feedCache.json'));
|
||||||
|
let retryCacheData = retryCache()
|
||||||
|
let fullFeedToCheck = retryCacheData.concat(rssFeed)
|
||||||
let urlsToCheck = []
|
let urlsToCheck = []
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +18,7 @@ async function filterFeed() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Find show on feed
|
// Find show on feed
|
||||||
let listFilteredForShow = feed.filter(item => item.title.includes(show.Name))
|
let listFilteredForShow = fullFeedToCheck.filter(item => item.title.includes(show.Name))
|
||||||
if (listFilteredForShow.length > 0) {
|
if (listFilteredForShow.length > 0) {
|
||||||
for (let match of listFilteredForShow) {
|
for (let match of listFilteredForShow) {
|
||||||
// If show is found get url then return all links on that page
|
// If show is found get url then return all links on that page
|
||||||
@ -60,7 +62,7 @@ async function filterFeed() {
|
|||||||
// No HEVC links found
|
// No HEVC links found
|
||||||
log.info(downloadList.length + ' links for ' + show.Name + ' have been found, will recheck next time.')
|
log.info(downloadList.length + ' links for ' + show.Name + ' have been found, will recheck next time.')
|
||||||
for (let feedItem of listFilteredForShow) {
|
for (let feedItem of listFilteredForShow) {
|
||||||
retryShowCache.push(feedItem)
|
retryCache(feedItem)
|
||||||
}
|
}
|
||||||
global.linkCheckTime = new Date();
|
global.linkCheckTime = new Date();
|
||||||
}
|
}
|
||||||
@ -75,7 +77,7 @@ async function filterFeed() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info('Wiping feed cache')
|
log.info('Wiping feed cache')
|
||||||
fs.writeFileSync('./feedCache.json', JSON.stringify(retryShowCache));
|
fs.writeFileSync('./cache/feedCache.json', JSON.stringify([]));
|
||||||
global.linkCheckTime = new Date();
|
global.linkCheckTime = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,15 +11,15 @@ async function feedUpdater() {
|
|||||||
|
|
||||||
let items = [];
|
let items = [];
|
||||||
|
|
||||||
if (fs.existsSync('./feedCache.json')) {
|
if (fs.existsSync('./cache/feedCache.json')) {
|
||||||
items = JSON.parse(fs.readFileSync('./feedCache.json'))
|
items = JSON.parse(fs.readFileSync('./cache/feedCache.json'))
|
||||||
}
|
}
|
||||||
// Compare existing cache and new items and merge differences
|
// Compare existing cache and new items and merge differences
|
||||||
let updatedArray = lodash.unionBy(feed.items, items, 'title');
|
let updatedArray = lodash.unionBy(feed.items, items, 'title');
|
||||||
|
|
||||||
// Save the file
|
// Save the file
|
||||||
log.info(updatedArray.length + ' items in file cache')
|
log.info(updatedArray.length + ' items in file cache')
|
||||||
fs.writeFileSync('./feedCache.json', JSON.stringify(updatedArray));
|
fs.writeFileSync('./cache/feedCache.json', JSON.stringify(updatedArray));
|
||||||
global.rssRefreshTime = new Date();
|
global.rssRefreshTime = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
config = JSON.parse(fs.readFileSync('config.json'))
|
config = JSON.parse(fs.readFileSync('config.json'))
|
||||||
|
|
||||||
const { feedUpdater } = require('./FeedUpdater')
|
const { feedUpdater } = require('./FeedUpdater')
|
||||||
const { filterFeed } = require('./FeedFilter')
|
const { filterFeed } = require('./FeedFilter')
|
||||||
const { telegrambot } = require('./telegramCommunication')
|
const { telegrambot } = require('./telegramCommunication')
|
||||||
|
const { create_empty_cache_files } = require('./utils')
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const cors = require('cors');
|
const cors = require('cors');
|
||||||
@ -52,6 +52,7 @@ async function main() {
|
|||||||
log.tele('Refreshing RSS Items every ' + RSSFeedRefreshMins + ' Minutes')
|
log.tele('Refreshing RSS Items every ' + RSSFeedRefreshMins + ' Minutes')
|
||||||
log.tele('Checking for links and sending to JDdownloader every ' + JDPostLinksMins + ' Minutes')
|
log.tele('Checking for links and sending to JDdownloader every ' + JDPostLinksMins + ' Minutes')
|
||||||
app.listen(config.WebUIPort, () => log.info(`WebUi is listening on ${config.WebUIPort}!`))
|
app.listen(config.WebUIPort, () => log.info(`WebUi is listening on ${config.WebUIPort}!`))
|
||||||
|
create_empty_cache_files()
|
||||||
setInterval(await feedUpdater, RSSFeedRefreshMins * 60000);
|
setInterval(await feedUpdater, RSSFeedRefreshMins * 60000);
|
||||||
setInterval(await filterFeed, JDPostLinksMins * 60000);
|
setInterval(await filterFeed, JDPostLinksMins * 60000);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const { config } = require('process');
|
|
||||||
|
|
||||||
async function addNewShow(showData) {
|
async function addNewShow(showData) {
|
||||||
let config = JSON.parse(fs.readFileSync('config.json'))
|
let shows = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
let exist = false
|
let exist = false
|
||||||
for (let show of config.Shows) {
|
for (let show of shows) {
|
||||||
if (show.Name == showData.showName) {
|
if (show.Name == showData.showName) {
|
||||||
exist = true
|
exist = true
|
||||||
}
|
}
|
||||||
@ -12,12 +12,12 @@ async function addNewShow(showData) {
|
|||||||
if (exist) {
|
if (exist) {
|
||||||
log.error(showData.showName + ' Already exists in list and not added')
|
log.error(showData.showName + ' Already exists in list and not added')
|
||||||
} else {
|
} else {
|
||||||
config.Shows.push({
|
shows.push({
|
||||||
"Name": showData.showName,
|
"Name": showData.showName,
|
||||||
"Quality": showData.quality
|
"Quality": showData.quality
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
fs.writeFileSync('config.json', JSON.stringify(config));
|
fs.writeFileSync('shows.json', JSON.stringify(shows));
|
||||||
log.info(showData.showName + ' Added to the list, checking for ' + showData.quality + 'p')
|
log.info(showData.showName + ' Added to the list, checking for ' + showData.quality + 'p')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
@ -26,22 +26,59 @@ async function addNewShow(showData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function removeShow(showData) {
|
async function removeShow(showData) {
|
||||||
let config = JSON.parse(fs.readFileSync('config.json'))
|
let shows = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
|
|
||||||
myArray = config.Shows.filter(function (obj) {
|
myArray = shows.filter(function (obj) {
|
||||||
return obj.Name !== showData.showName;
|
return obj.Name !== showData.showName;
|
||||||
});
|
});
|
||||||
|
|
||||||
config.Shows = myArray
|
shows = myArray
|
||||||
try {
|
try {
|
||||||
fs.writeFileSync('config.json', JSON.stringify(config));
|
fs.writeFileSync('shows.json', JSON.stringify(shows));
|
||||||
log.info(showData.showName + ' Removed from tracking list.')
|
log.info(showData.showName + ' Removed from tracking list.')
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
addNewShow, removeShow
|
async function editShow(showData) {
|
||||||
|
let shows = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
|
for (let index = 0; index < shows.length; index++) {
|
||||||
|
const element = shows[index];
|
||||||
|
if (element.Name == showData.showName) {
|
||||||
|
shows[index] = {
|
||||||
|
"Name": showData.showName,
|
||||||
|
"Quality": showData.quality
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
fs.writeFileSync('shows.json', JSON.stringify(shows));
|
||||||
|
log.info(showData.showName + ' Quality modified to ' + showData.quality + 'p')
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function removeShowFromCache(showData) {
|
||||||
|
let shows = JSON.parse(fs.readFileSync('./cache/retryCache.json'))
|
||||||
|
|
||||||
|
myArray = shows.filter(function (obj) {
|
||||||
|
return obj.title !== showData;
|
||||||
|
});
|
||||||
|
|
||||||
|
shows = myArray
|
||||||
|
try {
|
||||||
|
fs.writeFileSync('./cache/retryCache.json', JSON.stringify(shows));
|
||||||
|
log.info(showData + ' Removed from retry cache.')
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
addNewShow, removeShow, editShow, removeShowFromCache
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
function checkDownloadHistory(urlObj) {
|
function checkDownloadHistory(urlObj) {
|
||||||
try {
|
history = JSON.parse(fs.readFileSync('./cache/downloadHistory.json'));
|
||||||
history = JSON.parse(fs.readFileSync('./downloadHistory.json'));
|
|
||||||
} catch (error) {
|
|
||||||
fs.writeFileSync('./downloadHistory.json', JSON.stringify([]));
|
|
||||||
}
|
|
||||||
history = JSON.parse(fs.readFileSync('./downloadHistory.json'));
|
|
||||||
if (history.includes(urlObj.fileName)) {
|
if (history.includes(urlObj.fileName)) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
history.push(urlObj.fileName)
|
history.push(urlObj.fileName)
|
||||||
fs.writeFileSync('./downloadHistory.json', JSON.stringify(history));
|
fs.writeFileSync('./cache/downloadHistory.json', JSON.stringify(history));
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jdrssdownloader",
|
"name": "jdrssdownloader",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "JDRssDownloader.js",
|
"main": "JDRssDownloader.js",
|
||||||
"bin": "JDRssDownloader.js",
|
"bin": "JDRssDownloader.js",
|
||||||
@ -15,6 +15,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"express-basic-auth": "^1.2.1",
|
"express-basic-auth": "^1.2.1",
|
||||||
|
"express-validator": "^6.14.2",
|
||||||
"jdownloader-client": "^1.0.0",
|
"jdownloader-client": "^1.0.0",
|
||||||
"line-reader": "^0.4.0",
|
"line-reader": "^0.4.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
@ -97,9 +97,15 @@ a {
|
|||||||
|
|
||||||
.Message {
|
.Message {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 30px;
|
border-radius: 5px;
|
||||||
|
padding: 20px;
|
||||||
border-bottom: var(--ui-shadow-border);
|
border-bottom: var(--ui-shadow-border);
|
||||||
box-shadow: var(--ui-shadow);
|
box-shadow: var(--ui-shadow);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
/* text-align: center; */
|
||||||
|
margin-top:10px;
|
||||||
|
margin-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Message > .Title {
|
.Message > .Title {
|
||||||
|
21
retryCache.js
Normal file
21
retryCache.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
|
function retryCache(cache) {
|
||||||
|
if (cache == null) {
|
||||||
|
retryCacheData = JSON.parse(fs.readFileSync('./cache/retryCache.json'));
|
||||||
|
return retryCacheData
|
||||||
|
}
|
||||||
|
retryCacheData = JSON.parse(fs.readFileSync('./cache/retryCache.json'));
|
||||||
|
if (retryCacheData.some(e => e.title === cache.title)) {
|
||||||
|
log.info(cache.title + ' is already in the retry cache.')
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cache.retryCount = 5
|
||||||
|
retryCacheData.push(cache)
|
||||||
|
fs.writeFileSync('./cache/retryCache.json', JSON.stringify(retryCacheData));
|
||||||
|
log.info(cache.title + ' written to retry cache.')
|
||||||
|
return retryCacheData
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { retryCache }
|
25
routes/cache.js
Normal file
25
routes/cache.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const {removeShowFromCache} = require('../apiFunctions')
|
||||||
|
|
||||||
|
module.exports = function (app) {
|
||||||
|
app.get("/feedCache", (req, res) => {
|
||||||
|
feedCache = JSON.parse(fs.readFileSync('./cache/feedCache.json'))
|
||||||
|
res.render("feedCache", { title: "Feed Cache", feedCache: feedCache });
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get("/retryCache", (req, res) => {
|
||||||
|
retryCache = JSON.parse(fs.readFileSync('./cache/retryCache.json'))
|
||||||
|
for (let index = 0; index < retryCache.length; index++) {
|
||||||
|
const item = retryCache[index];
|
||||||
|
retryCache[index].newtitle = item.title.replace(/ /g, "‡");
|
||||||
|
}
|
||||||
|
res.render("retryCache", { title: "Retry Cache", retryCache: retryCache });
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/retryCache/remove', (req, res) => {
|
||||||
|
const showName = req.query.name.replaceAll("‡", " ");
|
||||||
|
console.log(req)
|
||||||
|
removeShowFromCache(showName)
|
||||||
|
res.redirect("/retryCache");
|
||||||
|
});
|
||||||
|
}
|
@ -1,11 +1,14 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const { nextLinkCheck, nextRssRefresh } = require('.././utils')
|
const { nextLinkCheck, nextRssRefresh, get_last_downloaded } = require('.././utils')
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
|
|
||||||
app.get("/", (req, res) => {
|
app.get("/", (req, res) => {
|
||||||
showListLength = JSON.parse(fs.readFileSync('config.json')).Shows.length
|
showListLength = JSON.parse(fs.readFileSync('shows.json')).length
|
||||||
a =
|
feedCacheLength = JSON.parse(fs.readFileSync('./cache/feedCache.json')).length
|
||||||
res.render("index", { title: "Home", showListLength: showListLength, version: global.version, rssTime: nextRssRefresh(), linkCheck: nextLinkCheck() });
|
retryCacheLength = JSON.parse(fs.readFileSync('./cache/retryCache.json')).length
|
||||||
|
rssTime = nextRssRefresh()
|
||||||
|
linkCheck = nextLinkCheck()
|
||||||
|
res.render("index", { title: "Home", showListLength: showListLength, version: global.version, rssTime: rssTime, linkCheck: linkCheck, lastDownloaded: get_last_downloaded() });
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,9 +1,11 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const { addNewShow, removeShow } = require('.././apiFunctions')
|
const { addNewShow, removeShow, editShow } = require('.././apiFunctions')
|
||||||
|
const { check, validationResult } = require('express-validator');
|
||||||
|
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
app.get("/shows", (req, res) => {
|
app.get("/shows", (req, res) => {
|
||||||
showList = JSON.parse(fs.readFileSync('config.json')).Shows
|
showList = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
res.render("shows", { title: "Show List", showList: showList });
|
res.render("shows", { title: "Show List", showList: showList });
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -12,17 +14,36 @@ module.exports = function (app) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.get("/shows/remove", (req, res) => {
|
app.get("/shows/remove", (req, res) => {
|
||||||
showList = JSON.parse(fs.readFileSync('config.json')).Shows
|
showList = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
res.render("removeshow", { title: "Remove Show", showList: showList });
|
res.render("removeshow", { title: "Remove Show", showList: showList });
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post('/addNewShow', (req, res) => {
|
app.get("/shows/edit", (req, res) => {
|
||||||
addNewShow(req.body)
|
showList = JSON.parse(fs.readFileSync('shows.json'))
|
||||||
res.redirect("/shows");
|
res.render("editShow", { title: "Edit Show", showList: showList });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.post('/addNewShow', [
|
||||||
|
check('showName')
|
||||||
|
.isLength({ min: 1 })
|
||||||
|
], (req, res) => {
|
||||||
|
if (validationResult(req).isEmpty()) {
|
||||||
|
addNewShow(req.body)
|
||||||
|
res.redirect("/shows");
|
||||||
|
} else {
|
||||||
|
log.error('You cannot add a show without a name.')
|
||||||
|
res.redirect("/shows");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
app.post('/removeShow', (req, res) => {
|
app.post('/removeShow', (req, res) => {
|
||||||
removeShow(req.body)
|
removeShow(req.body)
|
||||||
res.redirect("/shows");
|
res.redirect("/shows");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.post('/editShow', (req, res) => {
|
||||||
|
editShow(req.body)
|
||||||
|
res.redirect("/shows");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
1
shows.json
Normal file
1
shows.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
33
utils.js
33
utils.js
@ -16,7 +16,36 @@ function nextLinkCheck() {
|
|||||||
return returnUpdatedDate(global.linkCheckTime, config.JDPostLinksMins)
|
return returnUpdatedDate(global.linkCheckTime, config.JDPostLinksMins)
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
function get_last_downloaded() {
|
||||||
nextRssRefresh, nextLinkCheck
|
history = JSON.parse(fs.readFileSync('./cache/downloadHistory.json'))
|
||||||
|
last = history.slice(-1)[0]
|
||||||
|
return last
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_empty_downloadHistory() {
|
||||||
|
try {
|
||||||
|
return JSON.parse(fs.readFileSync('./cache/downloadHistory.json'));
|
||||||
|
} catch (error) {
|
||||||
|
fs.writeFileSync('./cache/downloadHistory.json', JSON.stringify([]));
|
||||||
|
return JSON.parse(fs.readFileSync('./cache/downloadHistory.json'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_empty_retry_cache() {
|
||||||
|
try {
|
||||||
|
return JSON.parse(fs.readFileSync('./cache/retryCache.json'));
|
||||||
|
} catch (error) {
|
||||||
|
fs.writeFileSync('./cache/retryCache.json', JSON.stringify([]));
|
||||||
|
return JSON.parse(fs.readFileSync('./cache/retryCache.json'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_empty_cache_files() {
|
||||||
|
create_empty_downloadHistory()
|
||||||
|
create_empty_retry_cache()
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
nextRssRefresh, nextLinkCheck, get_last_downloaded, create_empty_cache_files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ block layout-content
|
|||||||
select(name="quality")
|
select(name="quality")
|
||||||
option(value='720') #{'720p'}
|
option(value='720') #{'720p'}
|
||||||
option(value='1080') #{'1080p'}
|
option(value='1080') #{'1080p'}
|
||||||
|
option(value='2160') #{'2160p'}
|
||||||
input(type="submit", value="Add Show")
|
input(type="submit", value="Add Show")
|
||||||
div.NavButtons
|
div.NavButtons
|
||||||
a(href="/")
|
a(href="/")
|
||||||
|
20
views/editShow.pug
Normal file
20
views/editShow.pug
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
extends layout
|
||||||
|
|
||||||
|
block layout-content
|
||||||
|
div.View
|
||||||
|
h1.Banner Edit Show
|
||||||
|
div.Message
|
||||||
|
form(action="/editShow" method="POST")
|
||||||
|
p Show Name:
|
||||||
|
select(name="showName")
|
||||||
|
each show in showList
|
||||||
|
option(value=show.Name) #{show.Name}
|
||||||
|
p Quality:
|
||||||
|
select(name="quality")
|
||||||
|
option(value='720') #{'720p'}
|
||||||
|
option(value='1080') #{'1080p'}
|
||||||
|
option(value='2160') #{'2160p'}
|
||||||
|
input(type="submit", value="Edit Show")
|
||||||
|
div.NavButtons
|
||||||
|
a(href="/")
|
||||||
|
div.NavButton Home
|
26
views/feedCache.pug
Normal file
26
views/feedCache.pug
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
extends layout
|
||||||
|
|
||||||
|
block layout-content
|
||||||
|
div.View
|
||||||
|
h1.Banner Feed Cache
|
||||||
|
if (feedCache.length==0)
|
||||||
|
div.Message
|
||||||
|
h2 No shows in Feed Cache
|
||||||
|
else
|
||||||
|
div.Message
|
||||||
|
table
|
||||||
|
thead
|
||||||
|
tr
|
||||||
|
th Show Name
|
||||||
|
//- th Remove
|
||||||
|
tbody
|
||||||
|
each val, key in feedCache
|
||||||
|
tr
|
||||||
|
td
|
||||||
|
a(href=val.link
|
||||||
|
target="_blank") #{val.title}
|
||||||
|
//- td
|
||||||
|
//- a(href='/retryCache/remove?name=' + val.newtitle) Remove
|
||||||
|
div.NavButtons
|
||||||
|
a(href="/")
|
||||||
|
div.NavButton Home
|
@ -5,17 +5,28 @@ block layout-content
|
|||||||
h1.Banner JDRssDownloader #{version}
|
h1.Banner JDRssDownloader #{version}
|
||||||
body
|
body
|
||||||
div.Message
|
div.Message
|
||||||
h3 Number of Tracked Shows
|
h2 Number of Tracked Shows
|
||||||
h1 #{showListLength}
|
h3 #{showListLength}
|
||||||
h3 Next RSS Refresh
|
h2 Last Downloaded
|
||||||
h1 #{rssTime}
|
h3 #{lastDownloaded}
|
||||||
h3 Next Link Check
|
div.Message
|
||||||
h1 #{linkCheck}
|
h2
|
||||||
|
a(href='/feedCache') RSS Feed Cache Size
|
||||||
|
h3 #{feedCacheLength}
|
||||||
|
h2
|
||||||
|
a(href='/retryCache') Retry Cache Size
|
||||||
|
h3 #{retryCacheLength}
|
||||||
|
h2 Next RSS Refresh
|
||||||
|
h3 #{rssTime}
|
||||||
|
h2 Next Link Check
|
||||||
|
h3 #{linkCheck}
|
||||||
div.NavButtons
|
div.NavButtons
|
||||||
a(href="/shows")
|
a(href="/shows")
|
||||||
div.NavButton Show List
|
div.NavButton Show List
|
||||||
a(href="/shows/add")
|
a(href="/shows/add")
|
||||||
div.NavButton Add New Show
|
div.NavButton Add New Show
|
||||||
|
a(href="/shows/edit")
|
||||||
|
div.NavButton Edit Show
|
||||||
a(href="/shows/remove")
|
a(href="/shows/remove")
|
||||||
div.NavButton Remove Show
|
div.NavButton Remove Show
|
||||||
a(href="/logFile")
|
a(href="/logFile")
|
||||||
|
@ -4,7 +4,7 @@ html
|
|||||||
head
|
head
|
||||||
meta(charset="utf-8")
|
meta(charset="utf-8")
|
||||||
link(rel="shortcut icon", href="/favicon.ico")
|
link(rel="shortcut icon", href="/favicon.ico")
|
||||||
meta(name="viewport", content="width=device-width, initial-scale=1, shrink-to-fit=no")
|
meta(name="viewport", content="width=device-width, initial-scale=1, shrink-to-fit=yes")
|
||||||
meta(name="theme-color", content="#000000")
|
meta(name="theme-color", content="#000000")
|
||||||
title #{title} | JDRssDownloader
|
title #{title} | JDRssDownloader
|
||||||
link(rel="stylesheet" href="/style.css")
|
link(rel="stylesheet" href="/style.css")
|
||||||
|
26
views/retryCache.pug
Normal file
26
views/retryCache.pug
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
extends layout
|
||||||
|
|
||||||
|
block layout-content
|
||||||
|
div.View
|
||||||
|
h1.Banner Retry Cache
|
||||||
|
if (retryCache.length==0)
|
||||||
|
div.Message
|
||||||
|
h2 No shows in Retry Cache
|
||||||
|
else
|
||||||
|
div.Message
|
||||||
|
table
|
||||||
|
thead
|
||||||
|
tr
|
||||||
|
th Show Name
|
||||||
|
th Remove
|
||||||
|
tbody
|
||||||
|
each val, key in retryCache
|
||||||
|
tr
|
||||||
|
td
|
||||||
|
a(href=val.link
|
||||||
|
target="_blank") #{val.title}
|
||||||
|
td
|
||||||
|
a(href='/retryCache/remove?name=' + val.newtitle) Remove
|
||||||
|
div.NavButtons
|
||||||
|
a(href="/")
|
||||||
|
div.NavButton Home
|
Loading…
x
Reference in New Issue
Block a user