Author Topic: Kodi MySql  (Read 2966 times)

0 Members and 3 Guests are viewing this topic.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Kodi MySql
« on: March 02, 2018, 07:20:50 PM »
Does VC hard code look only for port 3306 for MySql db connections for XBMC/Kodi? 
I am running mysql via docker container so the published port is different 'outside' the container

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi MySql
« Reply #1 on: March 02, 2018, 11:42:15 PM »
I don't know.  I'll have to take a look at the source code but in the meantime did you try to add the port after the IP address in the server field?

e.g.  192.168.1.102:3309

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Kodi MySql
« Reply #2 on: March 02, 2018, 11:49:25 PM »
I did try ip:port but didnt seem to work either. I also manually updated to the current DB version of my kodi instance (MyVideos107)
I had a local instance of mysql install and migrated a lot of my stuff into Docker containers so moved the port.  Finally updated my Kodi instance after my thin client had a HW failure or corrupted upgrade from OpenElec
I know I haven't updated my VC in awhile and havent upgraded yet, but I dont think the SQL plugin has changed.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi MySql
« Reply #3 on: March 02, 2018, 11:54:02 PM »
That's correct.  The xMySql plugin has not changed for quite a while, nor has the xSql plugin.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi MySql
« Reply #4 on: March 03, 2018, 10:44:27 AM »
Please try using the attached update to the xMySql plugin which allows you to specify the port.  I no longer have anything set up with MySql and Kodi so it would be quite a hassle for me to test this myself.

Remember to unblock the DLL: http://voxcommando.com/mediawiki/index.php?title=Unblock_DLL

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Kodi MySql
« Reply #5 on: March 03, 2018, 12:37:45 PM »
Thanks James!
I DL'd the dll and unblocked it but I get a load plugin error after VC loads.
Opening the plugin doesn't have the save options/save generate the last one did but that could be due to failed loading
3/3/2018 10:31:08 AM   VoxLog created / UAC test passed.
3/3/2018 10:31:08 AM   185   OS: Microsoft Windows NT 6.2.9200.0
3/3/2018 10:31:08 AM   186   Build: 9200
3/3/2018 10:31:08 AM   186   .Net version: 4.0.30319.42000
3/3/2018 10:31:08 AM   186   ready to launch program
3/3/2018 10:31:08 AM   186   safetorun is true
3/3/2018 10:31:08 AM   187   creating main form
3/3/2018 10:31:08 AM   415   Main thread loaded
3/3/2018 10:31:08 AM   416   Creating map editor
3/3/2018 10:31:08 AM   708   creating ResultsVars
3/3/2018 10:31:08 AM   711   passing maps to ResultsVars
3/3/2018 10:31:08 AM   711   Main thread loaded
3/3/2018 10:31:08 AM   711   Loading logging preference
3/3/2018 10:31:08 AM   712   Setting current directory
3/3/2018 10:31:11 AM   716   options: loading options
3/3/2018 10:31:11 AM   841   options: verifying speech engine culture language
3/3/2018 10:31:11 AM   841   SRE verify engine available: en-US |
3/3/2018 10:31:12 AM   543   launching application
3/3/2018 10:31:13 AM   249   Starting VoxCommando, version: 2.2.2.1

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi MySql
« Reply #6 on: March 03, 2018, 01:14:29 PM »
Can you please test with the latest version of VoxCommando.  The version you are using is very old.  Plugin services that plugins rely on have probably changed since then.

The image you are showing is not the latest version of the plugin which should be 2.0.1.1.  The new version has a separate field for entering the port.

We did test with both VC 2.2.2.1 and VC 2.2.4.1 and in both cases the plugin loads without error but we don't have a MySQL server for it to connect to.  You could always try to delete your plugin Options.xml file from the xMySql folder.

If you have multiple installs of VC make sure you are not mixing them up and double check that you definitely unblocked the dll in the correct folder.

Also it looks like you do not have logging enabled.  If you did, the log would be much much longer and I would ask that you send it as a .txt file attachment.  If you still can't get it to work and want to send a log please enable logging and then restart VC and then send me the .txt file.  You should probably email it to me rather than posting it to the forum in case in contains any sensitive information.
« Last Edit: March 03, 2018, 01:42:02 PM by nime5ter »

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Kodi MySql
« Reply #7 on: March 04, 2018, 01:54:11 AM »
Thanks Team VC;

I updated with new install of VC.  I see the updated plugin w/ the port now and no longer getting errors loading it nor generating the payloads.
The MOVIES payload only loads about 10% of my library though even though when I query directly in MYSQL the exact query select strpath|strfilename,c00 from movie_view
brings back a lot more records. MovieIDs payload shows what seems to be the correct amount
I fixed this for me by updating the query to:
select concat( strpath,strfilename),c00 from movie_view
« Last Edit: March 04, 2018, 02:12:43 AM by vulcanjedi »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kodi MySql
« Reply #8 on: March 04, 2018, 01:57:42 PM »
Glad it's working.  Thanks for pointing out the problem with that SQL query.

The double pipes probably come from copying queries over from the xSQL plugin which accesses Kodi's native database files and those use SqLite which uses || for concatenation.  MySQL generally only uses CONCAT() as you have shown.

As far as I can tell though the default configurations for Kodi do not use that payloadXML file at all.

All Kodi movie commands in VC's deafult Kodi configuration use: xbmcMovieIDs.xml and not xbmcMovies.xml so you can probably get rid of that SQL Query completely.

If someone knows what this other payloadXML (xbmcMovies.xml) is used for please let me know!  That XML is storing the complete path to the movie file so it might be useful in certain circumstances but generally we access movies in Kodi using the MovieID and not the full path to the file.
« Last Edit: March 04, 2018, 03:41:08 PM by jitterjames »