[mythtv-users] parental controls based on video folder

Martin Ginkel martin_ginkel at web.de
Tue Dec 25 13:21:33 UTC 2012


Am 19.12.2012 14:27, schrieb Zach C:
> This is interesting for a couple of reasons. First, I'm not the only
> person who wants to do parental settings based on path, and second
> there doesn't seem to be an official way to do it.
> 
> Yes, I'd like to see your mysql script when you get a chance.
> 
> Thanks


The path pattern 'adult/%' needs editing to match your directory structure.
Check out for your system with:

select title, filename from videometadata order by filename;

paths depend on the storage groups in your MythTV.
In principle you can add multiple IFs to allow more gradual
showlevels. For me this is enough.

Here we go:

-----------8<-----------------

drop trigger video_meta_insert;
drop trigger video_meta_update;
create trigger video_meta_insert before insert on videometadata
  for each row begin
    if NEW.filename like 'adult/%' THEN
      set NEW.showlevel=4;
    END IF;
  end;
create trigger video_meta_update before update on videometadata
  for each row begin
    if NEW.filename like 'adult/%' THEN
      set NEW.showlevel=4;
    END IF;
  end;

------------->8-----------------


More information about the mythtv-users mailing list