mirror of
https://github.com/0belous/universal-plugin-repo.git
synced 2025-12-19 19:21:17 -03:00
This commit is contained in:
parent
b7306f0dbe
commit
4f08f4a18e
1 changed files with 5 additions and 5 deletions
10
update.js
10
update.js
|
|
@ -9,14 +9,14 @@ const imageBaseUrl = 'https://raw.githubusercontent.com/0belous/universal-plugin
|
||||||
async function getSources(){
|
async function getSources(){
|
||||||
let sources = [];
|
let sources = [];
|
||||||
try {
|
try {
|
||||||
const fileContent = await fs.readFile('sources.txt', 'utf8');
|
const fileContent = await fs.readFile('sources.txt', 'utf8');
|
||||||
sources = fileContent.split(/\r?\n/).filter(line => line.trim() !== '');
|
sources = fileContent.split(/\r?\n/).filter(line => line.trim() !== '' && !line.trim().startsWith('#'));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error reading sources.txt:", err);
|
console.error("Error reading sources.txt:", err);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let mergedData = [];
|
let mergedData = [];
|
||||||
|
|
||||||
for(const url of sources){
|
for(const url of sources){
|
||||||
try {
|
try {
|
||||||
|
|
@ -37,7 +37,7 @@ async function getSources(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mergedData;
|
return mergedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clearImagesFolder() {
|
async function clearImagesFolder() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue