From ae9c6f9f76ec1f24158c23c9c043c7c0d9e2545c Mon Sep 17 00:00:00 2001
From: Aidan
Date: Sun, 22 Dec 2024 18:43:28 -0500
Subject: [PATCH] support tagging as lsposed module, move db files to /data
---
app.js | 10 +++++-----
apps.json => data/apps.json | 0
modules.json => data/modules.json | 9 +++++++++
src/views/pages/modules.ejs | 3 +++
src/views/templates/module.ejs | 3 +++
5 files changed, 20 insertions(+), 5 deletions(-)
rename apps.json => data/apps.json (100%)
rename modules.json => data/modules.json (98%)
diff --git a/app.js b/app.js
index e4daff1..20bb60f 100644
--- a/app.js
+++ b/app.js
@@ -30,7 +30,7 @@ app.get('/', (req, res) => {
});
app.get('/apps', (req, res) => {
- fs.readFile('apps.json', (err, data) => {
+ fs.readFile('data/apps.json', (err, data) => {
if (err) throw err;
const apps = JSON.parse(data);
res.render('pages/apps', { title: 'Apps', apps: apps });
@@ -38,7 +38,7 @@ app.get('/apps', (req, res) => {
});
app.get('/modules', (req, res) => {
- fs.readFile('modules.json', (err, data) => {
+ fs.readFile('data/modules.json', (err, data) => {
if (err) throw err;
const modules = JSON.parse(data);
res.render('pages/modules', { title: 'Modules | modules.', modules: modules });
@@ -46,7 +46,7 @@ app.get('/modules', (req, res) => {
});
app.get('/modules/:id', (req, res) => {
- fs.readFile('modules.json', (err, data) => {
+ fs.readFile('data/modules.json', (err, data) => {
if (err) throw err;
const modules = JSON.parse(data);
const module = modules.find(m => m.id === req.params.id);
@@ -59,7 +59,7 @@ app.get('/modules/:id', (req, res) => {
});
app.get('/apps/:id', (req, res) => {
- fs.readFile('apps.json', (err, data) => {
+ fs.readFile('data/apps.json', (err, data) => {
if (err) throw err;
const apps = JSON.parse(data);
const app = apps.find(m => m.id === req.params.id);
@@ -76,7 +76,7 @@ app.get('/download', (req, res) => {
if (!validator.isAlphanumeric(name.replace(/\s/g, '')) || !validator.isAlphanumeric(type) || !validator.isAlphanumeric(version.replace(/\./g, '')) || !/^[a-zA-Z0-9-]+$/.test(arch)) {
return res.status(400).send('Invalid input, mister!');
}
- fs.readFile(`${type}s.json`, (err, data) => {
+ fs.readFile(`data/${type}s.json`, (err, data) => {
if (err) throw err;
const items = JSON.parse(data);
const item = items.find(i => i.name === name);
diff --git a/apps.json b/data/apps.json
similarity index 100%
rename from apps.json
rename to data/apps.json
diff --git a/modules.json b/data/modules.json
similarity index 98%
rename from modules.json
rename to data/modules.json
index 2dbdee6..a872e8b 100644
--- a/modules.json
+++ b/data/modules.json
@@ -6,6 +6,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v19.16.39": {
"all": "https://github.com/NoName-exe/revanced-extended/releases/download/126/youtube-revanced-extended-magisk-v19.16.39-all.zip"
@@ -24,6 +25,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v7.16.53": {
"arm-v7a": "https://github.com/NoName-exe/revanced-extended/releases/download/126/youtube-music-revanced-extended-magisk-v7.16.53-arm-v7a.zip",
@@ -44,6 +46,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.2.0": {
"all": "https://github.com/5ec1cff/TrickyStore/releases/download/1.2.0/Tricky-Store-v1.2.0-155-331f6fe-release.zip"
@@ -65,6 +68,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.2.0": {
"all": "https://github.com/5ec1cff/TrickyStore/releases/download/1.2.0/Tricky-Store-v1.2.0-155-331f6fe-release.zip"
@@ -86,6 +90,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v18.1": {
"all": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v18.1/PlayIntegrityFix_v18.1.zip"
@@ -110,6 +115,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.5.6": {
"all": "https://github.com/Magisk-Modules-Alt-Repo/StevenBlock/releases/download/v1.5.6/stevenblacklist.zip"
@@ -143,6 +149,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.2": {
"all": "https://github.com/LSPosed/LSPosed.github.io/releases/download/shamiko-367/Shamiko-v1.2-367-release.zip"
@@ -185,6 +192,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.18.0": {
"all": "https://github.com/j-hc/zygisk-detach/releases/download/v1.18.0/zygisk-detach-v1.18.0.zip"
@@ -200,6 +208,7 @@
"price": "FREE",
"foss": true,
"selfHosted": false,
+ "lsposed": false,
"downloadLinks": {
"v1.0.2": {
"all": "https://github.com/foobar66/dss/releases/download/v1.0.2/dss.zip"
diff --git a/src/views/pages/modules.ejs b/src/views/pages/modules.ejs
index 9dba9e9..88c5a81 100644
--- a/src/views/pages/modules.ejs
+++ b/src/views/pages/modules.ejs
@@ -83,6 +83,9 @@
<% if (module.selfHosted) { %>
SelfHost
<% } %>
+ <% if (module.lsposed) { %>
+ LSPosed
+ <% } %>
<% }) %>
diff --git a/src/views/templates/module.ejs b/src/views/templates/module.ejs
index 05db44a..95de040 100644
--- a/src/views/templates/module.ejs
+++ b/src/views/templates/module.ejs
@@ -79,6 +79,9 @@
<% if (module.selfHosted) { %>
SelfHost
<% } %>
+ <% if (module.lsposed) { %>
+ LSPosed
+ <% } %>