X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/98c7a787df63a93f868548c2b1e357c0d873ebbe..72e36c763566033b8ef325b49d6efe60cf8d3757:/lib/dvb/scan.cpp diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index b37aa714..fb6f2048 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,8 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug) if (m_channel->getDemux(m_demux)) SCAN_eDebug("scan: failed to allocate demux!"); m_channel->connectStateChange(slot(*this, &eDVBScan::stateChange), m_stateChanged_connection); - FILE *f = fopen("/etc/enigma2/scan_tp_valid_check.py", "r"); + std::string filename = eEnv::resolve("${sysconfdir}/scan_tp_valid_check.py"); + FILE *f = fopen(filename.c_str(), "r"); if (f) { char code[16384]; @@ -37,7 +39,7 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug) if (rd) { code[rd]=0; - m_additional_tsid_onid_check_func = Py_CompileString(code, "/etc/enigma2/scan_tp_valid_check.py", Py_file_input); + m_additional_tsid_onid_check_func = Py_CompileString(code, filename.c_str(), Py_file_input); } fclose(f); } @@ -191,9 +193,9 @@ RESULT eDVBScan::nextChannel() if (m_ch_toScan.empty()) { SCAN_eDebug("no channels left to scan."); - SCAN_eDebug("%d channels scanned, %d were unavailable.", + SCAN_eDebug("%zd channels scanned, %zd were unavailable.", m_ch_scanned.size(), m_ch_unavailable.size()); - SCAN_eDebug("%d channels in database.", m_new_channels.size()); + SCAN_eDebug("%zd channels in database.", m_new_channels.size()); m_event(evtFinish); return -ENOENT; }