Parental Control

From LinuxMCE
Jump to: navigation, search

LinuxMCE is installed in family environments with children of different ages. Lots of parents would like to limit the stuff that is available for the kids to see.

Idea

Create a way to mark media attributes as allowed and not allowed to be viewed/listened to.

Proposal

The web admin interface is great for adding data into the system.

Data

Structure

We need a new table in pluto_main:

CREATE TABLE `pluto_main`.`Users_AttributeAllowance` (
 `FK_Users` Int  NOT NULL,
 `EK_Attribute` int  NOT NULL,
 `MustMeet` tinyint  NOT NULL DEFAULT 0 COMMENT 'If this is set, ONLY media containing this attribute is listed',
 `NotAllowed` tinyint  NOT NULL DEFAULT 0 COMMENT 'If this is set. the media containing the above attribute is NOT available',
 INDEX `users`(`FK_Users`)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
COMMENT = 'Contains limits and rules describing what media a user sees';

Example

  • FK_Users points to kid 16 y/o
    • EK_Attribute points to R
    • MustMeet = False
    • NotAllowed = True
  • FK_Users points to kid 6 y/o
    • EK_Attribute points to PG13
    • MustMeet = False
    • NotAllowed = True
    • EK_Attribute points to R
    • MustMeet = False
    • NotAllowed = True
    • EK_Attribute points to Children
    • MustMeet = True
    • NotAllowed = False
  • FK_Users points to guest
    • EK_Attribute points to X-Rated
    • MustMeet = False
    • NotAllowed = True

(We don't want our guests to see how strange our tastes are...)

Display in the web admin

As part of the user page, the web admin should have the ability to select AttributeType. This will filter the currently available attributes of that type, and the ability to mark Must Meet and/or Not Allowed buttons. These Attributes should be presented as a list, where the administrator can, after it was originally setup of a user, mark and unmark Must Meet and/or Not Allowed.

Orbiter Display

The list of files currently shown at the orbiter is already filtered by lots of things. The SQL statement should be modified to take into account the filter criteria for the specific user.

Files needed changing

  • src/Media_Plugin/
    • Media_Plugin.cpp
    • Media_Plugin_Grids.cpp