﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
3302	Do not update mfdb min/max hour for MythFillGrabberSuggestsTime	sphery <mtdean@…>	cpinkham	"Currently, after getting a next suggested run time from DataDirect, mythfilldatabase will set the MythFillMinHour to the hour during which the suggested run time occurs and the MythFillMaxHour to 2 hours later than the new MythFillMinHour.  For users who shut down their systems, this can mean missing one or more mythfilldatabase runs.

For example, if DataDirect provides a next suggested run time of 08:30 on some day, mfdb will set the MythFillMinHour to 8 and the MythFillMaxHour to 10.  If the user shuts down the Myth system (i.e. using mythshutdown or just manually) for the period from 08:00 to 11:00, mythfilldatabase will not be allowed to run that day.  If the user typically shuts down the myth system during the work day, this could mean that mfdb will never automatically run again.  This has prompted some users to create their own run scripts and/or cron jobs rather than using the provider's suggested run time.

Since the housekeeper checks to verify that the suggested run time is before the current time, changing the MythFillMinHour and MythFillMaxHour in this way does not help, but can actually cause harm.  Therefore, I recommend removing the code that modifies the min/max hours.  To ensure this works properly, we need to also modify the MythFillMinHour to be -1 (which the housekeeper takes to mean MythFillMinHour=0 and MythFillMaxHour=24) for those users using MythFillGrabberSuggestsTime.

The attached patches make these changes.  The patch mythtv-DataDirect-no_update_min_max_hour.patch removes the code changing the min/max hours and mythtv-DataDirect-no_update_min_max_hour-dbcheck.patch changes MythFillMinHour to -1 if MythFillGrabberSuggestsTime = 1.  The dbcheck patch is separate so users wanting to update the DataDirect behavior can do so without worrying about DBSchemaVer.  It won't hurt if the dbcheck update is applied multiple times.

If you prefer for mfdb to simply update MythFillMinHour to -1 every time (and not do a one-time change in dbcheck), please let me know.  This approach has the benefit that users who turn on MythFillGrabberSuggestsTime after specifying their own times will not have to also change MythFillMinHour.  I only chose the dbcheck approach because setting and resetting MythFillMinHour to -1 every single day seemed overkill.

See, also, the thread at http://www.gossamer-threads.com/lists/mythtv/users/263209#263209 for discussion of the issue."	patch	closed	minor	unknown	mythfilldatabase	head	medium	fixed			0
