summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-10-26 14:53:46 +0200
committerlado <herrlado@gmail.com>2011-10-26 14:53:46 +0200
commit8f82f87eec5703d5c1a0447271f7815952ad8293 (patch)
tree3b171cdff9cb0617ef23cda50ac299e71217619c
parentaa70e58f29c729adf3cdeb76af05e847736a0d19 (diff)
downloadvdr-manager-8f82f87eec5703d5c1a0447271f7815952ad8293.tar.gz
vdr-manager-8f82f87eec5703d5c1a0447271f7815952ad8293.tar.bz2
audio added
-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>() {