Ticket #1203: channel-import.patch
File channel-import.patch, 2.1 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/dvbconfparser.cpp
156 156 if (i == end || !c.modulation.parseConf(*i++)) return false; 157 157 // We need the program number in the transport stream, 158 158 // otherwise we cannot "tune" to the program. 159 if (i == end ) return false; else i++; // Ignore video pid 160 if (i == end ) return false; else i++; // Ignore audio pid 159 161 if (i != end) c.serviceid = (*i++).toInt(); else return false; 160 162 161 163 channels.append(c); … … 458 460 ":NAME,:MPLEXID,:SERVICEID);"); 459 461 460 462 query.bindValue(":CHANID",generateNewChanID(sourceid)); 461 query.bindValue(":CHANNUM",(*iter).lcn==-1 ? (*iter).serviceid:(*iter).lcn); 463 // If the channel number is unknown, leave it at 0, 464 // possibly to be filled later by mythfilldatabase. 465 query.bindValue(":CHANNUM", (*iter).lcn==-1 ? 0 : (*iter).lcn); 462 466 query.bindValue(":SOURCEID",sourceid); 463 467 query.bindValue(":CALLSIGN",(*iter).name.utf8()); 464 468 query.bindValue(":NAME",(*iter).name.utf8()); -
programs/mythfilldatabase/filldata.cpp
842 842 // First check if channel already in DB, but without xmltvid 843 843 query.prepare("SELECT chanid FROM channel " 844 844 "WHERE sourceid = :SOURCEID AND " 845 " (channum=:CHANNUM OR atscsrcid=:ATSCSRCID)"); 845 " (callsign = :CALLSIGN OR " 846 " channum = :CHANNUM OR " 847 " atscsrcid = :ATSCSRCID)"); 846 848 query.bindValue(":SOURCEID", source.id); 849 query.bindValue(":CALLSIGN", callsign); 847 850 query.bindValue(":CHANNUM", channum); 848 851 query.bindValue(":ATSCSRCID", atscsrcid); 849 852