I was looking for a method to hide 4k video in a shared MySQL library on clients that did not support that format. I was hoping that there was a tag based way to accomplish this, but I could not find one. The method I did find was to use Kodi’s Media source locking in the Parental controls. The way this works is that you have a separate source for each media type you want to hide, and when you lock a source, all of the media in that source is hidden from everywhere in the library. This works an individual profile basis so what you do on one machine or user profile does not affect any others. This can also be used for other applications such as hiding certain movies from a child’s user profile or similar applications. The hidden state of the media can also be easily turned on or off from the power menu so there may be applications even for a single profile, single machine application.
The first thing you need to get started is having a separate share/s for the media you want to be able to hide. In my case I want to hide 4k movies and 4k TV shows so my shares are as follows…
Movies
Movies_4k
TV
TV_4k
Music
The next thing we have to do is enable a master lock on the master profile. To do this you go to settings>profiles>profiles>
and click on master profile
to open its settings. In this next screen you will click on lock preference
and then Profile lock
where you will be given options of what kind of code to use. Select an option and enter the code twice to set it. If you are using profiles you do not need to set a profile lock on any of the other profiles.
The final step is to go to Videos
in the main menu, and then to Files
. Navigate to the share that you want to hide to highlight it, bring up the context menu, then select Set lock
. You will be prompted for the previous password you just set, after which you will be greeted with a screen where it will show the locked status of the share. Click on Lock code
and then enter a password for the share twice. This does not have to be the same as the master lock, but it can be if you wish to keep things simple. Repeat for any other share that you want hidden. The lock on the share only affects the profile you are logged into when you set it. If you are using profiles the lock on the shares must be done on every profile separately.
If you wish to temporarily turn the lock off you go to the power menu and select Enter master mode
which will prompt you for a password. To turn the lock back on you go to the power menu and select Leave master mode
. If you reboot or log out, master mode will always be reset to disabled.
Notes:
When the lock is first enabled/disabled you may have to play a video in order to refresh the video screen in the main menus. This “lock” does not actually lock anything, it just hides the files so until the screen refreshes a locked item that is still visible can still be played.
If you are a MySQL user with a large library this feature may add enough of a delay to cause the screen refresh bug if you do something like switch between all/watched/unwatched rapidly. Just like above, starting a video and stopping it should bring back the library to its normal state. Normal library use seems to work without issue, and I did not notice any performance hit.
If you want to remove a lock from a share you just go back to the files section and context menu>remove lock
. If you want to disable it from a machine all together then just go back to the master profile in the settings menu lock preferences>master lock>disabled
.
This method will add a password to the default profile that will have to be entered whenever you reboot or switch to that profile. If this is an issue then you can move your settings to a new profile and just pretend the master profile does not exist. The only profile that requires a password for this to work is master profile.
Splitting off 4k content works well for people using Plex and needing to keep seperate HD and 4k copies of videos. In the plex server you can set the 4k folders as a separate sources which then allows you to make a custom menu that will show “movies” and “movies 4k” as two different menu items.
This guide was tested in Kodi 18.3 on a Windows 10 PC and Raspberry Pi 3b+ but should work on any platform with any recent version of Kodi.