1
0

Gronkh Suche: Update-Info in separate Datei

This commit is contained in:
Akamaru 2025-03-23 19:19:28 +01:00
parent c18989334c
commit 4223cef434
8 changed files with 20 additions and 25 deletions

View File

@ -360,15 +360,25 @@
return allGames[channel]; // Cache nutzen, wenn Daten bereits geladen sind
}
// Lade die Spieldaten
const response = await fetch(channels[channel]);
if (!response.ok) {
throw new Error(`Fehler beim Laden der ${channel} Spieldaten`);
}
const data = await response.json();
// Aktualisiere das Datum in der UI
if (data.updateInfo && data.updateInfo.lastUpdated) {
document.getElementById('update-info').textContent = `Spieleliste zuletzt aktualisiert am ${data.updateInfo.lastUpdated}`;
// Lade die Update-Informationen aus der separaten Datei
try {
const updateResponse = await fetch('json/update_info.json');
if (updateResponse.ok) {
const updateData = await updateResponse.json();
if (updateData.lastUpdated) {
document.getElementById('update-info').textContent =
`Spieleliste zuletzt aktualisiert am ${updateData.lastUpdated}`;
}
}
} catch (updateError) {
console.error('Fehler beim Laden der Update-Informationen:', updateError);
}
// Speichere die Playlists

View File

@ -1,12 +1,9 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "Assassin's Creed Shadows",
"url": "https://www.youtube.com/playlist?list=PLGWGc5dfbzn8Du_mBID_AjnosTuxnLWTg",
"videoCount": 3
"videoCount": 7
},
{
"title": "Hotel Architect (Demo)",
@ -81,7 +78,7 @@
{
"title": "SONS OF THE FOREST - Tobi und Erik retten den Wald (Staffel 2)",
"url": "https://www.youtube.com/playlist?list=PLGWGc5dfbzn-EfqKIiG2npjCJwa1JOU8G",
"videoCount": 112
"videoCount": 117
},
{
"title": "Liminalcore",

View File

@ -1,7 +1,4 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "Sim City [PC] [1989]",

View File

@ -1,7 +1,4 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "ELEX 2",

View File

@ -1,7 +1,4 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "#MiMO: Minecraft Monday",

View File

@ -1,7 +1,4 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "Let's Sing",

View File

@ -1,12 +1,9 @@
{
"updateInfo": {
"lastUpdated": "20.03.2025"
},
"playlists": [
{
"title": "Assassin's Creed Shadows",
"url": "https://www.youtube.com/playlist?list=PLGWGc5dfbzn8Du_mBID_AjnosTuxnLWTg",
"videoCount": 3
"videoCount": 7
},
{
"title": "Hotel Architect (Demo)",
@ -81,7 +78,7 @@
{
"title": "SONS OF THE FOREST - Tobi und Erik retten den Wald (Staffel 2)",
"url": "https://www.youtube.com/playlist?list=PLGWGc5dfbzn-EfqKIiG2npjCJwa1JOU8G",
"videoCount": 112
"videoCount": 117
},
{
"title": "Liminalcore",

View File

@ -0,0 +1,3 @@
{
"lastUpdated": "23.03.2025"
}