Skip to content
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

Kodi 18 Leia alpha-version issues #339

Closed
troych opened this issue Sep 6, 2017 · 10 comments
Closed

Kodi 18 Leia alpha-version issues #339

troych opened this issue Sep 6, 2017 · 10 comments

Comments

@troych
Copy link

troych commented Sep 6, 2017

Hi there, I'm getting this error when I enable the music library in PlexKodiConnect's options on my Kodi 18 machine. Any idea what the cause of this may be? I'm running native paths of this helps anything.

Kodi 18.0-ALPHA1 Git:20170903-7161dc0
PlexKodiConnect 1.8.11
MyMusic67.db

14:03:48.449 T:140426425100032  NOTICE: PLEX.utils -> ERROR: add_updateSong has crashed. Error: no such table: song
14:03:48.497 T:140426425100032  NOTICE: PLEX.utils -> ERROR: Traceback:
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/utils.py", line 969, in wrapper
                                                return func(*args, **kwargs)
                                              File "/home/kodi/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/itemtypes.py", line 1590, in add_updateSong
                                                kodicursor.execute("select coalesce(max(idSong),0) from song")
@croneter
Copy link
Owner

croneter commented Sep 6, 2017

As Kodi 18 is still in alpha, this could be "fixed" or changed again on the Kodi side any day.

Don't expect a quick fix from the PKC side...

@troych
Copy link
Author

troych commented Sep 6, 2017

I see, thanks for the info. I'll close this and disable updates for PKC for now, lets hope 18 is stabilizing soon.

For anybody with the same problem: I've manually replaced the music db version number (67) in variables.py and strArtists with strArtistDisp in itemtypes.py. Things seem to be working for now.

I just can't go back to a world without netflix plugin for kodi. :D

@troych troych closed this as completed Sep 6, 2017
@croneter croneter reopened this Sep 7, 2017
@croneter croneter changed the title Error: no such table: song on Kodi 18 Kodi 18 Leia alpha-version issues Sep 10, 2017
@croneter
Copy link
Owner

croneter commented Sep 10, 2017

If you run into SSL issues like

