[mythtv] The scoop on programid and when it's not present

Brad Templeton brad+mydev at templetons.com
Mon May 30 19:55:39 UTC 2005

On Mon, May 30, 2005 at 11:30:21AM +0200, Oscar Carlsson wrote:
> Brad Templeton wrote, On 2005-05-28 19:46:
> >I recall some talk a while ago of synthetic programids, and I see
> >code in mythfilldatabase that does generate them when they are
> >missing.
> >
> >What is the situation for people overseas who are not using
> >datadirect?  It's been reported to me that they don't have programids.
> >
> >Is there a plan long term to assure all listing entries have a programid,
> >generating one synthetically (from hash of title/subtitle/description)
> >if need be?  It sure would be handy.
> >
> >Would it cause damage if I were to generate synthetic programids when
> >they are missing with a regularly run
> >    update program set programid = [synthetic] where programid = ''
> >                        (possibly check for null as well)
> >
> >or similar?
> Uhm, why'd you want to generate synthetic programids based on 
> title/subtitle/description? Myth already has dup-detection based on 
> that. The idea with programids is that they're based on episode/season 
> and _doesn't_ depend on title/subtitle/description. If we don't get info 
> about episode/season, there's no way to generate a sane programid.

Well, in theory the programid is to be unique for each TV program
(with the exception of programs like long movies split into two parts
for airing)  That's a handy thing to have, what would be used for
dup detection (instead of title/subtitle/description and variants).

Ideally, the programids would be the only thing used for dup detection
(as long as you have a way to detect the generic programids, which end
in 0000 and are placed on shows for which the actual information is not
yet known)  Of course there are also generic descriptions placed on
shows which don't reveal their data in advance.

Anyway, mythfilldatbase does have a synthetic programid generator for
shows that arrive from datadirect without a programid, as I understand
it, but other database fillers don't do this.  If you had assured
programids, you can simplify your code.

More information about the mythtv-dev mailing list