PlexKodiConnect: Kodi Plex Integration Done Right

I currently have 5 Plex libraries set up, with the following paths

Documentaries : \media\Documentaries
Movies: \media\Movies
Music: \media\Music
TV Shows: \media\TvShows
Ski Films: \media\Ski Films

So, everything is in the same \media\ directory, but obviously the things like Ski Films and Movies are both of type “Movies” for Kodi. and Documentaries and TV Shows both contain TV Shows. It seems like this could cause problems with Direct Play, but still just trying to make sense of it all!

Here is some additional log info

2020-02-19 15:29:05.318 T:2696 NOTICE: PLEX.MOVIES: PKC add-on for movies started
2020-02-19 15:29:05.526 T:16608 NOTICE: PLEX.playback_decision: User chose playback method DirectPlay in PKC settings
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Plex clip or music track, not transcoding
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: PKC decided on playback method DirectPlay
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Lets ask the PMS next
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Asking PMS with maximal quality settings
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS general decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS Direct Play decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS MDE decision 1000: Direct play OK.
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS transcoding decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: The playurl for DirectPlay is: https://192-168-1-40.54d77bd6d19442a58a7fa5a00ee05ec6.plex.direct:32400/services/iva/assets/845741/video.mp4?bitrate=1500&Accept-Language=en&X-Plex-Platform=Generic&Connection=keep-alive&X-Plex-Device-Name=KodiUPSTAIRS&X-Plex-Provides=client%2Ccontroller%2Cplayer%2Cpubsub-player&X-Plex-Token=xxxxxxxxxxxxxxx-Plex-Model=10&X-Plex-Platform-Version=1.0.0&X-Plex-Client-Identifier=6536006f-f831-432d-a991-7f052d1e0d18&Accept=*%2F*&X-Plex-Device=Windows&X-Plex-Product=PlexKodiConnect&Content-Type=application%2Fx-www-form-urlencoded&X-Plex-Version=2.10.12
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.api: Found external subs:
2020-02-19 15:29:05.577 T:2696 NOTICE: PLEX.MOVIES: PKC add-on for movies stopped
2020-02-19 15:29:05.583 T:19220 NOTICE: VideoPlayer::OpenFile: plugin://plugin.video.plexkodiconnect.movies/?plex_id=11852&plex_type=clip&mode=play&filename=None

Exactly, that works best!

As it says: you’re direct playing. One step above that, you’d see a file path to your server instead of an url

I see that it does say Direct Play, but here again is a fuller portion of the log.

2020-02-19 15:29:05.318 T:2696 NOTICE: PLEX.MOVIES: PKC add-on for movies started
2020-02-19 15:29:05.526 T:16608 NOTICE: PLEX.playback_decision: User chose playback method DirectPlay in PKC settings
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Plex clip or music track, not transcoding
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: PKC decided on playback method DirectPlay
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Lets ask the PMS next
2020-02-19 15:29:05.527 T:16608 NOTICE: PLEX.playback_decision: Asking PMS with maximal quality settings
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS general decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS Direct Play decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS MDE decision 1000: Direct play OK.
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: PMS transcoding decision None: None
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.playback_decision: The playurl for DirectPlay is: https://192-168-1-40.54d77bd6d19442a58a7fa5a00ee05ec6.plex.direct:32400/services/iva/assets/845741/video.mp4?bitrate=1500&Accept-Language=en&X-Plex-Platform=Generic&Connection=keep-alive&X-Plex-Device-Name=KodiUPSTAIRS&X-Plex-Provides=client%2Ccontroller%2Cplayer%2Cpubsub-player&X-Plex-Token=xxxxxxxxxxxxxxx-Plex-Model=10&X-Plex-Platform-Version=1.0.0&X-Plex-Client-Identifier=6536006f-f831-432d-a991-7f052d1e0d18&Accept=%2F&X-Plex-Device=Windows&X-Plex-Product=PlexKodiConnect&Content-Type=application%2Fx-www-form-urlencoded&X-Plex-Version=2.10.12
2020-02-19 15:29:05.556 T:16608 NOTICE: PLEX.api: Found external subs:
2020-02-19 15:29:05.577 T:2696 NOTICE: PLEX.MOVIES: PKC add-on for movies stopped
2020-02-19 15:29:05.583 T:19220 NOTICE: VideoPlayer::OpenFile: plugin://plugin.video.plexkodiconnect.movies/?plex_id=11852&plex_type=clip&mode=play&filename=None

Can you elaborate on the difference between the PMS Direct Play Decision, and the PMS MDE Decision. One says Direct Play Decision none, the other says Direct play OK.

I don’t see the filepath to my server anywhere else except for within the https URL you quoted.

I appreciate all your help with this!!!

Ok, I rearranged all my media to look like this.

  • Media
    • Movies
      • Cinema Films
      • Ski Movies
      • Documentary Movies
    • TV Shows
      • TV Shows
      • Kids TV Shows
      • Documentaries
    • Pictures
    • Music

