[mythtv] max episodes (mis?) behaviour and solution

Tony Lill ajlill at ajlc.waterloo.on.ca
Wed Apr 27 17:17:31 UTC 2005


When you create a people search schedule, and set it to record only one
"episode", you don't get what I would consider the expected results. For
example, If you wanted it to record movies by Alfred Hitchcock, but only
if there are none already recorded (maxepisodes = 1). Otherwise, a
Hitchcock marathon could really hose you up.

This doesn't work because in Scheduler::AddNewRecords, when it counts
episode, it counts episodes with the same titles.

I looked at the code, and it seems to me that if you just changed the
count to work on recordid instead of title, it would work properly. The
recordid is in the recorded table, and later on, when you set the
toomany flag, it's done based on recordid anyway.

I think the only downside is that if you delete a schedule and create a
new one for the same show title, the ones recorded on the old schedule are
lost. You could fix that by setting the recordid to -1 in recorded when
the schedule is deleted, then when you create a recording schedule,
adopt any orphans where the title matches and the recordid ==
-1. Ideally, this should be user controlled, but if not, it just sort-of
preserves the existing behaviour

This might fix the problem people were having trying to have 2 schedules
for the same show with different maxepisodes behaviour.

Anyone see any flaws in this? I'll try coding it up and see how it works.
--
Tony Lill,                         Tony.Lill at AJLC.Waterloo.ON.CA
President, A. J. Lill Consultants        fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2     (519) 241 2461
--------------- http://www.ajlc.waterloo.on.ca/ ----------------
"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"


More information about the mythtv-dev mailing list