Jump to content

How I solved the Emby and Kodi Master Lock issue


tired dad

Recommended Posts

tired dad

I think I solved the Emby and Kodi Master Lock issue. At least, it has worked for me since June 28, 2015 with no apparent negative impacts. 

 

CAUTION/DISCLAIMER: This worked for me on a networked dual server source/multiple client setting.  I cannot guarantee it will work for your specific set up.

 

Here is a step-by-step of what I did, and some tips and pointers I learned; I am doing it from memory a week after the fact, so I hope I didn't forget anything.  Please feel free to shoot anything down if you wish.  My whole reason for doing this was to have multiple profiles that were protected by passwords (one for the master user, one for parents) and multiple profiles without protection, but restricted in Emby, for the kids

  • Set up your first profile in Kodi, including your skin settings.  This will be the master user profile.
  • Install the Emby plug-in and restart Kodi, and then scan your library
  • Exit the program once the scan is done.
  • Do NOT enable Masterlock yet!
  • Create the other profiles you want, but for each one, choose the media info to be separate and the sources to be the same.  When I kept the media info the same, the child profile I created for my son could see the poster for each movie, but not play them.  I wanted the posters to be out of the way altogether.
  • 5599ed1016840_mediasource.jpg
  • You may want to set all of your settings before cloning your profiles. I did not and it was painful later on because I was adding and removing the same sources over and over to create the menus the way I wanted.
  • Let Emby scan the library for each user
  • Exit the program.
  • Install a dummy sources.xml file in the master user folder.  Here's the file I used:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>dummy one</name>
            <path pathversion="1">smb://kore/dummy new/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>dummy two</name>
            <path pathversion="1">smb://kore/dummy viewed/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

Here is the most important part of the sources file that worked for me: I needed two dummy sources.  Each time I used only one, it never worked.  Don't ask me why, I do not know. :)

 

  • You do not need to have any real paths in the file.  If you do, Kodi will actually scan those paths and if your skin shows library totals, it will be off because of double-counted movies.
  • Create symbolic links to the file for the other profile folders, or create copies.  Either way works.

5599eed87628e_parentsource.jpg

  • Start Kodi and log in as the Master User
  • Enable the Master Lock
  • Exit the program
  • Log in as another user and you should be able to see your movies.  All Emby movies will be under the "Movies" section of your skin, and not under Videos.
  • You can set lock codes for other users as well, or leave them blank.

 

  • Hints and tips: If I had to do it all over again, I would set all settings first and then clone the profiles.  Before cloning, I would remove “videos” from the shortcuts, and the ability to add sources:

5599f04f326f3_settings.jpg

  •  I also removed the parent folder visibility because clicking on that in the skin would kick me right out of my customized menu and into the "Video" part of Kodi.  It's also a good idea to add sources to various movie collections (if needed) for all your movies at once, and then clone.  The reason for this is that it is easier to add everything and remove them from the custom skin shortcuts for your cloned profiles (one action, "delete") than to add a new shortcut ("add a button", "choose a shortcut", "browse to source", "add source").  Here's what mine looks like:

5599f0187c319_modifymoviefolder.jpg

 

I hope that helps some other users out there.  As a Dad, it's important for me to keep the parent movies away from my kids, and I like to have two separate locked accounts so one can act like the  admin.  If you have any questions, let me know.  I can't promise a quick response, but I'll try.

Edited by tired dad
  • Like 9
Link to comment
Share on other sites

Angelblue05

Great job @@tired dad! I will check it out asap and report back. Thanks for taking the time to help out others with this detailed guide*  :)

 

Edit: I think I will implement the creation of the sources.xml with the add-on. It seems to work correctly with masterlock. It does indeed need two sources to be defined which is quite odd! Thanks again! 

 

2nd Edit: This will be part of a future version. We are cleaning up our code a bit, before adding more features to keep things running smoothly.

Edited by Angelblue05
  • Like 2
Link to comment
Share on other sites

tired dad

Great job @@tired dad! I will check it out asap and report back. Thanks for taking the time to help out others with this detailed guide*  :)

 

Edit: I think I will implement the creation of the sources.xml with the add-on. It seems to work correctly with masterlock. It does indeed need two sources to be defined which is quite odd! Thanks again! 

 

