Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implement fuzzy matching of channels for EIT.

Refs #10784. First try to find the channel using the full
NetID, TransportID, ServiceID. If that fails try again using
just NetID, ServiceID.

We can extend this further using some of the other ideas in
this ticket.
  • Loading branch information...
commit b4110ae5f6a744b768711e4926439b83b201e105 1 parent af9400c
@stuarta stuarta authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 mythtv/libs/libmythtv/eithelper.cpp
View
17 mythtv/libs/libmythtv/eithelper.cpp
@@ -723,6 +723,23 @@ static uint get_chan_id_from_db(uint sourceid, uint serviceid,
if (!query.exec() || !query.isActive())
MythDB::DBError("Looking up chanID", query);
+ if (query.size() == 0) {
+ // Attempt fuzzy matching, by skipping the tsid
+ // DVB Link to chanid
+ QString qstr =
+ "SELECT chanid, useonairguide, channel.sourceid "
+ "FROM channel, dtv_multiplex "
+ "WHERE serviceid = :SERVICEID AND "
+ " networkid = :NETWORKID AND "
+ " channel.mplexid = dtv_multiplex.mplexid";
+
+ query.prepare(qstr);
+ query.bindValue(":SERVICEID", serviceid);
+ query.bindValue(":NETWORKID", networkid);
+ if (!query.exec() || !query.isActive())
+ MythDB::DBError("Looking up chanID in fuzzy mode", query);
+ }
+
while (query.next())
{
// Check to see if we are interested in this channel
Please sign in to comment.
Something went wrong with that request. Please try again.