summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src')
-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();