[mythtv-users] xmltv and dtv ppv

Ben Curtis fmstratk at coronium.com
Fri Dec 12 16:04:24 EST 2003


That enough acronyms for you? :)

I've been having an issue where mythfilldatabase puts in just PPV's for 
days that are well in advance.  I'm thinking it's because XMLTV is 
updating only those, then later adding the rest of the programs.  The 
problem it causes is that mythfilldatabase now sees program information 
for those channels, and does not do the full update until the night before 
that particular day.  I've made a script that run's before mythfill as a 
temp workaround, if anyone else is having this issue.  It checks up to 30 
days from current day.


Ben


C=0;
while [ $C -lt 30 ]; do
	C2=`echo $C+1 | bc`
	DTE="`date +"%G%m%d"`000000"
	Q="select count(*) from program where starttime >= date_add('${DTE}', interval $C day) and starttime < date_add('${DTE}', interval $C2 day) and chanid = 1296";
	echo $Q > /opt/local/fixDTV/q.sql
	ABOVE200=`/usr/bin/mysql -s -u root mythconverg < /opt/local/fixDTV/q.sql`
	if [ $ABOVE200 = 0 ]; then
		Q="select count(*) from program where starttime >= date_add('${DTE}', interval $C day) and starttime < date_add('${DTE}', interval $C2 day) and chanid < 1199";
		echo $Q > /opt/local/fixDTV/q.sql
		BELOW200=`/usr/bin/mysql -s -u root mythconverg < /opt/local/fixDTV/q.sql`
		if [ $BELOW200 -gt 0 ]; then
			echo "Day $C had the error, deleting.";
			Q="delete from program where starttime >= date_add('${DTE}', interval $C day) and starttime < date_add('${DTE}', interval $C2 day)";
			echo $Q > /opt/local/fixDTV/q.sql
			EXECU=`/usr/bin/mysql -s -u root mythconverg < /opt/local/fixDTV/q.sql`
		fi;
	fi;
	C=$C2
done;

rm /opt/local/fixDTV/q.sql



More information about the mythtv-users mailing list