summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-06-13 14:48:41 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-06-13 14:48:41 +0200
commit263dc295089a2accc385c87c23b177314d65acea (patch)
tree9e3ec03a06e01758eec7863ec17d3fb8cbcf589e /vdr.c
parent61a9b0940378e395915048d7021706aa51714556 (diff)
downloadvdr-263dc295089a2accc385c87c23b177314d65acea.tar.gz
vdr-263dc295089a2accc385c87c23b177314d65acea.tar.bz2
The initial channel is now stored by the channel ID in the setup.conf file
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index 34560e75..ad86f5a8 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 2.20 2010/12/12 13:42:00 kls Exp $
+ * $Id: vdr.c 2.21 2011/06/13 14:40:12 kls Exp $
*/
#include <getopt.h>
@@ -704,8 +704,12 @@ int main(int argc, char *argv[])
if (!cDevice::WaitForAllDevicesReady(DEVICEREADYTIMEOUT))
dsyslog("not all devices ready after %d seconds", DEVICEREADYTIMEOUT);
- if (Setup.InitialChannel > 0)
- Setup.CurrentChannel = Setup.InitialChannel;
+ if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files
+ if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel)))
+ Setup.InitialChannel = Channel->GetChannelID().ToString();
+ }
+ if (cChannel *Channel = Channels.GetByChannelID(tChannelID::FromString(Setup.InitialChannel)))
+ Setup.CurrentChannel = Channel->Number();
if (Setup.InitialVolume >= 0)
Setup.CurrentVolume = Setup.InitialVolume;
Channels.SwitchTo(Setup.CurrentChannel);