[mythtv] conflict resolution
Derek Atkins
warlord at MIT.EDU
Mon Nov 3 14:06:32 EST 2003
"Edward Wildgoose" <Edward.Wildgoose at FRMHedge.com> writes:
>> Provided it does a "closest match", sure. Let's say I have it set to
>> record at 7am. The actual schedule has a 6:15a, 7:10a, and 7:55a.
>> Which would it record?
>
> Well, under the old system you wouldn't get anything because the
> program wasn't at 7am....
Well, ok, yea... I concede that; I'm just trying to work wtihin your
strawman.
> ...I'm thinking about a fuzzy +- 1 hour match so in your case you
> are probably going to get a "random one" (as in depends on the
> actual algorithm finally decided on).
And I dont like this idea.. I dont want a random one, I want the one
closest to what I asked for.
> SQL is not great at ordered operations, it's a set based language,
> and trying to order by closest match is going to be slow and
> difficult I think. I need to have a think about how to make the SQL
> re-usable so we get the same query everywhere in the code otherwise
> it's going to get a little hairy working out what is actually going
> to be recorded...
EHH? What do you mean?
SELECT ... FROM ... WHERE ... ORDER BY abs(starttime-now());
This does exactly what I want, and will order the results such that
the closest program (to now) is first.
> It seems you are better off whatever happens though?
Maybe. I'd prefer not to choose a random one.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the mythtv-dev
mailing list