Gronkh Suche: Update-Info in separate Datei
This commit is contained in:
parent
c18989334c
commit
4223cef434
@ -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
|
||||
|
@ -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",
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"updateInfo": {
|
||||
"lastUpdated": "20.03.2025"
|
||||
},
|
||||
"playlists": [
|
||||
{
|
||||
"title": "Sim City [PC] [1989]",
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"updateInfo": {
|
||||
"lastUpdated": "20.03.2025"
|
||||
},
|
||||
"playlists": [
|
||||
{
|
||||
"title": "ELEX 2",
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"updateInfo": {
|
||||
"lastUpdated": "20.03.2025"
|
||||
},
|
||||
"playlists": [
|
||||
{
|
||||
"title": "#MiMO: Minecraft Monday",
|
||||
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"updateInfo": {
|
||||
"lastUpdated": "20.03.2025"
|
||||
},
|
||||
"playlists": [
|
||||
{
|
||||
"title": "Let's Sing",
|
||||
|
@ -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",
|
||||
|
3
gronkh_games/json/update_info.json
Normal file
3
gronkh_games/json/update_info.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"lastUpdated": "23.03.2025"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user