Don't worry about querying by zap2it ID... it's provided in the first search. Also, guide data does not contain a direct zap2it ID.. We have to match something like
programid:EP07107490102 to zap2itid: SH710749
so we remove any leading EP/SH/MV identifiers, remove leading 0's and truncate the last 4 digits from the programID. Then we remove EP/SH/MV identifiers from TheTvDb's zap2itID and we are matching "710749"
There are a few reasons for using ProgramID
1. people input the data into thetvdb, so sometimes it's SH0710749, SH710749 or even EP710749
2. The ProgramID can be used to filter shows. Leading SH's means the show is not identifiable. MV's mean movie, EP means the show should be in theTvDb.
3. The ShowID provided by MythTV usually starts with an SH. It is what should be in thetvdb, however, sometimes there is a leading 0 and sometimes there is a leading EP.
check this out (make it big to see it):
They have been doing work to thetvdb. That zap2it id was not there in the first search when I defined my search routines. mythicalLibrarian parses each result to get the zap2itID