From aa70e58f29c729adf3cdeb76af05e847736a0d19 Mon Sep 17 00:00:00 2001 From: lado Date: Wed, 26 Oct 2011 14:53:33 +0200 Subject: mapSpecialChars --- .../src/de/bjusystems/vdrmanager/data/Recording.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'vdrmanager/src') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java index 75fe9af..378ec00 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java @@ -3,19 +3,24 @@ 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; + public class Recording extends BaseEvent{ public Recording(String line) { - final String[] words = line.split(":"); + final String[] words = StringUtils.splitPreserveAllTokens(line, C.DATA_SEPARATOR); int idx = 0; index = Integer.valueOf(words[idx++]); start = new Date(Long.parseLong(words[idx++]) * 1000); stop = new Date(Long.parseLong(words[idx++]) * 1000); - channelName = words[idx++]; - title = words[idx++]; - shortText = words[idx++]; - description = words[idx++]; - fileName = words[idx++]; + channelName = mapSpecialChars(words[idx++]); + title = mapSpecialChars(words[idx++]); + shortText = mapSpecialChars(words[idx++]); + description = mapSpecialChars(words[idx++]); + fileName = mapSpecialChars(words[idx++]); fileSize = Integer.valueOf(words[idx++]); } -- cgit v1.2.3