[MYSQL] HOW-TO: 5 User XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110) +--- Thread: [MYSQL] HOW-TO: 5 User XBMC (/showthread.php?tid=196821) |
RE: [MYSQL] HOW-TO: 5 User XBMC - john_es - 2016-04-27 What does the "TRIGGER FIX FOR MULT USERS" part actually do? RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2016-04-28 @john_es Yes you could use Main and X numbers, It's just how I like it with names and if I need to pull data from the DB I don't need to remember who is who If I get to it I might do up a little script to sub in the names. "This has only been Tested on a New Setup" This means that using Kodi to upgrade the DB will prob fail as there are new tables and columns, and files is a view now not a table as its been renamed to globalfiles PHP Code: /* TRIGGER FIX FOR MULT USERS */ This is a clean-up Trigger the default Kodi install has it, This will remove any bookmarks, settings, stacktimes, and streamdetails info when you remove a file from the globalfiles.
If you are like me and keep everything then this isn't really needed but I know some people delete stuff and this will keep the DB tidy. Hope that answers your questions RE: [MYSQL] HOW-TO: 5 User XBMC - npbhdk - 2016-05-04 I attempted to use the 99 instructions, didnt get any errors when using the sql. But kodi seems to fail at inserting data into the views. i get errors like this when i attempt to scan files 18:19:34 T:944 ERROR: SQL: [Niels_Video_99] Undefined MySQL error: Code (1471) Query: insert into files (idFile, idPath, strFileName) values(NULL, 8, lots-tfoftr.mkv') 18:19:34 T:944 ERROR: CVideoDatabase::AddFile unable to addfile () and 18:19:17 T:5900 ERROR: SQL: [Niels_Video_99] Undefined MySQL error: Code (1471) Query: insert into path (idPath, strPath) values (NULL, 'smb://N-HTPC-PC/tv2/') 18:19:17 T:5900 ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath) values (NULL, 'smb://N-HTPC-PC/tv2/')) when attempting to change content type of a source this works when i use the master database in the advancedsettingsfile scanning for content does not RE: [MYSQL] HOW-TO: 5 User XBMC - RonM - 2016-05-05 Big thanks to BigMong. I have been stuck on Kodi 14 multi-user setup, postponing the upgrade because of all the work to figure out the new database schema and views. You made my life a lot easier, thanks! Next step is to upgrade to Kodi 16.1, but since all my devices run on OpenELEC, I'll wait another month or so as it is still in beta (OpenELEC 7.0 beta 3). BTW, I too use trakt.tv and can recommend it to anyone. The free version is sufficient for most any user, but I decided to become a VIP ($2.50/month). RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2016-05-05 @npbhdk (2016-05-04, 18:23)npbhdk Wrote: I attempted to use the 99 instructions, didnt get any errors when using the sql. But kodi seems to fail at inserting data into the views.If I understand right, you are using all systems Master and Slaves to scan for media? (I have found its best to use only the one system Master or Slave to import, as when you do a scan on a different user it will redo the whole TV Shows as the Hash changes (Haven't looked too far into why that is)) By the looks of the errors its trying to INSERT into a non insertable view, I would check that you can view data in that view "files" that is linked to "globalfiles" does the Master and Slave connect to the DB with the same Login? Does the login being used have All Privileges to the view? @RonM Thank You, Glad you are loving it, OpenELEC on some RPI2 or 3's work awesome around the house, and now a few streets over, over a PTP WiFi network RE: [MYSQL] HOW-TO: 5 User XBMC - npbhdk - 2016-05-06 (2016-05-05, 16:06)BigMong Wrote: @npbhdk Ive tried both scanning on the master and the slave, neither works and yes they use same database login, ive tried logging into the database with a gui client and i can insert data into the view with that, and i can see it aswell. Not really sure why it fails with kodi The mysql user has these priviliges (GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' WITH GRANT OPTION) so if got it right(havent used mysql much) it should be able to do everything like root can tried to use root login didnt work either same error. RE: [MYSQL] HOW-TO: 5 User XBMC - D0bby - 2016-05-17 Edit: "question was dump^^" RE: [MYSQL] HOW-TO: 5 User XBMC - D0bby - 2016-05-17 Got it. Thanks anyways for the awesome script RE: [MYSQL] HOW-TO: 5 User XBMC - Sushi7 - 2016-06-27 @BigMong I use the default Kodi Watch Status. pressing W or Context menu Mark as Watched. Once I have my "Matt" DB created I open Kodi and test the Watch Status work. After I implement the code: Code: RENAME TABLE `Sushi99`.`files` TO `Sushi99`.`globalfiles`; The watched status does not function anymore. From the Log: Code: 16:48:27 T:9872 DEBUG: CInputManager::OnKey: w (0xf057) pressed, action is ToggleWatched I have narrowed it down to this code, and this is the first and only SQL Queries I have run. I believe Kodi 16.1 Jarvis has made some changes that after we ALTER the Tables/Views this breaks. This was working on 15 Isengrad RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2016-06-28 @Sushi7 Is this only when you are marking as un-watched? does it work marking as watch or watching the video? I will do some testing also what version of MySQL are you running? Mine is running on an older one "Server version: 5.5.40-0ubuntu1 - (Ubuntu)" RE: [MYSQL] HOW-TO: 5 User XBMC - Sushi7 - 2016-06-28 MySQL 5.7 Windows Kodi 16.1 Jarvis Windows 10 Pro Trying to mark or unmark Watched does not work but watching the Movie all the way through automatically marks as watched MySQL states error 1288: Error: 1288 SQLSTATE: HY000 (ER_NON_UPDATABLE_TABLE) Message: The target table %s of the %s is not updatable https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html I have also checked the IS_UPDATABLE column in the INFORMATION_SCHEMA.VIEWS table and it is set properly by default. http://dev.mysql.com/doc/refman/5.7/en/view-updatability.html If I run the query manually directly in SQL on the View Files it works Code: update files set playCount=NULL,lastPlayed=NULL where idFile=2 Just not from within Kodi RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2016-06-28 @Sushi7 I spotted that error and I have tested the manually running the SQL it's strange that it works when your watch an episode but that is calling a different SQL string After a few mins looking at the source on GitHub https://github.com/xbmc/xbmc In the /xbmc/video/VideoDatabase.cpp file, line 5155 I believe is the SQL that is Prepared Code: if (!date.IsValid()) I will setup my 16.1 Kodi again and do some testing over the weekend RE: [MYSQL] HOW-TO: 5 User XBMC - gaxander - 2016-07-28 (2016-06-28, 14:43)BigMong Wrote: @Sushi7 Have you made any progress?? RE: [MYSQL] HOW-TO: 5 User XBMC - ascona - 2016-08-01 (2016-07-28, 11:28)gaxander Wrote:(2016-06-28, 14:43)BigMong Wrote: @Sushi7 Yep I'm getting the same issue and still can't figure it out after spending most of the night on it! RE: [MYSQL] HOW-TO: 5 User XBMC - Sushi7 - 2016-08-15 I have decided to use Isengrad 15 to be able to use the Watch status correctly. |