PlexKodiConnect: Kodi Plex Integration Done Right

@DocACE911 said:
I am sure the answer is no…

Is adding plexbmc ok yo just get play lists??

I honestly don’t know :slight_smile:

@jasmart said:
@croneter Just some feedback that 1.1.1 is working perfectly for me. It has resolved the initial connection error I was seeing on the last revision. No issues on exit, or any others to report so a big thank you for your hard work.

A quick question. I don’t keep Kodi running all the time, it’s on my android tv so I quit when done. I’m not that bothered about Kodi detecting changes the second they happen. So should I leave the constant background sync on or is it better to disable. Any advantage or disadvantage?

There are not really any disadvantages, hence I would keep background sync on. As soon as you fire up kodi again, a full sync takes place

@polux400 said:
Hello, using Recalbox OS (with Kodi 15.2), can’t initialize my librairies with PKC.
Already tried to repair, still KO.
On my OSMC (Kodi 16) everything was working fine…
Problem is with 1.1.0 version of PKC, I’ve tried 1.0.7 just in case, but sync still crash…

Please find log enclosed, thank you for your help guys !!
pastebin.com/zsS9WuPS

I dont really know how to read logs but this piece seems suspicious :

! 03:43:18 T:1342174192 ERROR: Exception in thread Thread-6:
! Traceback (most recent call last):
! File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
! self.run()
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1426, in run
! self.run_internal()
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1514, in run_internal
! self.syncPMStime()
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 299, in syncPMStime
! with kodidb.GetKodiDB(‘video’) as kodi_db:
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/kodidb_functions.py”, line 30, in enter
! self.emby_db = Kodidb_Functions(self.kodiconn.cursor())
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/kodidb_functions.py”, line 48, in init
! self.artwork = artwork.Artwork()
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/artwork.py”, line 43, in init
! self.setKodiWebServerDetails()
! File “/recalbox/share/system/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/artwork.py”, line 76, in setKodiWebServerDetails
! xbmc_webserver_enabled = result[‘result’][‘value’]
! KeyError: ‘result’
!

Could you try enabling the Kodi Webserver and test again? See http://kodi.wiki/view/Webserver

@mini.PLEX said:

@bigbadrabbit said:
Still getting the same Kodi-Log-Error on startup as with 1.1.0

Latest working version for me still is 1.0.17
Log

same problem here, seems to be a Mac OSX related issue.

@croneter, can you work with the logs provided?

@bigbadrabbit said:

@mini.PLEX said:

@bigbadrabbit said:
Still getting the same Kodi-Log-Error on startup as with 1.1.0

Latest working version for me still is 1.0.17
Log

same problem here, seems to be a Mac OSX related issue.

@croneter, can you work with the logs provided?

Yes, thanks a lot! Rest assured that I would be asking for more detailed logs otherwise

Has anything changed concerning the directhpath? I somehow cannot use it anymore.

@sylus said:
Has anything changed concerning the directhpath? I somehow cannot use it anymore.

No. Could you send me a PM with your logs please? :wink:

Just to clarify that it is not a config issue. A few version ago you posted that

  • Either use “Replace Plex UNC paths \myNas with smb://myNas” (easier)
  • or toggle "Replace Plex paths /volume1/media or \myserver\media with custom SMB paths

When I followed the new configuration, both options are toggled on so i disabled the replace plex UNC option.

As Kodi and PMS are on the same PC and all files are located on drive D, my path is simple

smb://d/movies

As least that is how it worked a few versions ago if i am not totally wrong.

I will do a full restet and post the logs.

@sylus said:
Just to clarify that it is not a config issue. A few version ago you posted that

  • Either use “Replace Plex UNC paths \myNas with smb://myNas” (easier)
  • or toggle "Replace Plex paths /volume1/media or \myserver\media with custom SMB paths

When I followed the new configuration, both options are toggled on so i disabled the replace plex UNC option.

As Kodi and PMS are on the same PC and all files are located on drive D, my path is simple

smb://d/movies

As least that is how it worked a few versions ago if i am not totally wrong.

I will do a full restet and post the logs.

That smb path looks all wrong. Should be something like smb://YOURPLEXSERVER/d/movies. Can you access your media using this path from another pc on the same network?

If kodi runs on the same machine as the PMS, try plugin in “d:\movies” in the PKC settings (if you are on Windows). You might need to type 2 back slashes d:\\ instead of one - don’t remember :slight_smile:

Okay I pretty much tried all possible combinations. It always leeds to this.

As all files are local I can connect directy via D:\Filme on my explorer.

  • 13:58:13 T:15956 NOTICE: DVDPlayer: Opening: D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien
    13:58:13 T:15956 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    13:58:13 T:14840 NOTICE: Creating InputStream
    13:58:13 T:14840 ERROR: CDVDPlayer::OpenInputStream - error opening [D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien]
    13:58:13 T:14840 NOTICE: CDVDPlayer::OnExit()
    13:58:13 T:15956 ERROR: PlayMedia could not play media: D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien
    13:58:13 T:15956 NOTICE: CDVDPlayer::CloseFile()

@sylus said:
Okay I pretty much tried all possible combinations. It always leeds to this.

As all files are local I can connect directy via D:\Filme on my explorer.

  • 13:58:13 T:15956 NOTICE: DVDPlayer: Opening: D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien
    13:58:13 T:15956 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    13:58:13 T:14840 NOTICE: Creating InputStream
    13:58:13 T:14840 ERROR: CDVDPlayer::OpenInputStream - error opening [D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien]
    13:58:13 T:14840 NOTICE: CDVDPlayer::OnExit()
    13:58:13 T:15956 ERROR: PlayMedia could not play media: D:\DD:\:D:\\D:\SD:\eD:\rD:\iD:\eD:
    D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\\D:\SD:\eD:\aD:\sD:\oD:
    D:\ D:\ D:\3D:\\D:\SD:\hD:\aD:\mD:\eD:\lD:\eD:\sD:\sD:\ D:\-D:\ D:\SD:\0D:\3D:\ED:\0D:\3D:\ D:\-D:\ D:\KD:\aD:\hD:\lD:\sD:\cD:\hD:\lD:\aD:\gD:\.D:\mD:\kD:\vD:\serien
    13:58:13 T:15956 NOTICE: CDVDPlayer::CloseFile()

OK, so using ‘d:\movies\’ and the like does not work, darn! My systems runs using windows network shares following this: http://kodi.wiki/view/SMB/Windows

Plex libraries will need to point to “\\MyPlexServer\movies”. You would need to ‘move’ your Plex libraries using this: https://support.plex.tv/hc/en-us/articles/201154537-Move-Media-Content-to-a-New-Location

In PKC you can then simply toggle: Replace Plex UNC paths \\myNas with smb://myNas

@croneter said:

So you don’t think we will ever see PKC being able to update instantly when new content is added? It used to do that but that was probably because of the constant polling. I just tried it and newly added content only show up after a full scan (30 minutes or restart).

New content should still show up within approx. 1min. Sync of watch status works?

I’m going to be away for work for a couple weeks so I won’t be able to do any testing til then. After about 3 more restarts with lockups it now shuts down properly so that issue must just be something On my end or I’m not waiting long enough after the initial scan?

Using the default skin and setting the option under syc to its lowest, wait 5 seconds for changes etc., I added a new tv show. Nothing appeared in recently added nor the regular library list until I restarted. I waited a good 10 minutes. Didn’t have time to wait the full 30 minutes.

I fast forwarded through an episode and I believe watched status was synced right away though.

Will get you logs in a couple weeks unless someone else sees this problem before that and posts or you notice it yourself.

Thanks!

OK, hopefully all startup crashes are now fixed. Mac Kodi used Pythonn 2.6, which did not know a method I was using :-).
If you have issues with videos suddenly starting and/or PKC complaining about not being signed in, the 3rd party plugin Video Extras might be responsible. They scan the Kodi DB and “call” the files, hence kicking of the PKC playback.

Download: https://github.com/croneter/PlexKodiConnect/releases

##Changelog##
version 1.1.2

  • Backwards compatibility py2.6: replace etree iter (fixes AttributeError: _ElementInterface instance has no attribute ‘iter’)
  • Redirect /Extras calls by e.g. Video Extras plugin
  • Try to shutdown more cleanly

Excuse me the dumb question: is there any way/workaround to use plexkodiconnect in parallel with kodi’s mysql sync?
I’ve read the OPs “Important note about MySQL database in kodi” - unfortunately I use kodi’s mysql sync for media which is not delivered by plex und I would like to use plexkodiconnect too.

Without investigating it further I get this in kodi.log after plexkodiconnect installation:
OperationalError: no such table: tag

@jimy@plex said:
Excuse me the dumb question: is there any way/workaround to use plexkodiconnect in parallel with kodi’s mysql sync?
I’ve read the OPs “Important note about MySQL database in kodi” - unfortunately I use kodi’s mysql sync for media which is not delivered by plex und I would like to use plexkodiconnect too.

Without investigating it further I get this in kodi.log after plexkodiconnect installation:
OperationalError: no such table: tag

The author’s note on the subject is fairly comprehensive:

“The addon is not (and will not be) compatible with the MySQL database replacement in Kodi. In fact, PlexKodiConnect takes over the point of having a MySQL database because it acts as a “man in the middle” for your entire media library.”

So if you want to use this you’ll have to ditch your mySQL database. The mySQL approach is a bandaid anyway on using a client/server approach to Kodi.

Thank you for the tip on “Video Extras Add-on” causing random videos to start playing. It was driving me CRAZY trying to figure out what I did wrong. Appreciate the continued development on this excellent add-on.

@croneter said:
OK, hopefully all startup crashes are now fixed. Mac Kodi used Pythonn 2.6, which did not know a method I was using :-).
If you have issues with videos suddenly starting and/or PKC complaining about not being signed in, the 3rd party plugin Video Extras might be responsible. They scan the Kodi DB and “call” the files, hence kicking of the PKC playback.

Download: Releases · croneter/PlexKodiConnect · GitHub

##Changelog##
version 1.1.2

  • Backwards compatibility py2.6: replace etree iter (fixes AttributeError: _ElementInterface instance has no attribute ‘iter’)
  • Redirect /Extras calls by e.g. Video Extras plugin
  • Try to shutdown more cleanly

@croneter

happy to report, the 1.1.2 version installed perfectly on a clean install on Kodi Krypton Mac osX.

thank you :slight_smile:

@mini.PLEX said:

@croneter

happy to report, the 1.1.2 version installed perfectly on a clean install on Kodi Krypton Mac osX.

thank you :slight_smile:

Yap! Here too! Thanks!! :smiley:

PKC 1.1.2 works with Krypton on OS X 10.11.4. Thanks again! :slight_smile:

@croneter

thx for the links.It finally works with the smb shares.
I followed ur hint and replaced Plex UNC paths \myNas with smb://myNas.

By the way, there was no need to change the folder/link of the libary in PMS.

During the whole try and error process I recognised a bug during the set up process of PKC. Eventhough u select the nativ paths and tell PKC to stop the sync until u had time to enter the path, it started the syncprocess and there was no way to stop it.

Beside this minor point, PKC is running fine so far. Thx a lot