[mythtv] Regular expressions for program matching

Chris Pinkham cpinkham at bc2va.org
Mon Nov 3 13:21:54 EST 2003


> The discussions on conflict resolution got me thinkning about a feature
> that I'd find very useful.
> 
> Specifically, I'd like to be able to record a program based on regexp
> matching of title, subtitle, and description.

Something like this has been on my mental TODO list for a while. :)  It
could be even easier than thought also.  The UI is the main problem.
When searching for matching programs to record, instead of checking this:

	program.title = record.title

it could just do something like this:

	program.title like record.title

If the record.title is a regex it will get processed, but if it's a
normal title as it is now then the 'like' will match only exact programs.

I'd like to see this work since occasionally when I do actually watch a
commercial I'll see something advertised that is 4-5 weeks away and I
have to remember to actually go in in 4 weeks to schedule it if I don't
see another commercial.

> Implementation in mythbackend is pretty easy.  It requires adding a few
> fields to the record table, and changing the program seacrh code (which
> is pretty messy).  It'll be limited to MYSQL's matching capabilities.  I
> could probably implement the backend changes in a couple hours.

Not sure if you even need this if it's possible to use 'like' instead of '='.

> The frontend is more tricky.  It would basically require keyboard input
> (yuck), and would require a new screen where you could type the relevant
> info.  It would also solve the problem of trying to record a program

Personally I don't mind having to use a keyboard to do some things like this,
but I think Myth has a remote-editable lineedit widget doesn't it?  I
thought either the manual or instant record used something like this.

> With something like this, it would probably be useful to have a way to
> veiw the record table to manage entries which have no match in the
> current program listing.

The ranking screen already allows editing any record table entry.

-- 

Chris



More information about the mythtv-dev mailing list