PM4K / PlexMod for Kodi (18, 19, 20, 21, 22+)

OK, I’ve investigated a little and have found one serious difference between Kodi 19 and 18.

Upon playback Kodi 19 does this, which Kodi 18 doesn’t: CUtil::ScanForExternalSubtitles: Searching for subtitles... and it opens plex.server:32400/library/parts/XXXXX/YYYYYYYYY/, which it seems to get from the target URL, which in this case would be plex.server:32400/library/parts/XXXXX/YYYYYYYYY/file.mkv.

It does so without supplying an X-Plex-Token - when you don’t have the List of IP addresses and networks that are allowed without auth setting enabled, this plainly fails with a 401 and the playback immediately starts.

Once you enable that setting, that folder index returns the whole Part as it seems (in my test case a 500MB sized video file). This leads to a serious amount of startup time and potentially breaks the video player.

Kodi 18 doesn’t do that, Kodi 19 does.

I’m not sure who’s at fault here, but this does not seem fixable by P4K, as I don’t know whether I can tell Kodi to skip that particular subtitle scan.

@ruuk FYI

1 Like

For the time being this doesn’t seem fixable. The behaviour was added in Kodi 19. I’ve raised this with the PMS team, maybe they can alter the response of the endpoint, but no promises there.

OK, with a great idea from @ruuk we might have a solution. I’ll post a test build this weekend.

Both of my Kodi 19 branches have the fix applied; PR is also ready. Please test!

Edit: Kodi19 branch might have slight regressions, I already caught one. develop-kodi19 is fine. Please report.

Edit 2: PR merged in official repo.

Hi,
I’m running Kodi 19.1 on OSMC. I just downloaded the latest code from develop_kodi19 (b83a26c) and installed it. When I run it, it fails to start. All I see in the log is “script aborted”.
More log content here.

Any suggestions?

No idea, really. You might be missing dependencies that are not installed implicitly.
You can try installing the official Plex for Kodi addon and then installing mine.

The newest Plex4Kodi should be available, though, which is 0.3.4 (without my changes)

It’s working after resetting Kodi entirely and re-installing.
BTW the develop_kodi19 branch has a bug: navigation is broken inside a TV show. It kodi19 branch works fine.
Thanks for the awesome work on the add-on!

I have no issues navigating a TV show with develop_kodi19. Can you elaborate?

I don’t remember if it was inside the TV show or inside a season, but once I got there, there was nothing selected, and left, right, etc buttons didn’t have any effect.

OK, please try to reproduce this, then I’ll investigate. Thanks!

Edit: And include a log, please!

Another issue I have noticed is that when I change a subtitle it needs to reload the whole stream.

This issue still exists

In kodi 19.1, the plex plug has a bug. When I want to turn on the music, it doesn’t play.

2 Likes

Have a bug in the latest update, getting this error when playing The Sacred Timeline Cut that never happened before when watching it. Only happened when I updated the plug-in. Can anyone shed any light? Same file plays fine in the native Android TV Plex app. Thanks.

error ‘>=’ not supported between instances of ‘int’ and ‘Non Integer’

Trying to watch 2 part movies such as:

The Lord of the Rings The Return of the King (2003)

  • The Lord of the Rings The Return of the King (2003) - pt1.mkv
  • The Lord of the Rings The Return of the King (2003) - pt2.mkv

gives me thje following error:

error ‘>=’ not supported between instances of ‘int’ and ‘NoneType’

@MagicSG1

Logs?

I noticed another behavior change with Kodi19:
When switching subtitles it restarts playback and then jumps back to where it was (perhaps I didn’t explain properly earlier)

For me that’s really annoying since I have a high latency storage.

With Leia it just changes the subtitle without restarting playback.

https://paste.kodi.tv/zoqabozoke

@panni

I have found a bug in the latest version.

I have a couple of HEVC files that have DTS audio.

P4K is transcoding audio where isn’t needed. It used to passthrough the audio since I have a spdif out on my RPi3.

Captura de tela 2021-09-26 231356

My client is running on RPi3 and my server is on the Nvidia Shield TV.

Can you have a look at that for me?

Please let me know.

Thanks!

Hi.
The plex for kodi addon is working fine on Kodi 19 but the subtitles search doesnt work. I tried with several addons, opensubtitles, subcene, a4k but none of them work with plex addon. In kodi 18 worked flawless.

Please fix this! I love to use plex for kodi addon for the UI.
Plexkodiconnect and composite work in kodi 19 with subtitles search with no problems…

Thank you!

@panni I’ve found and fixed a few bugs, I believe including the one @MagicSG1 and @jakkarus mentioned. Opened PRs:
https://github.com/pannal/plex-for-kodi/pulls

Anyone should feel free to download my fixed version from here: GitHub - garymm/plex-for-kodi at garymm-fixes

1 Like