From 933df31a8a40183b03a79a9f5c786b4c4ca3a1c6 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Sun, 11 Apr 2021 16:03:44 +0000
Subject: [PATCH] Hauptmenue aktualisiert
---
src/de/uhilger/mediaz/store/FileStorage.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/de/uhilger/mediaz/store/FileStorage.java b/src/de/uhilger/mediaz/store/FileStorage.java
index ef24e9d..2d768cf 100644
--- a/src/de/uhilger/mediaz/store/FileStorage.java
+++ b/src/de/uhilger/mediaz/store/FileStorage.java
@@ -33,6 +33,7 @@
import java.io.IOException;
import java.util.logging.Logger;
import de.uhilger.mediaz.entity.Entity;
+import de.uhilger.mediaz.entity.Titel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -58,6 +59,7 @@
public static final String ST_ABLAGEORT = "Ablageort";
public static final String ST_EINSTELLUNG = "Einstellung";
public static final String ST_ABSPIELER = "Abspieler";
+ public static final String ST_ABSPIELLISTE = "Abspielliste";
private final String fileBase;
@@ -71,11 +73,13 @@
TypeToken<Einstellung> ttEinstellung = new TypeToken<Einstellung>() {};
TypeToken<Abspieler> ttAbspieler = new TypeToken<Abspieler>() {};
TypeToken<Abspielliste> ttAbspielliste = new TypeToken<Abspielliste>() {};
+ TypeToken<Titel> ttTitel = new TypeToken<Titel>() {};
types = new HashMap();
types.put(Ablageort.class.getSimpleName(), ttAblageort);
types.put(Einstellung.class.getSimpleName(), ttEinstellung);
types.put(Abspieler.class.getSimpleName(), ttAbspieler);
types.put(Abspielliste.class.getSimpleName(), ttAbspielliste);
+ types.put(Titel.class.getSimpleName(), ttTitel);
}
/**
@@ -127,12 +131,13 @@
public Entity entityFromFile(File file) throws ClassNotFoundException, FileNotFoundException, IOException {
String json = readFromFile(file);
+ logger.finer("json: " + json);
Gson gson = new Gson();
return gson.fromJson(json, typeFromName(typeNameFromPath(file)).getType());
}
private String typeNameFromPath(File file) {
- String[] parts = file.getPath().split(App.getRs(Server.RB_SLASH));
+ String[] parts = file.getPath().split(Server.SLASH);
return parts[parts.length-2];
}
--
Gitblit v1.9.3