Kodi Community Forum
v20 Enabling master lock code removes sources from server - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: v20 Enabling master lock code removes sources from server (/showthread.php?tid=372240)

Pages: 1 2


Enabling master lock code removes sources from server - Hansie9999 - 2023-02-26

Hello All,

I am currently using a Coreelec Box running Kodi 19 without problems, I have all my media on a Jellyfin server, and I use the Jellyfin Addon in addon mode.

I now wanted to try Kodi 20 and installed Libreelec on my Raspberi Pi 4B

All is working well, except for one thing, I need to put a PIN on my users so that I dont get my wife's "crap" movies in my recently viewed list Smile to do this Kodi forces me to enable the master lock, I do this and keep everything unlocked, but the second I do this my media sources from my Jellyfin server get removed, If I remove the master lock code and reboot the sources are back, Or if I go to my media, go to the left, select options and than click on "unlock sources" and give my PIN the media also is back but its anoying having to do this everytime (this happens both on a user with or without PIN).

Now the REAL kicker is, I remember having EXACT the same problem on my coreelec with KODI 19 and damnet, I cant remember how I fixed that !!!! (its fixed on that box and that box still works fine, no issue with the sources and master code is enabled)

This problem seems to exist a long time on alot of different Kodi versions (and now includes version 20) and seems to happen with alot of addons using remove sources (plex, emby, jellyfin, ...)
https://github.com/croneter/PlexKodiConnect/issues/779
https://emby.media/community/index.php?/topic/23065-how-i-solved-the-emby-and-kodi-master-lock-issue/
https://github.com/jellyfin/jellyfin-kodi/issues/169

Does anyone know of a fix or workaround ? or knows what settings I need to change to get this working ??

Any help is much appreciated,

thank you,


Hans


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-26

i discovered this same thing with jellyfin in my case, my workaround was to not use master lock code

look over the profiles wiki you dont need master lock code to have separate profiles - https://kodi.wiki/view/Profiles


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-26

Thanks for the tip,

I know its not needed for more than one profile, but however it IS needed if you want to use a lock code on any of the profiles (it forces you to enable it than)
and I want a pin code on my account because if other people like "my wife" open the wrong profile she will have all her shit shows contaminating my watch list.

So if you have a workaround to set a PIN to a profile without needing the master lock, I love to hear it (but doubt that is possible)


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-26

its a known issue with the jellyfin addon with no solution, nothing to be done from kodi

https://github.com/jellyfin/jellyfin-kodi/issues/169

https://github.com/jellyfin/jellyfin-kodi/issues/619


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-26

(2023-02-26, 20:07)jepsizofye Wrote: its a known issue with the jellyfin addon with no solution, nothing to be done from kodi

https://github.com/jellyfin/jellyfin-kodi/issues/169
https://github.com/jellyfin/jellyfin-kodi/issues/619