2nd Edit: This will be part of a future version. We are cleaning up our code a bit, before adding more features to keep things running smoothly.

Glad I could be of help!

Link to comment
Share on other sites

Oxide

Thanks for your fix Tired Dad, it works great with the standard options in the Kodi plugin.

 

Unfortunately it doesn't work if you select "Use local paths instead of addon redirect for playback" :( (I use this option so the case's are displayed in the Aeon MQ skin)

 

Angelblue05 I hope you can figure it out when you implement Tired Dad's fix ;)

 

Thanks again, the Emby community is just great :)

Link to comment
Share on other sites

Angelblue05

I don't see why it would not work with local paths.... It seems to me regardless of the video path, it should make both type appear.... I will review later as I don't use direct paths. Thanks for reporting Oxide.

Edited by Angelblue05
Link to comment
Share on other sites

tired dad

Thanks for your fix Tired Dad, it works great with the standard options in the Kodi plugin.

 

Unfortunately it doesn't work if you select "Use local paths instead of addon redirect for playback" :( (I use this option so the case's are displayed in the Aeon MQ skin)

 

Angelblue05 I hope you can figure it out when you implement Tired Dad's fix ;)

 

Thanks again, the Emby community is just great :)

I just tried the "local paths" setting in the Emby add on, and it played my opening "coming soon" video but nothing after that (program hung).  After restarting, Kodi would not play the strean, but after selecting another movie, it started the "coming soon" video and then hung again.  Rinse and repeat  Dang.  :(

 

PS - Where'd you get the Aeon MQ skin from?  It's not in the available skins nor was it in the MQ Repository.

Link to comment
Share on other sites

tired dad

So the content showed up, just not able to get playback?

Yup.. randomzied playback for the length of the my opening video that plays before the lcoal trailers.  Odd thing is, now that I've set the settings back to where they were, I am getting a stream playback error message and a note to check the log:

 

17:26:11 T:2120  NOTICE: EMBY Service -> ======== START EMBY ========
17:26:11 T:2120  NOTICE: EMBY Service -> KODI Version: 14.2 Git:20150326-7cc53a9
17:26:11 T:2120  NOTICE: EMBY Service -> EMBY Version: 1.1.1
17:26:11 T:2120  NOTICE: EMBY Service -> Platform: Windows
17:26:11 T:2120  NOTICE: EMBY Service -> Log Level: 0
17:26:12 T:2120  NOTICE: File_Lock_On C:\Users\guy\AppData\Roaming\Kodi\addons\plugin.video.emby\machine_guid.lock obtained
17:26:12 T:2120  NOTICE: File_Lock_On C:\Users\guy\AppData\Roaming\Kodi\addons\plugin.video.emby\machine_guid.lock released
17:26:14 T:5148  NOTICE: Thread LanguageInvoker start, auto delete: false
17:26:15 T:5148  NOTICE: -->Python Interpreter Initialized<--
17:26:17 T:5148  NOTICE: Parameter string: ?id=c51dccd9d6f7570435e6be3894d9d631&mode=play
17:26:17 T:5148  NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /mediabrowser/Users//Items/c51dccd9d6f7570435e6be3894d9d631?format=json&ImageTypeLimit=1
17:26:17 T:5148  NOTICE: PLAY Called
17:26:17 T:5408  NOTICE: EMBY UserClient -> |---- Starting UserClient ----|
17:26:17 T:496   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.emby/movies/c51dccd9d6f7570435e6be3894d9d631/?id=c51dccd9d6f7570435e6be3894d9d631&mode=play]
17:26:17 T:3712  NOTICE: Thread BackgroundLoader start, auto delete: false
17:26:18 T:5408  NOTICE: EMBY UserClient -> Current user: Parents
17:26:18 T:5408  NOTICE: EMBY UserClient -> Current userId: ee022fb42e93585537f041c8a200c10e
17:26:18 T:5408  NOTICE: EMBY UserClient -> Current accessToken: 32958dddfbd74abb9583bd6d29b72e2f
17:26:57 T:3844  NOTICE: Thread LanguageInvoker start, auto delete: false
17:26:57 T:3844  NOTICE: -->Python Interpreter Initialized<--
17:27:02 T:6076  NOTICE: Thread JobWorker start, auto delete: true
17:27:05 T:4976  NOTICE: Thread BackgroundLoader start, auto delete: false
17:27:05 T:1204  NOTICE: Thread JobWorker start, auto delete: true
17:27:08 T:1608  NOTICE: Thread LanguageInvoker start, auto delete: false
17:27:09 T:1608  NOTICE: -->Python Interpreter Initialized<--
17:27:11 T:1608  NOTICE: Parameter string: ?id=b3eb34e40862261326b68d7f4e10590e&mode=play
17:27:11 T:1608  NOTICE: PLAY Called
17:27:15 T:496   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.emby/movies/b3eb34e40862261326b68d7f4e10590e/?id=b3eb34e40862261326b68d7f4e10590e&mode=play]
17:27:19 T:4932  NOTICE: Thread BackgroundLoader start, auto delete: false
17:27:20 T:4956  NOTICE: Thread JobWorker start, auto delete: true
17:27:21 T:4396  NOTICE: Previous line repeats 1 times.
17:27:21 T:4396  NOTICE: Thread FileCache start, auto delete: false
17:27:22 T:5636  NOTICE: Previous line repeats 1 times.
17:27:22 T:5636  NOTICE: Thread LanguageInvoker start, auto delete: false

