mirror of
https://github.com/karl0ss/JDRssDownloader.git
synced 2025-04-27 20:03:40 +01:00
blank show.json creation if not present
This commit is contained in:
parent
dfa7194f33
commit
2d3ae87492
10
utils.js
10
utils.js
@ -40,9 +40,19 @@ function create_empty_retry_cache() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function create_empty_shows_file() {
|
||||||
|
try {
|
||||||
|
return JSON.parse(fs.readFileSync('./shows.json'));
|
||||||
|
} catch (error) {
|
||||||
|
fs.writeFileSync('./shows.json', JSON.stringify([]));
|
||||||
|
return JSON.parse(fs.readFileSync('./shows.json'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function create_empty_cache_files() {
|
function create_empty_cache_files() {
|
||||||
create_empty_downloadHistory()
|
create_empty_downloadHistory()
|
||||||
create_empty_retry_cache()
|
create_empty_retry_cache()
|
||||||
|
create_empty_shows_file()
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user