Ah well, I find the issue with most server addons (also Emby and Plex) so I gues its something in the way it changes when Kodi has a PIN (and even tho you DONT lock the sources (just the login) Kodi for some reason also locks the sources.

Has the Kodi team issued some changes the people from Jellyfin need to implement for it to work ?

and also , I am serious, I acualy HAVE it working on my older box with Kodi 19 , I just cant remember what I dit to get it working Sad


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-26

i spent some time on trying to understand this problem better the last 1+ hours

it has to do without how sources are setup from jellyfin
if i am in master user - i cannot see videos unless i enter "master mode"
if i am in another user - i cannot see videos unless i enter "master mode"

when it fails to show videos i get this
CUtil::GetMatchingSource: no matching source found for [plugin://plugin.video.jellyfin/f137a2dd21bbc1b99aa5c0f6bf02a805/]
Skipped 641 duplicate messages..

when it works i do not get that

in the database the paths for all the videos are the above, so, its trying to load item details from a source which is not defined or is only defined under master mode

im trying to dig in further to see if i can figure out:
  1. where these sources are defined
  2. whether they can be manually defined
  3. if the sources being read needs to be accessed in a different path/way from the code via special path or otherwise
at least i have a full understanding of whats happening and at least i know that other users are seeing 641 movies in the database however without the proper source they cannot be displayed in the gui
so maybe i can work out some sort of fix or workaround


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-26

(2023-02-26, 21:53)jepsizofye Wrote: i spent some time on trying to understand this problem better the last 1+ hours

at least i have a full understanding of whats happening and at least i know that other users are seeing 641 movies in the database however without the proper source they cannot be displayed in the gui
so maybe i can work out some sort of fix or workaround
Much appreciated,

I still think it realy is a Kodi bug somewhere, because if a user has no PIN, why does he suddently has to give a PIN to access its own media just because the master user now has a PIN (and in there it is NOT selected to lock any sources)


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-27

alright i finally figured out a workaround for this
it caused some strange behavior but im not sure if its all the poking at kodi i did or not
the strange being that while all profiles added can see all the media from jellyfin within the kodi library going into the jellyfin addon does not show the library entries

anyway what i did was add the jellyfin plugin path to userdata/sources.xml as follows

xml:
    <video>
        <default pathversion="1"></default>
        <source>
            <name>jf</name>
            <path pathversion="1">plugin://plugin.video.jellyfin/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>

you get to decide how well it works in your setup... it is after all a workaround not a fix

------
EDIT

using the "perform local database reset" within jellyfin then reconfiguring and reimporting from jellyfin has resolved the above strange behavior, everything is copacetic now


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-27

Thanks alot,

I will be trying this fix later tonight,

I will post here if it worked or not,

Kinda strange actualy that I find posts about this problem from various server plugins (plex, jellyfin, emby) dating back to 2019 and previous Kodi versions , and a fix like this still is not implemented in Kodi 20, is there any way you could forward this fix to be implemented in future Kodi versions ?


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-27

(2023-02-27, 11:42)Hansie9999 Wrote: Thanks alot,

I will be trying this fix later tonight,

I will post here if it worked or not,

right on
 
(2023-02-27, 11:42)Hansie9999 Wrote: Kinda strange actualy that I find posts about this problem from various server plugins (plex, jellyfin, emby) dating back to 2019 and previous Kodi versions , and a fix like this still is not implemented in Kodi 20, is there any way you could forward this fix to be implemented in future Kodi versions ?

as far me "forwarding" this to kodi, im not part of team-kodi so i have no more resource to do so than you do to create an official issue on github - https://github.com/xbmc/xbmc/issues
except i dont actually use github so i would encourage you to do so, you can reference this thread in your issue report

mitigating expections, im not sure how this would be recieved by team-kodi as an issue, it could be pass the buck "its not an issue within kodi its an issue with the addon" etc so then filing the issue with jellyfin
except filing it with jellyfin would only result in the workaround as im fairly certain it needs a whitelist in the kodi code that jellyfin cant change

if you were to file an issue with jellyfin i would suggest a new one since the old one is so old and reference this thread and the original issue that was located and is open - https://github.com/jellyfin/jellyfin-kodi/issues/169


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-28

I tried it last night and I probably dit something wrong because I dit not see any change (also after reboot) still had to manualy unlock the sources before they show up.

this was my original sources.xml file

Code:
<?xml version="1.0" encoding="utf-8"?>
<sources>
  <video>
    <default pathversion="1"/>
    <source>
      <name>Videos</name>
      <path pathversion="1">/storage/videos/</path>
      <allowsharing>true</allowsharing>
    </source>
    <source>
      <name>TV Shows</name>
      <path pathversion="1">/storage/tvshows/</path>
      <allowsharing>true</allowsharing>
    </source>
  </video>
  <music>
    <default pathversion="1"/>
    <source>
      <name>Music</name>
      <path pathversion="1">/storage/music/</path>
      <allowsharing>true</allowsharing>
    </source>
  </music>
  <pictures>
    <default pathversion="1"/>
    <source>
      <name>Pictures</name>
      <path pathversion="1">/storage/pictures/</path>
      <allowsharing>true</allowsharing>
    </source>
  </pictures>
</sources>


so I tought I had to add your part in to it like this

Code:
<?xml version="1.0" encoding="utf-8"?>
<sources>
  <video>
    <default pathversion="1"/>
    <source>
      <name>Videos</name>
      <path pathversion="1">/storage/videos/</path>
      <allowsharing>true</allowsharing>
    </source>
    <source>
      <name>TV Shows</name>
      <path pathversion="1">/storage/tvshows/</path>
      <allowsharing>true</allowsharing>
    </source>
    <source>
            <name>jf</name>
            <path pathversion="1">plugin://plugin.video.jellyfin/</path>
            <allowsharing>true</allowsharing>
    </source>
  </video>
  <music>
    <default pathversion="1"/>
    <source>
      <name>Music</name>
      <path pathversion="1">/storage/music/</path>
      <allowsharing>true</allowsharing>
    </source>
  </music>
  <pictures>
    <default pathversion="1"/>
    <source>
      <name>Pictures</name>
      <path pathversion="1">/storage/pictures/</path>
      <allowsharing>true</allowsharing>
    </source>
  </pictures>
</sources>


Or do I have to replace it completely ?
Or do I also have to add that extra </default> behind that pathversion ?

Im not to experienced with all this and dont want to mess something else up, so sorry for the extra question,

I appreciate the help,


Hans


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-02-28

extra question,

How do I put the code on the forum here like you do ?

And how do I edit my own posts ? I cant find an edit button on this forum Smile


Hans


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-02-28

not sure why it didnt work for you. i just now copied your sources above verbatim to my own sources file at userdata/sources.xml and it worked

for comparison:

i have Kodi (20.0 (20.0.0) Git:20230116-ec5b71680e). Platform: Linux x86 64-bit (i compiled it from github, theres no equal official build)
*jellyfin addon version 0.7.10+py3 (not jellycon)
i run in portable mode for testing on debian bullseye
my library is setup with jellyfin already
my profile was from backup, never had any master lock enabled or other profiles setup
i opened kodi, setup a master lock code, closed kodi, reopened and verified no movies/shows present
closed kodi, copied your exact file from above (the 2nd with the jf source) into my sources without modification (select all+paste+save)
reopened kodi and my movies/shows were displaying again

im not sure where the difference is, i can look for another workaround but if it only works for me then its no value to you


as far as formatted code in your posts, see the toolbar above the text entry box when posting, there is an icon "</>" which will insert the syntax formatting for you, just highlight what you paste then click it and enter what syntax you want (xml,python,etc)


and you cant edit your posts because your account is new, once the new wears off youll be able to edit


RE: Enabling master lock code removes sources from server - izprtxqkft - 2023-03-01

how about a Debug Log ?


RE: Enabling master lock code removes sources from server - Hansie9999 - 2023-03-01

I will maybey disable and re-able the master lock and than reboot, maybey thats needed for it to kick and start working.
If that does not work ill try making a completely new profile with your fix in place and see if that helps.

I will test tonight and let you know,

If it still does not work ill also see if I can upload a log and post it here.


Thanks alot,


Hans