summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java29
1 files changed, 25 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
index eeda768..9cc8396 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
@@ -1,23 +1,37 @@
package de.bjusystems.vdrmanager.data;
+
+import de.bjusystems.vdrmanager.StringUtils;
+import de.bjusystems.vdrmanager.app.C;
+
import android.os.Parcel;
import android.os.Parcelable;
public class Channel implements Parcelable {
- private final int number;
- private final String name;
- private final String provider;
+ String id;
+ private int number;
+ private String name;
+ private String provider;
+ private String rawAudio;
+
+ public String getRawAudio() {
+ return rawAudio;
+ }
public Channel(final String channelData) {
- String[] words = channelData.split(":");
+ String[] words = StringUtils.splitPreserveAllTokens(channelData, C.DATA_SEPARATOR);
this.number = Integer.valueOf(words[0].substring(1));
if (words.length > 2) {
this.name = words[1];
this.provider = words[2];
+ this.id = words[3];
+ this.rawAudio = words[4];
} else {
this.name = words[1];
+ this.id = "-1";
this.provider = "Unknown";
+ this.rawAudio = "";
}
}
@@ -25,12 +39,16 @@ public class Channel implements Parcelable {
this.number = 0;
this.name = "Unknown";
this.provider = "Unknown";
+ this.id = "Uknwon";
+ this.rawAudio = "";
}
public Channel(Parcel in) {
this.number = in.readInt();
this.name = in.readString();
this.provider = in.readString();
+ this.id = in.readString();
+ this.rawAudio = in.readString();
}
public boolean isGroupSeparator() {
@@ -68,6 +86,9 @@ public class Channel implements Parcelable {
dest.writeInt(number);
dest.writeString(name);
dest.writeString(provider);
+ dest.writeString(id);
+ dest.writeString(rawAudio);
+
}
public static final Parcelable.Creator<Channel> CREATOR = new Parcelable.Creator<Channel>() {