summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
index 079fcf0..f9ca15a 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Epg.java
@@ -2,6 +2,12 @@ package de.bjusystems.vdrmanager.data;
import java.util.Date;
+
+import de.bjusystems.vdrmanager.StringUtils;
+import de.bjusystems.vdrmanager.app.C;
+
+import static de.bjusystems.vdrmanager.gui.Utils.mapSpecialChars;
+
/**
* Class for EPG events
* @author bju
@@ -11,14 +17,14 @@ public class Epg extends BaseEvent {
private Timer timer;
public Epg(final String line) {
- final String[] words = line.split(":");
+ final String[] words = StringUtils.splitPreserveAllTokens(line, C.DATA_SEPARATOR);
channelNumber = words[0].substring(1);
channelName = words[1];
start = new Date(Long.parseLong(words[2])*1000);
stop = new Date(Long.parseLong(words[3])*1000);
- title = words[4];
- description = words.length > 5 ? words[5] : "";
- shortText = words.length > 6 ? words[6] : "";
+ title = mapSpecialChars(words[4]);
+ description = words.length > 5 ? mapSpecialChars(words[5]): "";
+ shortText = words.length > 6 ? mapSpecialChars(words[6]) : "";
}