[mythtv] [mythtv-commits] Ticket #8535: Add ability to filter recording schedules by season

Michael T. Dean mtdean at thirdcontact.com
Mon Jun 7 20:15:43 UTC 2010


On 06/07/2010 03:52 PM, Jason Musits wrote:
> On Mon, Jun 7, 2010 at 9:28 AM, MythTV wrote:
>    
>> #8535: Add ability to filter recording schedules by season
>>
>> Comment:
>>
>>   program.syndicatedepisodenumber does not contain any usable information
>>   for filtering by season (see below).  The syndicatedepisodenumber is a
>>   string whose format is decided by the producers of a show--there is no
>>   standard for its construction.  Therefore, parsing the
>>   syndicatedepisodenumber to determine season or episode information is
>>   unreliable, at best.  And, the syndicatedepisodenumber may not be provided
>>   for a large percentage of users.  The only users for which the
>>   syndicatedepisodenumber is generally usable are those XMLTV users whose
>>   listings providers specify an "xmltv_ns" episode-num (versus the
>>   "onscreen" episode-num values, which is what syndicatedepisodenumber is
>>   designed to hold--see the documentation for episode-num at
>>   http://xmltv.cvs.sourceforge.net/*checkout*/xmltv/xmltv/xmltv.dtd ).
>>
>>   Anyone wanting to be able to use ordinal season and episode information
>>   should not attempt to parse such information from any existing fields
>>   (syndicatedepisodenumber, programid, ...), but should instead add columns
>>   to the database for season and episode numbers and modify XMLTV, EIT, and
>>   DataDirect (Schedules Direct) grabbers to properly (directly) pull such
>>   information from listings, when present, and save it directly to the
>>   database.
>>
>>   Furthermore, we're actually in the process of removing extra information
>>   from ProgramInfo, not adding new information.  Also, when adding
>>   additional information to ProgramInfo, it should be added to the end, not
>>   inserted randomly into the middle--where inserting into the middle
>>   requires a significant amount of changes so that all users agree on the
>>   meaning of each field.
...
>>   If you choose to use syndicatedepisodenumber in your recording rules,
>>   anyway, you should do so using a "Custom Recording Rule"/"Power Recording
>>   Rule".
>>
>>   Thank you for the patch.  If you have any additional questions about, for
>>   example, how to add the season and episode ordinals to program, please
>>   follow up on the mailing lists.
>>
>> --
>> Ticket URL:<http://svn.mythtv.org/trac/ticket/8535#comment:1
> Thanks for reviewing my patch.  I realize that syndicatedepisode number
> wasn't the perfect solution, but I didn't see any other one.

Exactly.  The current database does not handle this data.  This is 
mostly due to the fact that only a very small percentage of users have 
providers that supply such information.

>    I would be
> interested it getting the real season and episode numbers in the
> grabbers, but according to
> http://forums.schedulesdirect.org/download/file.php?id=2 (TMS
> DataDefinition) that information does not seem to be provided.  If
> anyone knows where this information can be obtained I would gladly
> update the grabber(s) to pull it and then modify my existing patch to
> work with the new fields, as suggested.
>    

Even after the new fields go in, I still think the proper solution for 
the actual recording rules is to use Custom/Power Recording Rules, 
rather than have a new field in record that's only useful for limiting 
generic rules to a specific season.  More things to set makes scheduling 
more complex, and less-commonly-useful criteria are better left to 
custom rules.  (That said, I actually use an any/all rule and just Never 
Record all the episodes in seasons I've already seen.)

> I could potentially interface with http://thetvdb.com and post-process
> the grabber data, but that seems a little cumbersome.  Any thoughts on
> this?
>    

Pulling that data from any provider for each program in each users' 
program listings (even if it's limited to only the programs that match 
recording rules) would be an undue strain on the services--remember 
these listings are updated daily.  The right solution is to get it from 
the listings provider.  If the listings provider doesn't provide the 
data, there aren't a lot of other options--as you realized.  It sounds 
like only the users whose XMLTV providers actually specify an xmltv_ns 
episode-num and, possibly, users of some EIT providers get the data 
you're looking for.

That said, eventually the season and episode numbers will be available 
in the database.  Their use in areas where listings do not provide the 
data will likely be limited only to actual recordings (never programs in 
listings) so we don't abuse the metadata services.

Since TMS doesn't provide season and episode number for us, you'll have 
to use what's available from your listings provider and try to find some 
recognizable pattern in syndicatedepisodenumber or programid and then 
write an appropriate custom recording rule for it.  I would be more 
accepting of a patch that adds an example SQL clause to the Custom 
Recording Rule editor showing how to filter a range of programid's or 
some substring within a syndicatedepisodenumber.  Then again, if you 
don't think it would be generally useful, you can simply save a "user" 
example clause for yourself (using the Custom Recording Rule editor).

Sorry to be the bearer of bad news.

Mike


More information about the mythtv-dev mailing list