1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed multiple OBSOLETE marks in channels that are not listed in the SDT in case "Setup/Miscellaneous/Show channel names with source" is set to "yes"

This commit is contained in:
Klaus Schmidinger 2015-01-04 15:11:13 +01:00
parent 761fb103b7
commit aacdeba5d9
2 changed files with 6 additions and 1 deletions

View File

@ -8329,3 +8329,5 @@ Video Disk Recorder Revision History
with the OctopusNet receiver via the 'satip' plugin). with the OctopusNet receiver via the 'satip' plugin).
- Channels that are not listed in the SDT are now only marked as OBSOLETE if - Channels that are not listed in the SDT are now only marked as OBSOLETE if
"Setup/DVB/Update channels" is set to a value other than "no" or "PIDs only". "Setup/DVB/Update channels" is set to a value other than "no" or "PIDs only".
- Fixed multiple OBSOLETE marks in channels that are not listed in the SDT in case
"Setup/Miscellaneous/Show channel names with source" is set to "yes".

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: channels.c 3.5 2014/03/10 13:14:02 kls Exp $ * $Id: channels.c 3.6 2015/01/04 15:02:21 kls Exp $
*/ */
#include "channels.h" #include "channels.h"
@ -1040,8 +1040,11 @@ void cChannels::MarkObsoleteChannels(int Source, int Nid, int Tid)
{ {
for (cChannel *channel = First(); channel; channel = Next(channel)) { for (cChannel *channel = First(); channel; channel = Next(channel)) {
if (time(NULL) - channel->Seen() > CHANNELTIMEOBSOLETE && channel->Source() == Source && channel->Nid() == Nid && channel->Tid() == Tid && channel->Rid() == 0) { if (time(NULL) - channel->Seen() > CHANNELTIMEOBSOLETE && channel->Source() == Source && channel->Nid() == Nid && channel->Tid() == Tid && channel->Rid() == 0) {
bool OldShowChannelNamesWithSource = Setup.ShowChannelNamesWithSource;
Setup.ShowChannelNamesWithSource = false;
if (!endswith(channel->Name(), CHANNELMARKOBSOLETE)) if (!endswith(channel->Name(), CHANNELMARKOBSOLETE))
channel->SetName(cString::sprintf("%s %s", channel->Name(), CHANNELMARKOBSOLETE), channel->ShortName(), cString::sprintf("%s %s", CHANNELMARKOBSOLETE, channel->Provider())); channel->SetName(cString::sprintf("%s %s", channel->Name(), CHANNELMARKOBSOLETE), channel->ShortName(), cString::sprintf("%s %s", CHANNELMARKOBSOLETE, channel->Provider()));
Setup.ShowChannelNamesWithSource = OldShowChannelNamesWithSource;
} }
} }
} }