Myth Recording Extender
~~~~~~~~~~~~~~~~~~~~~~~
Version: 1.1.2
Date:    05 Nov 2006
Author:  Derek Battams <derek@battams.ca>

System Requirements
~~~~~~~~~~~~~~~~~~~
* PHP5
   + Developed and tested against PHP 5.1.6
   + Any 5.x version should work
   + CLI vesion of PHP must be used
   + PHP4 and below will not work nor will ever be supported by MRE

* PEAR DB
   + PEAR DB package must be installed and configured with MySQL support
   + Developed and tested against PEAR DB 1.7.6; any recent version should do

* MythTV
   + Version 0.19.x or higher required
   + Extending in-progress recordings wasn't introduced until 0.19

Other Requirements
~~~~~~~~~~~~~~~~~~
* SSH Client/Server
   + If you plan to run this application on a host other than your MythTV
     master then you will need to setup SSH access between the two hosts
   + The host running this application must be able to run commands via SSH
     on your MythTV master host without requiring a password (use public keys)

Installation
~~~~~~~~~~~~
To install, unpack the tarball and run 'configure'.  If you wish to install to
a path other than the default system paths simply specifiy the path on the 
configure command line:

./configure /some/path/to/use/as/root

With no options to configure, the main script will be installed to
/usr/local/bin, the class files will be installed to /usr/local/lib/mre and all
config files will be installed under /etc in the appropriate locations.

Finally, run 'make install'.  This will install the files as requested.  If
installing to the default locations, you will need to run this command as root.

Running
~~~~~~~
When you run mre.php it will run in an infinite loop until it's killed.
I recommend running the script in daemon mode, if your PHP
supports the pcntl_* functions.  If your PHP is not built with the pcntl_*
functions then you can run MRE in the backgroud with nohup or something similar:

nohup /path/to/mre.php &

There are no required options, everything has a default.  Run with -h for a
listing of all the available command line options.

WARNING
~~~~~~~
Running this script will modify the end times of your recordings!  Though every
effort has been made to ensure the accuracy of this application, please be
aware that the use of this script may unexpectedly change the end times of
recordings.  End times may be changed to unexpected times or the end times may
be changed for programs you weren't expecting to be changed.

If your event monitor deems itself successful in parsing the info about your
event and it continues to determine that the event is still ongoing then this
script will continue to extend your recording for a very long period of time!
The default value is an extra eight (8) hours beyond the scheduled end time.
If this condition occurs then please be aware of the resources being used
(disk space, tuner, etc.).  You can control this setting with the -l flag. 

Currently Supported Event Monitors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following recording events are monitored with this version of MRE:

* NHL Hockey
   + Matching program title: 'NHL Hockey'
   + Monitor source: http://sports.espn.go.com/nhl/scoreboard
   + Active recordings with a title of 'NHL Hockey' will be monitored and the
     recording time adjusted as determined by the NHLEvent monitor.  Currently,
     it uses the ESPN.com scoreboard web page to determine the status of games.
   + In order to monitor an event, the subtitle of the game must describe the
     teams playing, usually the subtitle will be something like
     "Edmonton Oilers at Vancouver Canucks".  If the subtitle does not include
     info about who's playing in the game, the monitor will not succeed and
     will not edit the recording time.

* NBA Basketball
   + Matching program title: 'NBA Basketball'
   + Monitor source: http://sports.espn.go.com/nba/scoreboard
   + Works exactly the same as the NHLEvent monitor above.

* Major League Baseball
   + Matching program title: 'MLB Baseball'
   + Monitor source: http://sports.espn.go.com/mlb/scoreboard
   + Works exactly the same as the NHLEvent monitor above.

* NFL Football
   + Matching program title: 'NFL Football'
   + Monitor source: http://sports.espn.go.com/nfl/scoreboard
   + Works exactly the same as the NHLEvent monitor above.

* NCAA Football
   + Matching program title: 'College Football'
   + Monitor source: http://sports.espn.go.com/ncf/scoreboard
   + Works exactly the same as the NHLEvent monitor above.

These are the only events I plan to support (as they're the only ones I need
support for), but feel free to make suggestions for other event types on the
project web page (see below) or better yet, feel free to write your own event
monitors and submit them for inclusion on the project web page.

Bugs
~~~~
Please report bugs in the project bug tracker at:

http://sourceforge.net/projects/mythtv-tools/

Revision History
~~~~~~~~~~~~~~~~
1.1.2	05 Nov 2006	1591050: Update ESPN URLs
1.1.1	23 Oct 2006	1582955: Update reported version number
1.1.0	18 Oct 2006	1545417: Add support for NCAA football monitor
			1560142: Handle 'vs.' in NCAAF subtitles
			1560146: Allow NCAAFEvent monitor to scan multiple
				 sources for game data
1.0.0	13 Aug 2006	1535691: Check validity of monitor at start of recording
			1535696: Add support for NFL monitor
			1539564: Fix reference to invalid variable in init
				 script
0.0.4   05 Apr 2006     1450963: Add support for MLB monitor
			1453275: Fix configure/Makefile issues
			1453280: Verify communication and version of MythTV
				 server at startup
			1464633: Fix PHP warning from NBAEvent class
0.0.3	16 Mar 2006	1446134: Only attempt DB disconnect in SysConf
				 destructor if member is a valid object
			1447706: Add daemon mode
			1447709: Support logging to output file
			1447963: Consider events with invalid event monitors to
				 be 'still in progress' by default
			1447994: Fix invalid event monitors when event
				 description contains all ambiguous terms
			1448148: Fix '-l' flag being ignored
			1448411: Don't run as root
			1448412: Install to system directories
			1448415: Use INI file for user options
			1448679: Allow reloading of INI file during runtime
0.0.2	05 Mar 2006	1443790: Can't use exact match with word 'Final' 
			1443792: NBAEvent can't find game status
			1443794: Recordings extended forever without '-c'
0.0.1	24 Feb 2006	Initial version

$Id: README,v 1.7.2.2 2006/11/05 23:06:22 dbattams Exp $
