mirror of
https://github.com/0belous/universal-plugin-repo.git
synced 2026-03-22 01:36:53 -03:00
always use latest jellyfin user agent
This commit is contained in:
parent
62db052e69
commit
006b9f1c1b
2 changed files with 12 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ https://app.lizardbyte.dev/jellyfin-plugin-repo/manifest.json
|
||||||
https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/manifest/manifest.json
|
https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/manifest/manifest.json
|
||||||
https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest.json
|
https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest.json
|
||||||
https://github.com/lachlandcp/jellyfin-editors-choice-plugin/raw/main/manifest.json
|
https://github.com/lachlandcp/jellyfin-editors-choice-plugin/raw/main/manifest.json
|
||||||
|
https://intro-skipper.org/manifest.json
|
||||||
https://jellyfin-repo.jesseward.com/manifest.json
|
https://jellyfin-repo.jesseward.com/manifest.json
|
||||||
https://kookxiang.github.io/jellyfin-plugin-bangumi/repository.json
|
https://kookxiang.github.io/jellyfin-plugin-bangumi/repository.json
|
||||||
https://noonamer.github.io/Jellyfin.Plugin.LocalPosters/repository.json
|
https://noonamer.github.io/Jellyfin.Plugin.LocalPosters/repository.json
|
||||||
|
|
@ -22,7 +23,6 @@ https://raw.githubusercontent.com/G-grbz/Jellyfin-MonWUI-Plugin/main/manifest.js
|
||||||
https://raw.githubusercontent.com/GrandguyJS/media-upload-plugin/main/manifest.json
|
https://raw.githubusercontent.com/GrandguyJS/media-upload-plugin/main/manifest.json
|
||||||
https://raw.githubusercontent.com/iankiller77/MyAnimeSync/main/manifest.json
|
https://raw.githubusercontent.com/iankiller77/MyAnimeSync/main/manifest.json
|
||||||
https://raw.githubusercontent.com/ImLacy/Jellyfin-CustomLogo/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/ImLacy/Jellyfin-CustomLogo/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/intro-skipper/manifest/refs/heads/main/10.11/manifest.json
|
|
||||||
https://raw.githubusercontent.com/johnpc/jellyfin-plugin-smart-collections/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/johnpc/jellyfin-plugin-smart-collections/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/johnpc/jellyfin-plugin-top-ten/refs/heads/main/manifest.json
|
https://raw.githubusercontent.com/johnpc/jellyfin-plugin-top-ten/refs/heads/main/manifest.json
|
||||||
https://raw.githubusercontent.com/jon4hz/jellyfin-plugin-jellysleep/main/manifest.json
|
https://raw.githubusercontent.com/jon4hz/jellyfin-plugin-jellysleep/main/manifest.json
|
||||||
|
|
|
||||||
13
update.js
13
update.js
|
|
@ -1,11 +1,20 @@
|
||||||
const fs = require('fs/promises');
|
const fs = require('fs/promises');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const userAgent = "Jellyfin-Server/10.11.4"; // Required for some repositories
|
let userAgent = "Jellyfin-Server/10.11.4"; // Required for some repositories
|
||||||
|
|
||||||
const imagesDir = path.join(__dirname, 'images');
|
const imagesDir = path.join(__dirname, 'images');
|
||||||
const imageBaseUrl = 'https://raw.githubusercontent.com/0belous/universal-plugin-repo/refs/heads/main/images/';
|
const imageBaseUrl = 'https://raw.githubusercontent.com/0belous/universal-plugin-repo/refs/heads/main/images/';
|
||||||
|
|
||||||
|
async function getLatestJellyfinVersion() {
|
||||||
|
const response = await fetch('https://api.github.com/repos/jellyfin/jellyfin/releases/latest', {
|
||||||
|
headers: { 'User-Agent': 'Node-Fetch' }
|
||||||
|
});
|
||||||
|
if (!response.ok) throw new Error();
|
||||||
|
const data = await response.json();
|
||||||
|
return data.tag_name.replace('v', '');
|
||||||
|
}
|
||||||
|
|
||||||
async function getSources(){
|
async function getSources(){
|
||||||
let sources = [];
|
let sources = [];
|
||||||
try {
|
try {
|
||||||
|
|
@ -146,10 +155,10 @@ async function writeManifest(dataToWrite){
|
||||||
console.error('Error writing manifest file:', err);
|
console.error('Error writing manifest file:', err);
|
||||||
}
|
}
|
||||||
console.log(`\nSuccessfully created manifest.json with ${dataToWrite.length} total plugins`);
|
console.log(`\nSuccessfully created manifest.json with ${dataToWrite.length} total plugins`);
|
||||||
console.log('Manifest updated with new image URLs.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
userAgent = `Jellyfin-Server/${await getLatestJellyfinVersion()}`;
|
||||||
const plugins = await getSources();
|
const plugins = await getSources();
|
||||||
await processDescriptions(plugins);
|
await processDescriptions(plugins);
|
||||||
await processImages(plugins);
|
await processImages(plugins);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue