summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vdr-vdrmanager/helpers.cpp30
-rw-r--r--vdr-vdrmanager/helpers.h1
2 files changed, 31 insertions, 0 deletions
diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp
index 7a4ec47..a20fc98 100644
--- a/vdr-vdrmanager/helpers.cpp
+++ b/vdr-vdrmanager/helpers.cpp
@@ -125,6 +125,11 @@ string cHelpers::GetChannelsIntern(string wantedChannels) {
result += channel->Name();
result += ":";
result += channel->Provider();
+ result += ":";
+ result += channel->GetChannelID().ToString();
+ result += ":";
+ result += GetAudioTracks(channel);
+ result += ":";
result += "\r\n";
}
}
@@ -132,6 +137,31 @@ string cHelpers::GetChannelsIntern(string wantedChannels) {
return result + "END\r\n";
}
+string cHelpers::GetAudioTracks(const cChannel* channel){
+
+ string result = "";
+ int count = 0;
+ for (int i = 0; channel->Apid(i) != 0; ++i, ++count)
+ ;
+ for (int i = 0; channel->Dpid(i) != 0; ++i, ++count)
+ ;
+
+ if (count > 1)
+ {
+ int index = 1;
+ string sep = "";
+ for (int i = 0; channel->Apid(i) != 0; ++i, ++index) {
+ result += sep +"a,"+(const char*)itoa(index) + "," + channel->Alang(i);
+ sep = "|";
+ }
+ for (int i = 0; channel->Dpid(i) != 0; ++i, ++index) {
+ result += sep + "d," + (const char*)itoa(index) + "," + channel->Dlang(i);
+ }
+ sep = "|";
+ }
+ return result;
+}
+
string cHelpers::GetEventsIntern(string wantedChannels, string when) {
when = ToUpper(when);
diff --git a/vdr-vdrmanager/helpers.h b/vdr-vdrmanager/helpers.h
index 4da5cca..a57d634 100644
--- a/vdr-vdrmanager/helpers.h
+++ b/vdr-vdrmanager/helpers.h
@@ -40,4 +40,5 @@ private:
static string ToText(const cEvent * event);
static string ToText(cTimer * timer);
static string ToText(cRecording * recording);
+ static string GetAudioTracks(const cChannel* channel);
};