-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement native mode to function client side #938
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
You are truely amazing, this works perfectly! Smb native xbox app, how you managed to turn that around so quickly im baffled! I would love to buy you a pint or 2, amazing work!! 2 points to note
Again thanks you have outdone yourself |
You found a logic error I made. Latest commit should fix the double entry error, and if you edit a path and leave either remote or local path empty it will clear it from the list. The device name is expected behavior given how the whole login flow works. @oddstr13 I'm not fixing that last linter complaint because it's dumb. |
This comment was marked as spam.
This comment was marked as spam.
Stupid or not, I've completely delegated Python formatting questions to the black formatter, and am now enforcing it for new PRs – it'll get auto-formatted in the way suggested the next time I save that file regardless. I've been considering testing out a new formatter (which is supposedly faster while maintaining compatibility with black), but that discussion is off-topic for this PR. |
Quality Gate passedIssues Measures |
I've looked over the code and don't see anything obviously wrong. @sundermann @marcovolpato00 @fcr Could you guys test this PR? |
@oddstr13 I've installed the changes and pointed to nfs paths as the local paths and the changes work fine. Note that I did not change any of my previous settings so the sync Playback mode is still "add-on (default)". Regardless, the Dual subtitles plugin was able to find the subtitles local to the video file and the video played flawlessly. @mcarlton00 A huge thanks for your effort and patience. |
That is surprising, I would have expected you would need a full resync in native mode before anything like that changed. |
So, I've been using @sundermann version for the last few days without issue (from #926) Everything seems to work as expected in my testing so far. Overall it feels much more performant again, especially compared to using the addon mode. |
Just tested and it hasnt been able to remove the previous entry, Open kodi, wait for sync to complete, go to manage path replacements, click on the path p:p, edit both to t:t, click okay, both paths are now present and did not remove. Added a log file, seem to show a few errors, i have no understanding of what it means though, hopefully you will, This being said, if all it means is be careful not to mess up when adding them, its not a big deal, Performance is the same if not better than before and now with it being client based i even take my jelly library offline and not stop playback, this is a vast improvement from before, Thank you to everyone who fixed this, instead of removing it you gave it an upgrade!! Thanks again! |
I only need the direct access to particular paths in my libraries - those with foreign movies that require dual subtitles. The only problem that I encountered was that where videos on direct paths were watched, Kodi did not update the watched state of those videos. This problem still persists with the current situation so, perhaps it is connected to my not using pure native mode. |
Hi, when will this native mode workaround be available for Jellyfin4Kodi from the repo? |
I think you’re right in this being related to your setup of using direct paths in addon mode. It my testing with direct paths and using native mode, the watched status is reflected in Kodi and on the Jellyfin server. |
When I am satisfied that it has been sufficiently tested, and have available time to do it. So, get testing ;) |
I've installed it, using two NFS libraries and it seems to just work. Thanks ! |
Proberley a stupid question, if i have this version installed before its released, will it auto update when its merged and realesed? Sorry im new to github and not sure how it all works |
Tried with my NFS share and works perfectly. Hope it will be merged, thank you @mcarlton00 ! |
I have tested your commits with FTP-based libraries (approx. 20 entries). Runs absolutely flawlessly. |
Problems I have with native mode
Using addon mode I don't have either of these problems. Does anyone else have these problems or is it just me ? |
A note for anyone struggling, I had to hit reset database in the add-on settings and then resync to get rid of the file no longer available error, after making sure the add-on is in native mode |
Hey! I can't make this work with some of my SMB shares.. I spent 2 days now trying all different configs. My setup: NAS Synology docker Jellyfin server:
So Movies is hosted on a drive on my NAS. Shared via SMB. This is working in kodi. data.json looks like:
"File is no longer available" is showing when trying to play something from the "Show". |
@Ejz85 did you reset your database in the kodi addon settings? |
I did reset about 20 times by now. ;) But yea I think I may have solved it now by adding them in file manager. |
I've noticed that as well, i had it partially working before I added both paths separately to the file manager and reset, which made all the files work reliably |
Hm well it's actually still not working, I had to get some sleep last night. All my shares on my NAS works but none of the ones on my Windows 11 PC. And now they are added in file manager in kodi as well and that didn't make a difference. |
For me everythings seems to be working, except music, music files are never found when not played using the plugin itself. |
You must reset and re-sync the database after modifying the paths in data.json, as the mapping is used when syncing, and then the full path is stored in the database. This is not a change from how native mode worked before, the only change is that you need to configure the path on the client, instead of on the server. |
My experience with native mode is similar to @roninf. Switching to "native" modeI I defined the native paths only for the video but left the music in Kodi as a local library since I prefer the Kodi metadata scrapers. After resetting and re-syncing the database, the video worked as advertised. However, when I tried to rescan the music library (that of course had been reset), Kodi went into an infinite loop. |
I finally got it to work after 3 days. I had a few different problems, because I kept fixing one thing and then something else stopped working. At one point none of my Windows SMB shares were working but all my NAS ones did.. And then a day later I fixed some of the PC shares, but then some of my NAS shares didn't work. But the main issue I was having was that I didn't add a / at the end of the remote path (the ones that comes first). This created the problem where kodi randomly added a / in some of my paths in the middle of a folder name.. For example, tvshowsdl became tvshows/dl/.. But in the end I didn't get the SMB shares to work again on my NAS so I finally just turned on NFS on my NAS and that worked instantly. And yes, I did reset and re-sync like a million times between every little change i made. |
Well I don't see this being an upgrade in any form, as I have to configure all of these path-replacements on all of my boxes and various installations. BUT: Nonetheless I'm happy it exists. It surely can help, when direct paths are really needed. |
Just want to say thank you for reimplementing native mode 👍 Working great again (and faster compared to addon-mode). |
Can someone please provide a comprehensive tutorial, video or written, on how to actually set-up KOdi with JF in Native mode now as before it was dead simple and took no time and it, for me at least, worked fine. Trying to sort this out reading this Git and posting on the Kodi forum and I am conly confused and shocked seeing there is now a TON or work required to maintaine what was super simple and easy previoously, and still have no idea how to actually get the thing to work. |
It sounds like something was "fixed" by making every aspect of this mode far more difficult, cumbersome, work intensive and difficult to understand. I don't spend hours and days reading every bit of info trying to work out minute issues, I know I have JF working on multiple lcal clients in Kodi using Native Mode, it was simple, easy and it WORKED. Now I haven't a clue how to get Native mode to work, it sounds like there's a ton of maintnence and configuration reruied for every client and nothing about it sounds pleasant. Add-on mode doesn't provide access to local Extras folders that are easy and simple to use in Kodi (unlike the built-in Kodi extra nonsense they've been trying to get working, poorly, for a decade) so losing that function because changes to JF for "reasons" is not making me happy. That you can't even paste into these file replacement path boxes in INSANE!. |
I am using Kodi on a Nvidia Shield and have a problem with the local path. Do I have to write the whole nfs path there (f.e. nfs://192.168.0.1/storage/video/movies) or is there a shorter version? In Kodi filemanager i have added this share with the name movies. Is this just a symlink or a real mount point and if whats the whole path? /mnt/movies for example doesnt work. |
It's a simple string replacement. To find out your paths to your movies/series, use "Information" in Kodi on a Movie and navigate to the "refresh" button (I think) in the down left corner. Then the path to the file will be shown. Keep in mind that Kodi must have access to this path! Nothing changed here. |
Thanks for the information. When i write the whole path it is working. I was only searching for a shorter path because typing with my remote controller sucks 🤣 |
I always use the shortest version and it works like a charm. |
@mouserad If you have a Bluetooth- or USB-Keyboard than all Android devices will happily connect them and you can type paths (and or passwords etc.) much more easily. For longer setups with more information to hack in I always connect an external keyboard. |
Thanks but i am naturally lazy😆 I usually work for longer texts with my android app and send texts to my kodi device but this time i was also curios how kodi handles the source paths. |
I am still completely lost. People are entering 2 different file paths? To what end? I have shared folders which contain multiple mounted drives that have sub-folders that sort movies. I have individual shared folders that contain sub folders which contiain movies. I have 12 shared drives with a main folder containing tons of TV shows folders. What "string" am I supposed to be entering. There has been nothing 'simple' about this. Before it was dead simple. |
So you have 12 different libraries defined in your jellyfin server?! |
What path are we supposed to be entering? Let's start there. Because this simple process is completely confusing. I have a library for Movies, one for TV Shows, one for Music Concerts, ooOne for Comedy Concerts, one for All Elite Wrestling, 2 different music libraries, ones for Movie Trailers, Videos, Cartoons and then 2 other movie libraries that I don't use within my Kodi clients. What path of the Kodi Add-on wanting entered from the Jellyfin server? |
In every library there must be configured the native path with which your jellyfin server does access the files. This is the native path on the server. But you had to enter thise replacement-paths bevor the removal, too. Otherwise it would have never worked. So instead of entering these on the server in the libraries you now habe to enter them in Clents under path replacements. And here is a final example. If your directory structure on the server is sth. like this and your server is reachable via smb, let's say at than the path replacement would be OR: it would be ====== But you said you have shares. Then you will have to have several path replacements. => /mnt/smb_remote_mounts => smb://NAS1 If the shares are named completely different, like then you will need a replacement like this The goal is always, that you replace the PATHES to your files (you can always replace the whole pathes), so that the client can find the files under the replacement path Over and out on this. |
For my Movies library my sources are: \MediaServer1\Movies 1 TV Shows are: \MediaServer2\TV Shows\TV Shows 1 Concerts: \MainPC\F\Concerts Music \MainPC\F\Concerts Comedy And thus like that. I am not new to Kodi and been using Jellyfin for a few years now. This entire process has only been confusing from the start. |
Do each of those shares represent a separate library in jellyfin with different content, or do you have multiple sources for a specific library? For example: …\TV Shows 1 through …\TV Shows 11 all mapped to a single TV show library. or …\TV Shows 1 mapped to TV Show Library 1, ….\TV Shows 2 to TV Show Library 2, etc. |
Yes each are lists of the various drives/folders that are grouped into the named library ie: Movies, TV Show,s Concerts ect. My whole library is a mess right now though after trying to sort out some drive locations and now I figure I need to start from a fresh brand new install. Joy! |
I am having a weird issue as well though i am not sure that is related to the addon only. When using native paths no matter what i do any movie started using the "Enter" Key directly from the movies library is shown as "no more part of the library" and won`t play. Next weird thing is a movie shown up as new movie in a widget will play as well even if not using the context menu. I could not figure out what exactly the issue is here... |
The entire add-on in Kodi is just completely borked for me now. Can't get it to do anything other that see my server and let my user account login. Can't add/manage libraries, and access any media, nothing. And that's using add-on mode not even trying to figure out the change to native mode. Nothing works. At all. Frustrated because this did work so easy and simple and awesome. And now. Nothing. |
I regret this already.
Fixes #936 and #937, supercedes #925 and #926.
Stores path replacement information in the
data.json
file. Users are prompted to enter path information after selecting native mode from the setup wizard, and have an additional "Manage path replacements" option inside of the addon itself. No limit as to how many replacements can be added. Haven't tested with direct NFS/SMB paths because I don't have any set up for it right now, but local path replacement seems to work as intended so no reason to expect they wouldn't.Realistically should have it's own custom menu screens to match the existing popup dialogs instead of the standard listitem selection/input screens, but after staring at the XML required for far too long I don't care enough to figure it out.
fixes #936
fixes #937
closes #925
closes #926