mirror of
https://github.com/0belous/universal-plugin-repo.git
synced 2026-03-21 17:26:52 -03:00
separate manifests
This commit is contained in:
parent
28914fac33
commit
2ecf69e128
7 changed files with 81 additions and 39 deletions
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -2,14 +2,4 @@
|
||||||
|
|
||||||
1. [ ] Have you ran update.js and pushed the resulting manifest to your forks repo?
|
1. [ ] Have you ran update.js and pushed the resulting manifest to your forks repo?
|
||||||
|
|
||||||
2. [ ] Have you tested the generated manifest on jellyfin?
|
2. [ ] Have you tested the generated manifest on jellyfin?
|
||||||
|
|
||||||
### Adding sources:
|
|
||||||
|
|
||||||
1. [ ] Have you removed any duplicate sources?
|
|
||||||
|
|
||||||
- VSCode: ctrl + shift + p > Delete Duplicate Lines
|
|
||||||
|
|
||||||
2. [ ] Have you sorted lines by ascending?
|
|
||||||
|
|
||||||
- VSCode: ctrl + shift + p > Sort Lines Ascending
|
|
||||||
30
.github/workflows/format-lists.yml
vendored
Normal file
30
.github/workflows/format-lists.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
name: Format Sources Lists
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'sources.txt'
|
||||||
|
- 'sourcesnsfw.txt'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref || github.ref }}
|
||||||
|
|
||||||
|
- name: Sort and remove duplicates
|
||||||
|
run: |
|
||||||
|
LC_ALL=C sort -u -o sources.txt sources.txt
|
||||||
|
LC_ALL=C sort -u -o sourcesnsfw.txt sourcesnsfw.txt
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add sources.txt sourcesnsfw.txt
|
||||||
|
git diff --quiet && git diff --staged --quiet || (git commit -m "Auto-format sources lists: sort and remove duplicates" && git push)
|
||||||
4
.github/workflows/update.yml
vendored
4
.github/workflows/update.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Manifest updater
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main, testing ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
|
@ -21,6 +21,6 @@ jobs:
|
||||||
- run: |
|
- run: |
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git add manifest.json images/
|
git add manifest.json manifestnsfw.json images/
|
||||||
git commit -m "Generate manifest" || exit 0
|
git commit -m "Generate manifest" || exit 0
|
||||||
git push
|
git push
|
||||||
|
|
@ -23,6 +23,14 @@ https://raw.githubusercontent.com/0belous/universal-plugin-repo/refs/heads/main/
|
||||||
```
|
```
|
||||||
5. Never add another repository again!
|
5. Never add another repository again!
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>More plugins</summary>
|
||||||
|
You can optionally install the NSFW repo too
|
||||||
|
```
|
||||||
|
https://raw.githubusercontent.com/0belous/universal-plugin-repo/refs/heads/main/manifestnsfw.json
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
Most sources are from [awesome-jellyfin](https://github.com/awesome-jellyfin/awesome-jellyfin)
|
Most sources are from [awesome-jellyfin](https://github.com/awesome-jellyfin/awesome-jellyfin)
|
||||||
The rest are from reputable developers, each source is reviewed before being added.
|
The rest are from reputable developers, each source is reviewed before being added.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ https://raw.githubusercontent.com/CherryFloors/jellyfin-plugin-cinemamode/main/m
|
||||||
https://raw.githubusercontent.com/Cloud9Developer/Jellyfin-Newsletter-Plugin/master/manifest.json
|
https://raw.githubusercontent.com/Cloud9Developer/Jellyfin-Newsletter-Plugin/master/manifest.json
|
||||||
https://raw.githubusercontent.com/CodeDevMLH/jellyfin-plugin-manifest/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/CodeDevMLH/jellyfin-plugin-manifest/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/danieladov/JellyfinPluginManifest/master/manifest.json
|
https://raw.githubusercontent.com/danieladov/JellyfinPluginManifest/master/manifest.json
|
||||||
https://raw.githubusercontent.com/DirtyRacer1337/Jellyfin.Plugin.Stash/main/manifest.json
|
|
||||||
https://raw.githubusercontent.com/Eeeeelias/playlist-generator/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/Eeeeelias/playlist-generator/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/enoch85/bazarr-jellyfin/main/manifest.json
|
https://raw.githubusercontent.com/enoch85/bazarr-jellyfin/main/manifest.json
|
||||||
https://raw.githubusercontent.com/Felitendo/jellyfin-plugin-lyrics/master/manifest.json
|
https://raw.githubusercontent.com/Felitendo/jellyfin-plugin-lyrics/master/manifest.json
|
||||||
|
|
@ -33,7 +32,6 @@ https://raw.githubusercontent.com/KeksBombe/jellyfin-plugin-auto-collections/ref
|
||||||
https://raw.githubusercontent.com/lostb1t/Gelato/refs/heads/gh-pages/repository.json
|
https://raw.githubusercontent.com/lostb1t/Gelato/refs/heads/gh-pages/repository.json
|
||||||
https://raw.githubusercontent.com/lostb1t/jellyfin-plugin-collection-import/main/manifest.json
|
https://raw.githubusercontent.com/lostb1t/jellyfin-plugin-collection-import/main/manifest.json
|
||||||
https://raw.githubusercontent.com/luall0/jellyfin-luall0-plugins/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/luall0/jellyfin-luall0-plugins/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/metatube-community/jellyfin-plugin-metatube/dist/manifest.json
|
|
||||||
https://raw.githubusercontent.com/MorganKryze/jellyflare/main/manifest.json
|
https://raw.githubusercontent.com/MorganKryze/jellyflare/main/manifest.json
|
||||||
https://raw.githubusercontent.com/n00bcodr/jellyfin-plugins/main/10.11/manifest.json
|
https://raw.githubusercontent.com/n00bcodr/jellyfin-plugins/main/10.11/manifest.json
|
||||||
https://raw.githubusercontent.com/Namo2/InPlayerEpisodePreview/master/manifest.json
|
https://raw.githubusercontent.com/Namo2/InPlayerEpisodePreview/master/manifest.json
|
||||||
|
|
@ -44,7 +42,6 @@ https://raw.githubusercontent.com/RomainPierre7/jellyfin-plugin-TelegramNotifier
|
||||||
https://raw.githubusercontent.com/ryandash/jellyfin-plugin-myanimelist/main/manifest.json
|
https://raw.githubusercontent.com/ryandash/jellyfin-plugin-myanimelist/main/manifest.json
|
||||||
https://raw.githubusercontent.com/ShokoAnime/Shokofin/metadata/stable/manifest.json
|
https://raw.githubusercontent.com/ShokoAnime/Shokofin/metadata/stable/manifest.json
|
||||||
https://raw.githubusercontent.com/streamyfin/jellyfin-plugin-streamyfin/main/manifest.json
|
https://raw.githubusercontent.com/streamyfin/jellyfin-plugin-streamyfin/main/manifest.json
|
||||||
https://raw.githubusercontent.com/ThePornDatabase/Jellyfin.Plugin.ThePornDB/main/manifest.json
|
|
||||||
https://raw.githubusercontent.com/TheXaman/jellyfin-plugin-languageTags/main/manifest.json
|
https://raw.githubusercontent.com/TheXaman/jellyfin-plugin-languageTags/main/manifest.json
|
||||||
https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/manifest.json
|
https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/manifest.json
|
||||||
https://raw.githubusercontent.com/Viperinius/jellyfin-plugins/master/manifest.json
|
https://raw.githubusercontent.com/Viperinius/jellyfin-plugins/master/manifest.json
|
||||||
|
|
@ -57,4 +54,4 @@ https://repo.xkrivo.net/jellyfin/manifest.json
|
||||||
https://simoni.dev/jellyfin/repo.json
|
https://simoni.dev/jellyfin/repo.json
|
||||||
https://www.iamparadox.dev/jellyfin/plugins/manifest.json
|
https://www.iamparadox.dev/jellyfin/plugins/manifest.json
|
||||||
https://xzonn.top/JellyfinPluginDouban/manifest.json
|
https://xzonn.top/JellyfinPluginDouban/manifest.json
|
||||||
ttps://raw.githubusercontent.com/RadicalMuffinMan/moonfin-server/master/manifest.json
|
ttps://raw.githubusercontent.com/RadicalMuffinMan/moonfin-server/master/manifest.json
|
||||||
3
sourcesnsfw.txt
Normal file
3
sourcesnsfw.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
https://raw.githubusercontent.com/ThePornDatabase/Jellyfin.Plugin.ThePornDB/main/manifest.json
|
||||||
|
https://raw.githubusercontent.com/DirtyRacer1337/Jellyfin.Plugin.Stash/main/manifest.json
|
||||||
|
https://raw.githubusercontent.com/metatube-community/jellyfin-plugin-metatube/dist/manifest.json
|
||||||
58
update.js
58
update.js
|
|
@ -15,13 +15,13 @@ async function getLatestJellyfinVersion() {
|
||||||
return data.tag_name.replace('v', '');
|
return data.tag_name.replace('v', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSources(){
|
async function getSources(sourceFile){
|
||||||
let sources = [];
|
let sources = [];
|
||||||
try {
|
try {
|
||||||
const fileContent = await fs.readFile('sources.txt', 'utf8');
|
const fileContent = await fs.readFile(sourceFile, 'utf8');
|
||||||
sources = fileContent.split(/\r?\n/).filter(line => line.trim() !== '' && !line.trim().startsWith('#'));
|
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 ${sourceFile}:`, err.message);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +38,7 @@ async function getSources(){
|
||||||
throw new Error(`Response status: ${response.status}`);
|
throw new Error(`Response status: ${response.status}`);
|
||||||
}
|
}
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
|
json.forEach(p => p._metaSourceUrl = url);
|
||||||
mergedData.push(...json);
|
mergedData.push(...json);
|
||||||
console.log(` -> Merged ${json.length} plugins.`);
|
console.log(` -> Merged ${json.length} plugins.`);
|
||||||
|
|
||||||
|
|
@ -103,19 +104,25 @@ function findGithubUrl(obj) {
|
||||||
|
|
||||||
async function processDescriptions(pluginData) {
|
async function processDescriptions(pluginData) {
|
||||||
try {
|
try {
|
||||||
|
const genTime = new Date().toISOString().substring(11, 16) + ' UTC';
|
||||||
for (const plugin of pluginData) {
|
for (const plugin of pluginData) {
|
||||||
const repoUrl = findGithubUrl(plugin);
|
const repoUrl = findGithubUrl(plugin);
|
||||||
if (repoUrl) {
|
const sourceUrl = plugin._metaSourceUrl || 'Unknown';
|
||||||
const sourceLink = `\n\n${repoUrl}`;
|
delete plugin._metaSourceUrl;
|
||||||
const descriptionProp = ['description', 'Description', 'overview'].find(p => plugin[p]);
|
|
||||||
|
|
||||||
if (descriptionProp) {
|
let appendText = ` \n \nUniversal Repo: \nGenerated: ${genTime} \nSource: ${sourceUrl}`;
|
||||||
if (!plugin[descriptionProp].includes(repoUrl)) {
|
if (repoUrl) {
|
||||||
plugin[descriptionProp] += sourceLink;
|
appendText += ` \nGithub: ${repoUrl}`;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
plugin.description = sourceLink.trim();
|
const descriptionProp = ['description', 'Description', 'overview'].find(p => plugin[p]);
|
||||||
|
|
||||||
|
if (descriptionProp) {
|
||||||
|
if (!plugin[descriptionProp].includes("Universal Repo:")) {
|
||||||
|
plugin[descriptionProp] += appendText;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
plugin.description = appendText.trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(`Sucessfully injected source URLs`);
|
console.log(`Sucessfully injected source URLs`);
|
||||||
|
|
@ -125,7 +132,6 @@ async function processDescriptions(pluginData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function processImages(pluginData) {
|
async function processImages(pluginData) {
|
||||||
await clearImagesFolder();
|
|
||||||
for (const plugin of pluginData) {
|
for (const plugin of pluginData) {
|
||||||
if (plugin.imageUrl) {
|
if (plugin.imageUrl) {
|
||||||
const ext = getImageExtension(plugin.imageUrl);
|
const ext = getImageExtension(plugin.imageUrl);
|
||||||
|
|
@ -143,26 +149,34 @@ async function processImages(pluginData) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function writeManifest(dataToWrite){
|
async function writeManifest(dataToWrite, outputFile){
|
||||||
if (!dataToWrite || dataToWrite.length === 0) {
|
if (!dataToWrite || dataToWrite.length === 0) {
|
||||||
console.log("No data to write to manifest. Aborting.");
|
console.log(`No data to write to manifest ${outputFile}. Aborting.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const manifestJson = JSON.stringify(dataToWrite, null, 2);
|
const manifestJson = JSON.stringify(dataToWrite, null, 2);
|
||||||
await fs.writeFile('manifest.json', manifestJson);
|
await fs.writeFile(outputFile, manifestJson);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error writing manifest file:', err);
|
console.error(`Error writing manifest file ${outputFile}:`, err);
|
||||||
|
}
|
||||||
|
console.log(`\nSuccessfully created ${outputFile} with ${dataToWrite.length} total plugins`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function processList(sourceFile, outputFile) {
|
||||||
|
const plugins = await getSources(sourceFile);
|
||||||
|
if (plugins.length > 0) {
|
||||||
|
await processDescriptions(plugins);
|
||||||
|
await processImages(plugins);
|
||||||
|
await writeManifest(plugins, outputFile);
|
||||||
}
|
}
|
||||||
console.log(`\nSuccessfully created manifest.json with ${dataToWrite.length} total plugins`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
userAgent = `Jellyfin-Server/${await getLatestJellyfinVersion()}`;
|
userAgent = `Jellyfin-Server/${await getLatestJellyfinVersion()}`;
|
||||||
const plugins = await getSources();
|
await clearImagesFolder();
|
||||||
await processDescriptions(plugins);
|
await processList('sources.txt', 'manifest.json');
|
||||||
await processImages(plugins);
|
await processList('sourcesnsfw.txt', 'manifestnsfw.json');
|
||||||
await writeManifest(plugins);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue