tvheadend/tvheadend — pull request #218 by skazi0 (2013-01-09 19:44:26+00:00)
Title: Episode number extraction from title/description

Most of polish channels don't have episode numbers in dvb metadata. Proposed workaround extracts episode numbers based on basic keyword prefixes. When broadcast title or description contains configured keyword, following sequence of digits is used as episode number.
![autoepnum2](https://f.cloud.github.com/assets/2458112/54456/18850030-5a94-11e2-80fe-8f2d27ff648c.png)
The keywords are configured per channel.
![autoepnum](https://f.cloud.github.com/assets/2458112/54455/15b59e46-5a94-11e2-997d-7cc14dabd0b6.png)
It seems that at least for polish channels, one keyword covers most of shows which have any indication of episode number (i.e. channels use consistent format for episode-in-description).

Possible further extension: use regexps to make the extraction more flexible and/or allow season/episode number extraction where available.