Restarting the program did not help, nor did rebooting.  I have an add-on to back up my settings, but of course I haven’t run it since I made the customization changes, so I am doing a system restore instead.

 

Edited by tired dad
Link to comment
Share on other sites

Angelblue05

Yeah, you can't just switch from direct path to plugin path and vice versa. You need to resync your entire library when doing so.

Link to comment
Share on other sites

tired dad

Yeah, you can't just switch from direct path to plugin path and vice versa. You need to resync your entire library when doing so.

Man.. that's unfortunate...  The system restore did not work, so it must be some other setting. I am going to resync the library for that user profile, otherwise it looks like it's back to the drawing board.

Link to comment
Share on other sites

Angelblue05

I'm sorry you are having difficulties, @@tired dad. A resync should get things re-running for you.

 

I managed to get master lock to work for both plugin paths and direct paths by making the dummy paths just "smb://". :)

  • Like 1
Link to comment
Share on other sites

Oxide

Thanks Angelblue05 I can confirm this is now working for me :) :) :)

 

Tired Dad you can get various various of Aeon MQ, depends on what version of Kodi you are on ;)

 

Aeon Nox 5 for Helix: http://forum.kodi.tv/showthread.php?tid=208801

 

Aeon MQ 5 for Isengard: http://forum.kodi.tv/showthread.php?tid=221151 (Skin I'm using)

 

And there is Aeon Nox 6 Public Preview available here: http://forum.kodi.tv/showthread.php?tid=231179

This is mainly for Helix, but also works on Isengard with a few features missing. Caution as this is still in beta.

  • Like 2
Link to comment
Share on other sites

tired dad

I'm sorry you are having difficulties, @@tired dad. A resync should get things re-running for you.

 

I managed to get master lock to work for both plugin paths and direct paths by making the dummy paths just "smb://". :)

Nope.. the resync didn't work, neither did a system restore. Four out of five times, the Emby script fails when playing, but once it did work.   It seems that something else is going on, but I don't know what, so I am reinstalling later today.

Link to comment
Share on other sites

tired dad

So... after reloading/restoring, and recovering settings from a backup, it still did not work.  Here's the error I get when trying to play any MKV file (MP4 seems OK)"

22:59:21 T:2760  NOTICE: PLAY Called
22:59:21 T:2760   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: string indices must be integers, not unicode
                                            Traceback (most recent call last):
                                              File "C:\Users\guy\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py", line 31, in <module>
                                                entrypoint.doPlayback(id)
                                              File "C:\Users\guy\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\Entrypoint.py", line 28, in doPlayback
                                                item = PlaybackUtils().PLAY(result, setup="default")
                                              File "C:\Users\guy\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\PlaybackUtils.py", line 66, in PLAY
                                                if intros[u'TotalRecordCount'] == 0:
                                            TypeError: string indices must be integers, not unicode
                                            -->End of Python script error report<--
22:59:22 T:3304   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.emby/movies/5fe9a0e27718f194d8a17b496e3f0370/?id=5fe9a0e27718f194d8a17b496e3f0370&mode=play]

