diff --git a/mythtv/libs/libmythtv/channelscan/channelimporter.cpp b/mythtv/libs/libmythtv/channelscan/channelimporter.cpp index ebbc5809e02..98fc899d264 100644 --- a/mythtv/libs/libmythtv/channelscan/channelimporter.cpp +++ b/mythtv/libs/libmythtv/channelscan/channelimporter.cpp @@ -858,7 +858,7 @@ ScanDTVTransportList ChannelImporter::GetDBTransports( ChannelInsertInfo &chan = transports[i].channels[j]; for (uint k = 0; k < newt.channels.size(); k++) { - if (newt.channels[k].IsSameChannel(chan)) + if (newt.channels[k].IsSameChannel(chan, true)) { found_chan[k] = true; chan.db_mplexid = mplexid; diff --git a/mythtv/libs/libmythtv/dbchannelinfo.cpp b/mythtv/libs/libmythtv/dbchannelinfo.cpp index 09d9a1457f8..2e9086a2003 100644 --- a/mythtv/libs/libmythtv/dbchannelinfo.cpp +++ b/mythtv/libs/libmythtv/dbchannelinfo.cpp @@ -396,7 +396,8 @@ void ChannelInsertInfo::ImportExtraInfo(const ChannelInsertInfo &other) orig_netid = other.orig_netid; if (other.netid && !netid) netid = other.netid; - if (!other.si_standard.isEmpty() && si_standard.isEmpty()) + if (!other.si_standard.isEmpty() && + (si_standard.isEmpty() || ("mpeg" == si_standard))) { si_standard = other.si_standard; si_standard.detach(); } @@ -426,7 +427,8 @@ void ChannelInsertInfo::ImportExtraInfo(const ChannelInsertInfo &other) decryption_status = other.decryption_status; } -bool ChannelInsertInfo::IsSameChannel(const ChannelInsertInfo &other) const +bool ChannelInsertInfo::IsSameChannel( + const ChannelInsertInfo &other, bool relaxed) const { if (atsc_major_channel && (atsc_major_channel == other.atsc_major_channel) && @@ -444,6 +446,17 @@ bool ChannelInsertInfo::IsSameChannel(const ChannelInsertInfo &other) const (pat_tsid == other.pat_tsid) && (service_id == other.service_id)) return true; + if (relaxed) + { + if (("mpeg" == si_standard || "mpeg" == other.si_standard || + "dvb" == si_standard || "dvb" == other.si_standard || + si_standard.isEmpty() || other.si_standard.isEmpty()) && + (service_id == other.service_id)) + { + return true; + } + } + return false; } diff --git a/mythtv/libs/libmythtv/dbchannelinfo.h b/mythtv/libs/libmythtv/dbchannelinfo.h index 6e62bd29c05..3e4b6ea93b2 100644 --- a/mythtv/libs/libmythtv/dbchannelinfo.h +++ b/mythtv/libs/libmythtv/dbchannelinfo.h @@ -129,7 +129,7 @@ class MTV_PUBLIC ChannelInsertInfo ChannelInsertInfo(const ChannelInsertInfo &other) { (*this = other); } ChannelInsertInfo &operator=(const ChannelInsertInfo &other); - bool IsSameChannel(const ChannelInsertInfo&) const; + bool IsSameChannel(const ChannelInsertInfo&, bool relaxed = false) const; bool SaveScan(uint scanid, uint transportid) const;