diff options
Diffstat (limited to 'vdr-vdrmanager/helpers.cpp')
-rw-r--r-- | vdr-vdrmanager/helpers.cpp | 30 |
1 files changed, 30 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); |