[mythtv-users] scheduler confusion

Mark Perkins perkins1724 at hotmail.com
Mon Sep 1 14:51:49 UTC 2014



> On 1 Sep 2014, at 7:07 pm, "blind Pete" <0123peter at gmail.com> wrote:
> 
> On Sun, 31 Aug 2014 20:07:25 -0500
> Bill Meek <keemllib at gmail.com> wrote:
> 
>>> On 08/31/2014 07:39 PM, blind Pete wrote:
>>> ...
>>> Could "something" be selecting virtual tuners in the same order
>>> as mysql, rather than by cardinputid
> 
> Just a stab in the dark, but could the logic that avoids head to tail
> recordings be selecting different tuners rather than different virtual
> tuners?  Today I have seen consecutive programs on the same sub-channel
> recorded on virtual tuners one and six while nothing else was in use.  

Unlikely. Do you recall if the earlier of the two program's was on tuner 6? Was there an earlier recording that had just finished on a different multiplex?

I will try and post later how this can happen but don't have a lot of time right now and want to mention a few other things.

> Oddly, mysql lists six as coming after one.  

I don't think the MySQL order is of great concern. Of greater interest to me is that firstly your discrete (physical) tuners have different scheduling order values (which is the default setup but not the recommended setup). The recommendation is to have them as the same value (all other things being equal). And secondly your LiveTV order is the same as your recording scheduling order which can result in LiveTV viewing throwing curve balls at the scheduler (as Mike said). The recommendation is generally to have the LiveTV order as the opposite to the recorder scheduling order.

However the bad news is that I don't think either of these observations are the cause of your current problems (given you mentioned that LiveTV is rarely used).

> 
>> Hi,
>> 
>> I'm missing something...
> 
> Everybody does.  Don't worry about it too much.  
> 
> The main issue is that programs are being missed.  The stuff below is
> just a side show, it did not cause the problem or fix it, but I am very
> happy to talk about it with anyone who has a clue.  
> 
>> Looking back at your original post, your clauses are looking for a
>> text cardinput.cardid, but cardid is an integer. So wouldn't the
>> 1st, 2nd and 4th lines below always fail? [and the 3rd would match
>> every cardinputid]
> 
> I am not brave enough to edit the database directly, although I will
> poke around and look with the command line.  
> 
> The changes were made through the frontend's main menu
> -> Utilities/Setup
> -> Setup
> -> TV Settings
> -> Recording Priorities
> -> Custom Priority Rules
> 
> If nothing complained I assumed that there were no gross errors, like
> comparing an int to a string, but that was just an assumption.  
> 
>> selectclause: (channel.callsign LIKE 'SBS%' OR channel.callsign =
>> 'NITV') AND cardinput.cardid = 'sbs' selectclause: cardinput.cardid =
>> 'abc' AND channel.callsign LIKE 'abc%' selectclause:
>> (channel.callsign NOT LIKE ('SBS%') AND channel.callsign <> 'NITV' )
>> AND cardinput.cardinputid <> 'sbs' selectclause: channel.callsign NOT
>> LIKE 'abc%' AND cardinput.cardid = 'sbs'
> 
> You might be right, this might be complete and utter gibberish, but it
> is not the cause of the trouble.  
> 
> Now that you are here; if cardinput.cardinputid is an int and lower
> case 'sbs' is a string rather than a label with an int value, where
> would the error messages be?  Can you recommend an SQL primer?  Or a
> cheat sheet that lists arithmetic, string, and logical operators.  

IIUC there will not be an error as such, I don't know what internal transformation MySQL will apply to the text string to allow a comparison to actually occur but you can be pretty confident that whatever happens it won't be what you want to happen...

> -- 
> testing
> bP
> _______________________________________________

It looks like I deleted your original post but will try and regenerate here and add some comments - but the short answer is I think your scheduler is behaving as expected:

2014-08-04 16:12:30.263040 C mythbackend version: fixes/0.27 [v0.27.3-111-g5c76f33] www.mythtv.org 
2014-08-04 16:12:30.263060 C Qt version: compile: 4.8.1, runtime: 4.8.1 
2014-08-04 16:12:30.263064 N Enabled verbose msgs: general 
2014-08-04 16:12:30.263079 N Setting Log Level to LOG_INFO 
2014-08-04 16:12:30.274030 I Added logging to the console 
2014-08-04 16:12:30.274532 I Setup Interrupt handler 
2014-08-04 16:12:30.274542 I Setup Terminated handler 
2014-08-04 16:12:30.274549 I Setup Segmentation fault handler 
2014-08-04 16:12:30.274556 I Setup Aborted handler 
2014-08-04 16:12:30.274563 I Setup Bus error handler 
2014-08-04 16:12:30.274570 I Setup Floating point exception handler 
2014-08-04 16:12:30.274578 I Setup Illegal instruction handler 
2014-08-04 16:12:30.274589 I Setup Real-time signal 0 handler 
2014-08-04 16:12:30.274637 N Using runtime prefix = /usr 
2014-08-04 16:12:30.274650 N Using configuration directory = /home/psd/.mythtv 
2014-08-04 16:12:30.274727 I Assumed character encoding: en_AU.UTF-8 
2014-08-04 16:12:30.275109 N Empty LocalHostName. 
2014-08-04 16:12:30.275115 I Using localhost value of PPlive 
2014-08-04 16:12:30.327128 N Setting QT default locale to EN_US 
2014-08-04 16:12:30.327253 I Current locale EN_US 
2014-08-04 16:12:30.327339 N Reading locale defaults from /usr/share/mythtv//locales/en_us.xml 
2014-08-04 16:12:30.339708 I New static DB connectionDataDirectCon 
2014-08-04 16:12:30.343876 I MythCoreContext: Connecting to backend server: 127.0.0.1:6543 (try 1 of 1) 
2014-08-04 16:12:30.347599 I Using protocol version 77 
2014-08-04 16:12:30.376214 I New Client: (#1) 
2014-08-04 16:12:30.385283 I --- print list start --- 
2014-08-04 16:12:30.385293 I Title - Subtitle Ch Station Day Start End S C I T N Pri 
2014-08-04 16:12:30.385391 I Muscle Car 73 7mate 04 16:11-16:39 1 2 2 A 2 -11 
2014-08-04 16:12:30.385424 I Horsepower TV 73 7mate 04 16:39-17:00 1 1 1 A 1 -8 
2014-08-04 16:12:30.385452 I Mythbusters 73 7mate 04 17:31-18:31 1 6 6 A 6 -10 First problem, 
^ should be 2,3,4 or 5


I disagree. Mythbusters on SBS TWO had the higher priority so given they overlapped (just) this one got bumped to a subsequent tuner.


2014-08-04 16:12:30.385478 I QI 21 ABC1 04 18:29-19:00 1 0 0 A P -6 
2014-08-04 16:12:30.385503 I Mythbusters 32 SBS TWO 04 18:30-19:29 1 1 1 A 1 -9 
2014-08-04 16:12:30.385530 I ABC News 21 ABC1 04 19:00-19:30 1 0 0 D L -10 
^ Don't like this, 6-15 free. 
Watched it "live". 


I think I see the ABC News recording rule is a 'find one daily' rule. IIUC these types of rules can be sensitive to the timing of the episode that was used to create the rule (the 'day' starts at the starttime of the original recording). Have you tried editing the rule to adjust the 'day' timing (IIRC functionality along these lines was added in 0.27 at some point.... I think). Sometimes a shift of 1 min in the guide can move a program from one day to the next.... (ie your 'day' might be starting at 19:31 for this rule).


2014-08-04 16:12:30.385555 I 7.30 21 ABC1 04 19:30-20:00 1 1 1 D 1 -11 
2014-08-04 16:12:30.385580 I Cities of the Underworld 72 7TWO 04 19:33-20:35 1 6 6 A 6 -6 
2014-08-04 16:12:30.385606 I David Attenborough's Natural Curio 10 TEN Dig 04 19:34-20:36 1 11 11 A 11 -9 
2014-08-04 16:12:30.385632 I ABC News 24 ABC New 04 20:00-20:31 1 2 2 D 2 -10 Should have been recorded at 7pm. 
Killed it, when the time came. 



More information about the mythtv-users mailing list