ERROR: CCurlFile::Stat - Failed: SSL connect error(35) for https://192.168.2.200:32400/photo/:/transcode?width=4000&height=4000&minSize=1&upscale=0&url=/library/metadata/7977/art/1477376189&X-Plex-Token=<TOKEN>
ERROR: CCurlFile::FillBuffer - Failed: SSL connect error(35)
ERROR: CCurlFile::Open failed with code 0 for https://192.168.2.200:32400/photo/:/transcode/?width=4000&height=4000&minSize=1&upscale=0&url=/library/metadata/7977/art/1477376189&X-Plex-Token=<TOKEN>
ERROR: GetDirectory - Unable to get http directory (https://192.168.2.200:32400/photo/:/transcode/?width=4000&height=4000&minSize=1&upscale=0&url=/library/metadata/7977/art/1477376189&X-Plex-Token=<TOKEN>)
ERROR: GetDirectory - Error getting https://192.168.2.200:32400/photo/:/transcode/?width=4000&height=4000&minSize=1&upscale=0&url=/library/metadata/7977/art/1477376189&X-Plex-Token=<TOKEN>

then try this:
login to https://app.plex.tv/desktop and connect to your PMS. Then navigate to any movie, hit the three dots ... in the upper right corner, then Show Information, then Show XML. In the new browser window, copy the URL like

https://192-168-2-200.6eb604e9b8c94479bfc096<CUT>.plex.direct

In the PKC connection settings, manually connect to that URL

@croneter
Copy link
Owner

The PKC library sync thread might crash with the following log entry:

OperationalError: no such table: art

Unfortunately, a lot of code references this table. I'm not going to adapt the PKC code until it's clear that this change is permanent - so until Kodi 18 is at least beta

@davidheitman
Copy link

davidheitman commented Dec 2, 2017

Edit: Updated some of the fine details for the latest kodi db version. This is based on a build of my fork of the kodi retroplayer fork (it's just a fork of the retroplayer branch, but I merge upstream changes from the xbmc master more often/at my convenience, so it's more up to date than retroplayer, but should otherwise be the same as building the master xbmc branch, https://github.com/Lou-Cipher/xbmc if you're interested).

I just wanted to leave a quick comment as to what I had to do to get all my media working and no crashes with Kodi 18 and the current 1.8.18 version of plexkodiconnect. Some db modifications were necessary, and I'm going to leave step-by-step directions for anyone who might not be familiar with sqlite editing. This works on Kodi 18 built from master as of about a half hour ago. Note that this is a bit hackity, and adds DB tables that plexkodiconnect expects to exist, but which do not, as of this writing, exist in the DBs. This may well break things in the future, and hopefully be unnecessary soon enough (and many thanks to croneter for all his hard work on this amazing plugin! And troych for putting me on the path to this solution), but for now this will get you going.

Go to ~/.kodi/userdata/Databases (or wherever they are on your OS, linux ftw)
Run sqlite3 (install if necessary), and run the following commands:

.open MyVideos109.db
CREATE TABLE tag (tag_id integer primary key, name integer);
.open MyMusic70.db
CREATE TABLE album_genre (iOrder INTEGER, idGenre INTEGER, idAlbum INTEGER, FOREIGN KEY(idGenre) REFERENCES genre(idGenre), FOREIGN KEY(idAlbum) REFERENCES album(idAlbum));
CREATE TABLE albuminfosong (idAlbumInfoSong INTEGER PRIMARY KEY, idAlbumInfo INTEGER, iTrack INTEGER, strTitle TEXT, iDuration INTEGER, FOREIGN KEY(idAlbumInfo) REFERENCES album(idAlbumInfo));
ALTER TABLE song ADD COLUMN strArtists text;
.exit

Now edit ~/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/variables.py

Locate _DB_MUSIC_VERSION, and ensure that Kodi version 18 (with the comment # Leia) is set to DB version 70. Then, locate _DB_VIDEO_VERSION, and ensure that Kodi version 18 is set to DB version 109.

Restart Kodi, and resync your database via plexkodiconnect's Advanced options menu. Should now have full sync for Movies, TV Shows, and Music (although Music still requires direct paths to avoid the dreaded 401 endless sync, see issue #14). Should be good to go.

@lilyinstarlight
Copy link

lilyinstarlight commented Feb 26, 2018

I believe I have this working with the database changes for Leia. I basically removed code that updated the database for things Kodi didn't even use anyway and bumped the DB versions. See the fkmclane/PlexKodiConnect hotfixes branch.

Relevant Kodi commits:
xbmc/xbmc@8193496
xbmc/xbmc@873c1a3

@hanzoh
Copy link

hanzoh commented Feb 28, 2018

The jump from 108 to 109 only removed a column in the settings table: xbmc/xbmc@9dc6e1d#diff-dbf978b6cac348a2af93d3beec420e43

So I am using 1.8.18 just fine with the latest nightly by changing 108 to 109 in variables.py.

Regarding the warning about cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu":
I think the Kodi warning is just right, because this in settings.xml cannot work:

<setting type="lsep" label="" /> <setting id="skipContextMenu" type="bool" label="30520" default="false" visible="eq(-1,true)" subsetting="true" />

visible="eq(-1,true)" determines the visibility of a setting by the state of the prior settings element. That element is a separator which has no state. So the "visible" tag can be removed as the default is 'true'.

Edit: I just saw that his commit caused this:
1e8ec2f#diff-af43a89be9d2f2f9592bb0e0fdeb2138

@hanzoh
Copy link

hanzoh commented Mar 4, 2018

@croneter I have just tested the beta release 2.0.4 with Kodi 18.
With the 2 fixes I proposed above it also works fine except for one thing:
When starting any movie episode, I get a popup that playback has failed and immediately after that it starts the video, but the box remains and I have to hit ok.

I checked playback.py and found the attribute RESOLVE which also triggers playing back PKC_Dummy_Path_Which_Fails before the actual video. Are you planning on making this configurable because right now it is hardcoded with true in all instances?

@davidheitman
Copy link

@fkmclane Nice work, looks like Kodi is settling on MyMusic version 70, https://kodi.wiki/view/Databases#Database_Versions

@lllopo
Copy link

lllopo commented Mar 20, 2018

Is it possible to merge these to master, if there are no conflicts, so we can all use PKC on Leia ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants