[Solved] Prevent Deaf Signed episodes from being recorded

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
pnetherwood
Newcomer
Posts: 6
Joined: Thu Jun 01, 2023 3:52 pm
Great Britain

[Solved] Prevent Deaf Signed episodes from being recorded

Post by pnetherwood »

Hi

I want to exclude episodes that have Deaf Signing. In the UK some programs are rebroadcast with a deaf signer included. Obviously, that's a great service if you need it but I personally do not want Mythtv to record them. It happens sometimes when the scheduler elects to record the Deaf Signed version of a program if there is a possible conflict at the original showing time or the episode was missed for some reason.

As far as I'm aware there is now way in a recording rule to specify any filters to exclude an episode. If any one knows of a way of doing this within the recording rule then please let me know.

In the mean time, I've come up with a hack which I thought I'd share. I've added a BEFORE INSERT trigger to the Program table in the DB (see below). It works by throwing an error on the insert if the condition is met which prevents the program being inserted. Since its not inserted the scheduler does not find the program.

Code: Select all

DELIMITER //
CREATE TRIGGER prevent_deaf_signed_insert_trigger
BEFORE INSERT ON program
FOR EACH ROW
BEGIN
  IF NEW.subtitletypes like '%SIGNED%'
  THEN
   SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Deaf signed program ignored';
  END IF;
END//
DELIMITER ;
It works fine. I'm getting my program data via the EIT scanner so this trigger is being called on every insert. I haven't seen any performance issues. I get gaps in my program listings but I'm ok with that.

Anyone know of a better way?

Paul
Last edited by pnetherwood on Wed Sep 27, 2023 9:49 pm, edited 1 time in total.
Mythtv: v33 User since 2006
BE: HP i5 mini, Ubuntu 22.04, 24TB NAS (DS923+)
FEx3: Beelink Mini S, Lubuntu 22.04
white_haired_uncle
Senior
Posts: 563
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Prevent Deaf Signed episodes from being recorded

Post by white_haired_uncle »

You can't do this with Custom Record (in MC-wide, Manage Recordings > Schedule Recordings > Custom Record)?
pnetherwood
Newcomer
Posts: 6
Joined: Thu Jun 01, 2023 3:52 pm
Great Britain

Re: Prevent Deaf Signed episodes from being recorded

Post by pnetherwood »

I could but then I'd have to do every recording this way which is not very convenient. I dealt want all recordings to exclude them.
Mythtv: v33 User since 2006
BE: HP i5 mini, Ubuntu 22.04, 24TB NAS (DS923+)
FEx3: Beelink Mini S, Lubuntu 22.04
white_haired_uncle
Senior
Posts: 563
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Prevent Deaf Signed episodes from being recorded

Post by white_haired_uncle »

At a glance, it looks like you might be able to insert a new row in recordfilter, then hopefully add that to your Recording Rules>Template for new recording rules, and possibly record.filter for existing rules (not sure how that field handles multiple filters). The newruledefault field looks interesting.

Maybe.
pnetherwood
Newcomer
Posts: 6
Joined: Thu Jun 01, 2023 3:52 pm
Great Britain

Re: Prevent Deaf Signed episodes from being recorded

Post by pnetherwood »

I created a row in recordfilter:

Code: Select all

| filterid | description | clause | newruledefault |
| 13 |  Ignore deaf signing | program.subtitletypes not like '%SIGNED%' |  1 |
I created a new rule but 'newruledefault' did not add it to new rule. A search on the "newruledefault" column pulls up some code in dvr.cpp which looks like the value is not used so I'm not sure about that.

I'll put it in the default template and give it a go.
Mythtv: v33 User since 2006
BE: HP i5 mini, Ubuntu 22.04, 24TB NAS (DS923+)
FEx3: Beelink Mini S, Lubuntu 22.04
pnetherwood
Newcomer
Posts: 6
Joined: Thu Jun 01, 2023 3:52 pm
Great Britain

Re: Prevent Deaf Signed episodes from being recorded

Post by pnetherwood »

That does work. The new filter appears on the filter menu in the them and Mythweb. However, I've gone back to using the trigger for this one rather than modify hundreds of recording rules or try and do a SQL update on the recording rule filter column.

Still, it's good to know you can add your own filters which I'm sure will be useful in the future.
Mythtv: v33 User since 2006
BE: HP i5 mini, Ubuntu 22.04, 24TB NAS (DS923+)
FEx3: Beelink Mini S, Lubuntu 22.04
luc5588
Junior
Posts: 39
Joined: Sat Dec 19, 2015 11:13 am
Reunion

Re: [Solved] Prevent Deaf Signed episodes from being recorded

Post by luc5588 »

Have a look at "custom priority/power priority". You can give boosts or penalties on any criteria. There are some examples in the wiki.

It will automatically give a large penalty to these types of programmes. They will not be recorded unless there is no other option (such as lots of conflicts or perhaps it is the only showing of the programme), in which case it's better to have a recording rather than no recording at all.

You may also want to exclude "ONSCREEN", "HARDHEAR", and "VISUALIMPAIR", though perhaps they are not used in your broadcasts.
Post Reply