From patchwork Sat Jul 21 15:04:09 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12490 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1ICGV9-00044A-HA for vdr@linuxtv.org; Sat, 21 Jul 2007 17:04:11 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id l6LF4AgL029231 for ; Sat, 21 Jul 2007 17:04:10 +0200 Message-ID: <46A22069.5090702@cadsoft.de> Date: Sat, 21 Jul 2007 17:04:09 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: vdr@linuxtv.org References: <20070704214409.tp5zweom8kcgw8oc@webmail.df.eu> In-Reply-To: <20070704214409.tp5zweom8kcgw8oc@webmail.df.eu> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 21 Jul 2007 17:04:10 +0200 (CEST) Subject: Re: [vdr] Premiere NVOD Channels fix X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 15:04:11 -0000 Status: O X-Status: X-Keywords: X-UID: 13564 On 07/04/07 21:44, vdr@minivdr.de wrote: > Hello @all, > > Fix Premiere NVOD Channels. > > Link for new Channels over TransponderID added. Please verify whether the attached, slightly modified version also works. The diff is against VDR 1.5.5, but it should also work with version 1.4.7. Also, please provide a real name for the VDR/CONTRIBUTORS file. Klaus --- channels.c 2006/05/28 15:03:40 1.53 +++ channels.c 2007/07/21 14:55:01 @@ -1007,6 +1007,17 @@ } return NULL; } +cChannel *cChannels::GetByTransponderID(tChannelID ChannelID) +{ + int source = ChannelID.Source(); + int nid = ChannelID.Nid(); + int tid = ChannelID.Tid(); + for (cChannel *channel = First(); channel; channel = Next(channel)) { + if (channel->Tid() == tid && channel->Nid() == nid && channel->Source() == source) + return channel; + } + return NULL; +} bool cChannels::HasUniqueChannelID(cChannel *NewChannel, cChannel *OldChannel) { --- channels.h 2007/01/05 10:37:35 1.43 +++ channels.h 2007/07/21 14:58:36 @@ -239,6 +239,7 @@ cChannel *GetByNumber(int Number, int SkipGap = 0); cChannel *GetByServiceID(int Source, int Transponder, unsigned short ServiceID); cChannel *GetByChannelID(tChannelID ChannelID, bool TryWithoutRid = false, bool TryWithoutPolarization = false); + cChannel *GetByTransponderID(tChannelID ChannelID); int BeingEdited(void) { return beingEdited; } void IncBeingEdited(void) { beingEdited++; } void DecBeingEdited(void) { beingEdited--; } --- eit.c 2007/06/10 12:51:05 1.123 +++ eit.c 2007/07/21 14:58:04 @@ -197,7 +197,10 @@ link->SetName(linkName, "", ""); } else if (Setup.UpdateChannels >= 4) { - link = Channels.NewChannel(channel, linkName, "", "", ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); + cChannel *transponder = channel; + if (channel->Tid() != ld->getTransportStreamId()) + channel = Channels.GetByTransponderID(linkID); + link = Channels.NewChannel(transponder, linkName, "", "", ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); //XXX patFilter->Trigger(); } if (link) {