diff --git a/setup.c b/setup.c index 43a0479..c0b2e69 100644 --- a/setup.c +++ b/setup.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: setup.c,v 1.17 2007/10/01 15:30:22 ajhseppa Exp $ + * $Id: setup.c,v 1.18 2007/10/01 15:38:44 ajhseppa Exp $ */ #include @@ -205,7 +205,7 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key) cChannel newchannel; SetChannelData(&newchannel); bool uniquityFailed = false; - bool firstIteration = true; + bool firstIncrement = true; // Search for identical channels as these will be ignored by vdr for (cChannel *iteratorChannel = Channels.First(); iteratorChannel; iteratorChannel = Channels.Next(iteratorChannel)) { @@ -227,12 +227,12 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key) iteratorChannel->SetId(iteratorChannel->Nid(), iteratorChannel->Tid(), iteratorChannel->Sid(), - firstIteration ? + firstIncrement ? 0 : iteratorChannel->Rid() + 1); - // The first iteration prevents Rid:s from creeping slowly - // towards maximum value because they are always zeroed first - firstIteration = false; + // Try zero Rid:s at first increment. Prevents them from + // creeping slowly towards their maximum value + firstIncrement = false; // Re-set the search and start again iteratorChannel = Channels.First();