summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-11-15 09:54:09 +0100
committerlado <herrlado@gmail.com>2011-11-15 09:54:09 +0100
commit97ea54b5cf3743198910a158ff820abd3002edbd (patch)
treefc38d364a5a52c94a0dde52d9a562a7a66f414a9 /vdrmanager
parentbd6186b2aaf249ed0de020c36810edf5c75c7428 (diff)
downloadvdr-manager-97ea54b5cf3743198910a158ff820abd3002edbd.tar.gz
vdr-manager-97ea54b5cf3743198910a158ff820abd3002edbd.tar.bz2
each channel gets not a group
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java9
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java6
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java8
3 files changed, 19 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
index 15f8552..e67e93b 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Channel.java
@@ -14,6 +14,15 @@ public class Channel implements Parcelable {
private String name;
private String provider;
private String rawAudio;
+ private String group;
+
+ public String getGroup() {
+ return group;
+ }
+
+ public void setGroup(String group) {
+ this.group = group;
+ }
public String getRawAudio() {
return rawAudio;
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java
index 69d31fd..008e249 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelAdapter.java
@@ -100,10 +100,12 @@ class ChannelAdapter extends BaseExpandableListAdapter implements Filterable// ,
}
itemHolder.name.setText(name);
- if (groupBy != ChannelListActivity.MENU_PROVIDER) {
+ if (groupBy == ChannelListActivity.MENU_PROVIDER) {
+ itemHolder.aux.setText(item.getGroup());
+ } else if(groupBy == ChannelListActivity.MENU_GROUP) {
itemHolder.aux.setText(item.getProvider());
} else {
- itemHolder.aux.setText("");
+ itemHolder.aux.setText(item.getProvider());
}
return view;
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java
index 6f394de..e367bd6 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java
@@ -101,10 +101,12 @@ public class ChannelClient extends SvdrpClient<Channel> implements
}
ArrayList<Channel> currentChannels = new ArrayList<Channel>();
-
+ String currentGroup;
+
private void received(Channel c) {
if (c.isGroupSeparator()) {
- channelGroups.add(c.getName());
+ currentGroup = c.getName();
+ channelGroups.add(currentGroup);
currentChannels = new ArrayList<Channel>();
groupChannels.put(c.getName(), currentChannels);
} else {
@@ -112,6 +114,8 @@ public class ChannelClient extends SvdrpClient<Channel> implements
channelGroups.add("");
groupChannels.put("", currentChannels);
}
+
+ c.setGroup(currentGroup);
channels.add(c);
currentChannels.add(c);
String provider = c.getProvider();