Here's the kicker... that's only for movies; the trailers (if in MP4 or MOV format), play fine.  MP4 and MOV or AVI files do not play as movies at all.

 

Back to the drawing board for me, hope someone else can figure it out.

Link to comment
Share on other sites

  • 4 months later...

I think I solved the Emby and Kodi Master Lock issue. At least, it has worked for me since June 28, 2015 with no apparent negative impacts. 

 

CAUTION/DISCLAIMER: This worked for me on a networked dual server source/multiple client setting.  I cannot guarantee it will work for your specific set up.

 

Here is a step-by-step of what I did, and some tips and pointers I learned; I am doing it from memory a week after the fact, so I hope I didn't forget anything.  Please feel free to shoot anything down if you wish.  My whole reason for doing this was to have multiple profiles that were protected by passwords (one for the master user, one for parents) and multiple profiles without protection, but restricted in Emby, for the kids

  • Set up your first profile in Kodi, including your skin settings.  This will be the master user profile.
  • Install the Emby plug-in and restart Kodi, and then scan your library
  • Exit the program once the scan is done.
  • Do NOT enable Masterlock yet!
  • Create the other profiles you want, but for each one, choose the media info to be separate and the sources to be the same.  When I kept the media info the same, the child profile I created for my son could see the poster for each movie, but not play them.  I wanted the posters to be out of the way altogether.
  • 5599ed1016840_mediasource.jpg
  • You may want to set all of your settings before cloning your profiles. I did not and it was painful later on because I was adding and removing the same sources over and over to create the menus the way I wanted.
  • Let Emby scan the library for each user
  • Exit the program.
  • Install a dummy sources.xml file in the master user folder.  Here's the file I used:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>dummy one</name>
            <path pathversion="1">smb://kore/dummy new/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>dummy two</name>
            <path pathversion="1">smb://kore/dummy viewed/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

Here is the most important part of the sources file that worked for me: I needed two dummy sources.  Each time I used only one, it never worked.  Don't ask me why, I do not know. :)

 

  • You do not need to have any real paths in the file.  If you do, Kodi will actually scan those paths and if your skin shows library totals, it will be off because of double-counted movies.
  • Create symbolic links to the file for the other profile folders, or create copies.  Either way works.

5599eed87628e_parentsource.jpg

  • Start Kodi and log in as the Master User
  • Enable the Master Lock
  • Exit the program
  • Log in as another user and you should be able to see your movies.  All Emby movies will be under the "Movies" section of your skin, and not under Videos.
  • You can set lock codes for other users as well, or leave them blank.

 

  • Hints and tips: If I had to do it all over again, I would set all settings first and then clone the profiles.  Before cloning, I would remove “videos” from the shortcuts, and the ability to add sources:

5599f04f326f3_settings.jpg

  •  I also removed the parent folder visibility because clicking on that in the skin would kick me right out of my customized menu and into the "Video" part of Kodi.  It's also a good idea to add sources to various movie collections (if needed) for all your movies at once, and then clone.  The reason for this is that it is easier to add everything and remove them from the custom skin shortcuts for your cloned profiles (one action, "delete") than to add a new shortcut ("add a button", "choose a shortcut", "browse to source", "add source").  Here's what mine looks like:

5599f0187c319_modifymoviefolder.jpg

 

I hope that helps some other users out there.  As a Dad, it's important for me to keep the parent movies away from my kids, and I like to have two separate locked accounts so one can act like the  admin.  If you have any questions, let me know.  I can't promise a quick response, but I'll try.

Hey guys.

 

I am new in Emby for kodi and also want to use profiles for hide the bad content from my kids.

After setting all up like described in your first post i cant see the content on users which have a lock pin set (Master User and Parents).

I just cant see the movies and tv shows. ill have to got to Movies->COntext Menu->unlock sources->enter pin->all movies are visible!?

Why arent the movies visible when ill login also with the same pin for the profile?

 

The dummy sources has been added by the emby script:

  <video>
    <default pathversion="1" />
    <source>
      <name>Emby</name>
      <path pathversion="1">smb://embydummy/dummypath1/</path>
      <allowsharing>true</allowsharing>
    </source>
    <source>
      <name>Emby</name>
      <path pathversion="1">smb://embydummy/dummypath2/</path>
      <allowsharing>true</allowsharing>
    </source>
  </video>