I then set up Direct Paths to switch from original path of /media/TVShows to SMB://IPADDRESS/Media/TVShows and the same for Movies.

I originally thought I just wanted “Direct Play”, but I now have it setup for “Direct Path” which I think is ACTUALLY what I wanted. I mistakenly thought that Direct Path would basically bypass PMS totally (except for initially grabbing the media and metadata). I didn’t think watched status was going to work, and I didn’t think playing it would still show up in Tautulli, but it does!

I think I have it all set up and working as I want it to!

I appreciate the help, and enjoy the coffee!

https://Ko-fi.com/home/coffeeshop?txid=5a96a652-106d-4250-b0c5-b2927519d004&mode=public&img=ogiboughtsomeone

Glad it worked! :laughing: And thanks a lot for the coffee :heart:

Changelog

version 2.11.0 (beta only):

  • Fix PKC not burning in (and thus not showing) subtitles when transcoding
  • When transcoding, only let user choose to burn-in subtitles that can’t be displayed otherwise by Kodi
  • Improve PKC automatically connecting to local PMS
  • Ensure that our only video transcoding target is h264
  • Fix adjusted subtitle size not working when burning in subtitles
  • Fix regression: burn-in subtitles picking up the last user setting instead of the current one

Hi Croneter,

with 2.11.0 i can’t play any file. in the log it mentioned i’m using direct path, but i’m not.
I reset database and reboot, same issue. Even after specifying addon path.

2020-02-24 22:00:30.190 T:3778347840  NOTICE: PLEX.playback_decision: User chose playback method DirectPath in PKC settings
2020-02-24 22:00:30.227 T:3778347840  NOTICE: PLEX.playback_decision: PKC decided on playback method DirectPlay
2020-02-24 22:00:30.228 T:3778347840  NOTICE: PLEX.playback_decision: Lets ask the PMS next
2020-02-24 22:00:30.229 T:3778347840  NOTICE: PLEX.playback_decision: Asking PMS with maximal quality settings
2020-02-24 22:00:30.352 T:3778347840 WARNING: PLEX.download: Unknown answer from PMS https://192-168-50-10.xxx.plex.direct:32400/video/:/transcode/universal/decision?maxVideoBitrate=2147483647&hasMDE=1&protocol=hls&copyts=1&partIndex=0&autoAdjustQuality=1&session=a62fdc41-a7c1-4179-8d10-bc58b4b9608c&path=%2Flibrary%2Fmetadata%2F20554&videoResolution=3840x2160&directStream=1&videoQuality=100&directPlay=1&audioBoost=0&fastSeek=1&directStreamAudio=1&subtitleSize=100&mediaIndex=0&mediaBufferSize=20480 with status code 400.
2020-02-24 22:00:30.353 T:3778347840 WARNING: PLEX.playback_decision: Could not find suitable settings for playback, aborting
2020-02-24 22:00:30.354 T:3778347840 WARNING: PLEX.playback_decision: Error received: 'bool' object has no attribute 'get'
2020-02-24 22:00:30.359 T:3261068096  NOTICE: PLEX.TVSHOWS: PKC add-on for tv shows stopped
2020-02-24 22:00:30.377 T:4089774096   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.plexkodiconnect.tvshows/20541/?plex_id=20554&plex_type=episode&mode=play&filename=xxx.mkv]

Known issue, but thanks. Either Force transcode or stick to PKC stable, not beta :wink:

This is fixed now :slight_smile:

Changelog

version 2.11.1 (beta only):

  • Rewire the set-up of audio and subtitle streams, esp. before starting a transcoding session. Fixes playback not starting at all

yes, i confirmed it all working fine now.
Thanks a lot @croneter

Despite running 2.10.2 my sync on startup locks and requires a hard reboot of my Kodi player. I disabled background sync too. Any ideas? Should I try a beta?

No, try stable 2.10.12 :stuck_out_tongue:

Sorry. Typo. I’m running 2.10.12.

As I can’t do magic, I’ll need your DEBUG logs, see here: How to Report A Bug · croneter/PlexKodiConnect Wiki · GitHub

Hi Croneter

Just updated to 2.11.2 and ran across an issue when adding a widget to the home screen. I’m using the Titan Mod 18.1.17 skin. If I try to add a PKC Music widget to the home screen I get the following error,

’none type’ object has no attribute ‘getitem

It’s only happening with the Music widgets.

Need a log?

Thanks,
Ken

Yes.

When adding the music widget, did you navigate via “Music” when searching for the right pkc widget? “Video” won’t work correctly

I’ve submitted “Receiving error, ’none type’ object has no attribute ‘getitem’ when adding a PKC Music widget to homescreen #1136” on github with log.

Yes, it happens when navigating via “Music”.

Thx, Ken

Thanks for the report, fixed now.

Changelog

version 2.11.3 (beta only):

  • Fix TypeError: ‘NoneType’ object has no attribute __getitem__, e.g. when displaying albums

@croneter Looking good, I’m able to add the Music widgets to my home screen. Appreciate the quick fix!

Thx, Ken