Kodi Jellyfin plugin issue
#1
Greetings everyone.

I have recently sideloaded Kodi onto my AppleTV 4 after years of using MrMc (where are you Davilla/The-Boxhead?!) and also started using Jellyfin.

Upon installation of the Jellyfin Kodi plugin, I am not greeted with any popup detecting my Jellyfin server, nor am I able to manually enter details of the server, with the option fully greyed out.

I've investigated the issue and came across this thread on github on the Jellyfin forums, with the key point being:

"It's either in the Jellyfin addon or something specific to the tvOS implementation on Kodi that's not matching their docs. It's trying to copy the files from the system folders to the local library, but failing to find them. The odd part is that where the documentation says the source is and where it's trying to copy those files on your system are different.
https://kodi.wiki/view/Special_protocol
Here it has listed that "Apple TV 2 (black)" is storing these system files in
/private/var/stash/Applications/Kodi.frappliance/KodiData/KodiHome,
while the logs seem to indicate it's trying to copy content from
/private/var/mobile/Containers/Data/Application/96A92E84-42E0-48C7-8754-E6555308B28F/Library/Caches/Kodi/userdata/library/video
I'm curious if this function is needed at all. I feel like that's something Kodi proper should be doing itself."

The Jellyfin devs seem to think it potentially relates to the documentation for the "special protocol" being for the AppleTV 2.

Could this be the case?

Has anyone here successfully connected their Jellyfin server via the Kodi plugin into Kodi on TvOS?

My current setup:

Jellyfin 10.8.10 installed in a TrueNAS Scale plugin
Sideloaded Kodi 20.2 and 19.5 with Sideloadly and problem exists in both versions
Installed Jellyfin repo by zip, then latest JellyFin Kodi plugin

Logs: https://paste.kodi.tv/ereduzaraj

Cheers,

Jason.
Trying to help clean up the afterbirth :laugh:
Reply
#2
The addon may need to use vfs functions to stat and open xml files on tvOS.  That was one of my experiences with pvr.nextpvr when I was testing the image I talk about here https://forum.kodi.tv/showthread.php?tid...pid3163955

Martin
Reply
#3
you should file an issue with them on github

your log at line 360-374 shows it had an error on line 120 of xmls.py due to "file not found" inside the python etree

but line 118 of that same file checks for it's existence prior to entering line 120 https://github.com/jellyfin/jellyfin-kod...ls.py#L118

the filename is set on 116 so i dont see anywhere it uses translate path between 116 and 120 https://github.com/jellyfin/jellyfin-kod...ls.py#L116


i would think that you need to set file_name to a translated path, so 116 file_name = xbmcvfs.translatePath(file_name = os.path.join(dest_base_path, node, "index.xml")) should be the fix


but i am not the developer, and the developers are not here so it would be best to file an issue report so the proper people are looking at it instead

and they will be able to make corrections
Reply
#4
My take is the actual issue is you can't use native OS actions on XML files since they are handled differently on tvOS, they are stored compressed in a plist and virtualized with the special:// protocol.  

There is a vague reference to what is going on in general here in the log NSUSerDefaults: compressed /userdata/profiles.xml from 960 to 332

My reference ipa file does address this somewhat but the developer might have to use  special://...xml for existence and load the special:// file into a string which the etree would need to load.
Reply
#5
Hi 

Unsure if you have found a solution but I figured I'd leave this for anyone else that is having the issue in the future.

I stumbled upon a fluke. This has been tested on 3 different Apple TV's so fairly confident it should work. It appears that if you install PlexKodiConnect and go through the set up then it will set the pathways for the Jellyfin for Kodi plug in to work. You will need a Plex account and possibly some sort of media in plex (I have not tested it without) 

1. Install PlexKodiConnect https://github.com/croneter/PlexKodiConnect add https://croneter.github.io/pkc-source in file manager and install from zip and then from repository. 

2. Let it install and once you get the notification that it has been installed wait for a pop up to tell you to 'restart Kodi now'

3. After closing / exiting and opening the application again wait for the next pop up to begin the set up process. I left everything default, nothing further to tweak and it will show a screen with a web link and a code to link the plug in to your plex account. Once everything is linked another pop up will advise that Kodi is restarting to apply all the changes, this isn't true you will have to wait 30 sec and then close / exit the application manually. 

4. Once you have opened Kodi again another pop up should show with your plex account, you click on it and it will show all your media folders and ask which ones you would like to sync. If you are using the Estuary skin they are all highlighted in green, select each one by one until they are white so that you don't actually import anything.

5. Let the sync pop up show and then you can go and install the Jellyfin for Kodi plugin as normal. Once installed stay on the screen, I have found it takes about a minute at most for the jellyfish pop up to appear and show your local server, then just configure as preferred. 

I am unsure what PKC does differently from Jellyfin that automatically knows where to look / set the paths. I'm hoping someone more well versed in Kodi may be able to figure it out but for the time being this long winded way works and now I have my entire library on Kodi and using Titan Bingie Mod it works pretty quick. 

I have seen that there may be a fix in 20.3 for PVR but unsure if this will also fix the jellyfin plugin. 

Hope this helps!
Reply
#6
@emveepee is right. Jellyfin plugin should not read the XML file directly with tree = etree.parse(file_name) (here https://github.com/jellyfin/jellyfin-kod...ls.py#L120) because on tvOS we have a kind of abstraction between Kodi virtual filesystem and the real filesystem of tvOS.

Also, the PR concerning the PVR fix will not fix the issue described here.

The issue needs to be fixed on Jellyfin side by using https://romanvm.github.io/Kodistubs/_aut...mcvfs.html functions to access the XML file.
I will try to have a look and open a PR.
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#7
PR with the fix open here: https://github.com/jellyfin/jellyfin-kodi/pull/803
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#8
Many thanks for your efforts!

How do I go about applying the patch?

Regards,

Jason.
Trying to help clean up the afterbirth :laugh:
Reply
#9
(2024-01-12, 11:28)ewequeone Wrote: Many thanks for your efforts!

How do I go about applying the patch?

Regards,

Jason.

The PR referenced above looks like it is still open and hasn't been merged yet so that would indicate a fix is not yet available.

Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#10
@ewequeone if you want, you can install Jellyfin plugin from the official repo then apply the patch manually directly by modifying the concerned Python file. For exemple, copy the not modified file on a NAS, apply the patch from your computer, then, copy back the modified file on your device at the right location and restart Kodi.
Trying to keep Kodi working on tvOS on free time — Former developer of Catch-up TV & More video add-on (GitHub repoWebsite)
Reply
#11
(2024-01-16, 10:13)sy6sy2 Wrote: @ewequeone if you want, you can install Jellyfin plugin from the official repo then apply the patch manually directly by modifying the concerned Python file. For exemple, copy the not modified file on a NAS, apply the patch from your computer, then, copy back the modified file on your device at the right location and restart Kodi.

Many thanks mate, that worked perfectly Smile
Trying to help clean up the afterbirth :laugh:
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi Jellyfin plugin issue0