Am i missing something?

 

thx

pOpY

Link to comment
Share on other sites

Angelblue05

I believe there's a setting in Kodi settings > system > Masterlock (make sure the settings level is advanced or higher). Then you need to enable Ask for masterlock code at start up, so the content should be visible when you get into the Kodi profile. I'm not sure that will fix your issue, but it's something to try?

 

Otherwise, why do you need masterlock? I'm not sure I understand. To hide bad content you should create individual users in emby with restricted access using parental control. Then only what the user has access to will be added to Kodi. So you don't have to worry about using masterlock in this case... but again, I'm not sure I fully understand. :)

Link to comment
Share on other sites

thx angel for your answer.

 

I have tried the option "ask for masterlock at startup" -> it always asks for the masterlock code before the login screen appears.

So i have to enter it twice for the master user or the parents user.

But that didnt solve my issue, i have todo this again:  Movies -> Context Menu -> unlock sources -> enter pin -> all movies to see the content.

 

I'll dont want masterlock, but if ill setup a pin for an kodi user, kodi wants me to enable masterlock for the pin to work.

When masterlock is enabled, i have the described issue.

 

I have setup different users in emby with different (bad/good) content.

Also i have setup the same users in Kodi and set the corresponding Emby user with the good/bad content.

So far so good.

Now ill have enabled profiles without an pin for the profiles -> all works as it should, but kids are clever  :D  :D

They figure out very quickly how to change user and watch the bad content.

So the only solution is setting up an pin for Master User and Parents User.

As stated above, kodi enables master lock and -> issue as described -> no movies and no tv shows on pin protected proflies.

 

Any chance to get this fixed or is there any workaround (like the two dummy sources in the sources.xml file)!?

 

thx

pOpY

 

 

Link to comment
Share on other sites

  • 2 weeks later...
tired dad

thx angel for your answer.

 

I have tried the option "ask for masterlock at startup" -> it always asks for the masterlock code before the login screen appears.

So i have to enter it twice for the master user or the parents user.

But that didnt solve my issue, i have todo this again:  Movies -> Context Menu -> unlock sources -> enter pin -> all movies to see the content.

 

I'll dont want masterlock, but if ill setup a pin for an kodi user, kodi wants me to enable masterlock for the pin to work.

When masterlock is enabled, i have the described issue.

 

I have setup different users in emby with different (bad/good) content.

Also i have setup the same users in Kodi and set the corresponding Emby user with the good/bad content.

So far so good.

Now ill have enabled profiles without an pin for the profiles -> all works as it should, but kids are clever  :D  :D

They figure out very quickly how to change user and watch the bad content.

So the only solution is setting up an pin for Master User and Parents User.

As stated above, kodi enables master lock and -> issue as described -> no movies and no tv shows on pin protected proflies.

 

Any chance to get this fixed or is there any workaround (like the two dummy sources in the sources.xml file)!?

 

thx

pOpY

Hi,

 

sorry for the delayed response, I was visiting the United States a couple of weeks back and then had to catch up at work. In the meantime I completely redid the Kodi install on my machine and as of this evening, I followed my old workflow above and I was indeed able to:

 

  1. Add multiple profiles
  2. Enable Master Lock for the parents
  3. Leave the kids account with no lock
  4. Log into both and play media

Did you make sure you added your movies from Emby and let it do a complete sync before enabling the lock?

Link to comment
Share on other sites

  • 1 month later...

thx for your answer.

I have made an residential relocation so no time for kodi  :(

Currently i have no master lock enabled and multiple profiles are working.

I will try it again when ill find some time.

 

Just one question:

Emby stays in sync for every profile with the correct content and also newly added stuff appears with fanart?

 

thx

pOpY

Link to comment
Share on other sites

tired dad

thx for your answer.

I have made an residential relocation so no time for kodi  :(

Currently i have no master lock enabled and multiple profiles are working.

I will try it again when ill find some time.

 

Just one question:

Emby stays in sync for every profile with the correct content and also newly added stuff appears with fanart?

 

thx

pOpY

 

 

So far, so good with the master lock and the correct content and background art.  Earlier versions of the Emby plugin were a little flaky, but 1.1.62 is working well.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...