[MYSQL] HOW-TO: 5 User XBMC

  Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
vibe666 Offline
Member
Posts: 73
Joined: Jan 2007
Reputation: 0
Post: #226
just wondering how hard this would be to get set up without windows or linux using mysql on a synology (or other) nas?

there's a somewhat outdated tutorial on setting it up here for xbmc on an appleTV with a synology: http://quixventure.com/2011/12/configure...-for-xbmc/

just thinking it would be the perfect set-up if it could be done with nothing but a NAS and a few android tv boxes?

EDIT: read through the thread properly and have answered my own question. Smile
(This post was last modified: 2016-08-17 07:07 by vibe666.)
find quote
matika Offline
Junior Member
Posts: 1
Joined: Oct 2009
Reputation: 0
Post: #227
(2016-08-01 15:19)ascona Wrote:  
(2016-07-28 11:28)gaxander Wrote:  
(2016-06-28 14:43)BigMong Wrote:  @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())
        strSQL = PrepareSQL("update files set playCount=NULL,lastPlayed=NULL where idFile=%i", id);
      else
        strSQL = PrepareSQL("update files set playCount=NULL,lastPlayed='%s' where idFile=%i", date.GetAsDBDateTime().c_str(), id);
    }

I will setup my 16.1 Kodi again and do some testing over the weekend

Have you made any progress??

Yep I'm getting the same issue and still can't figure it out after spending most of the night on it!


I tried to manually change the playCount or lastPlayed in phpMyAdmin and came to the same error. the table ist just not updateable.

I don't have much knowledge of mySQL but i guess the following page is relevant:

http://dev.mysql.com/doc/refman/5.7/en/v...ility.html
find quote
mcfang Offline
Junior Member
Posts: 35
Joined: Mar 2011
Reputation: 0
Post: #228
(2016-06-28 13:24)Sushi7 Wrote:  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/...erver.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/v...ility.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

I was testing MySQL 5.7 with Kodi 16.1 and received this same error when attempting to mark an item as Watched/Unwatched and I was also able to confirm that running the SQL query manually does work on the database.

This led me to the conclusion that there was something at runtime that was determining if this query would work or fail - and the answer is in the view updatability information.

For the view to be updatable it must use the MERGE algorithm, but unless you have specified this when you created the view it will be using the UNDEFINED algorithm. When using UNDEFINED MySQL will choose the algorithm at runtime and (for reasons I haven't delved into) sometimes chooses an algorithm which is NOT updatable.

tl;dr: you need to specify the MERGE algorithm for your files view.

Notes: in the example below `MyVideos99` is your database and 'kodi' is your MySQL user.
Code:
CREATE OR REPLACE
   ALGORITHM = MERGE
   DEFINER = `kodi`@`%`
   SQL SECURITY DEFINER
VIEW `MyVideos99`.`files` AS    
SELECT  idFile, idPath, strFilename, playCount0 AS playCount, lastPlayed0 AS lastPlayed, dateAdded
FROM `MyVideos99`.`globalfiles`;
find quote
bpanonpt Offline
Junior Member
Posts: 3
Joined: Jan 2017
Reputation: 0
Post: #229
My head is about to explode! I've got lots of questions, but try to stick to a few at a time. I've read this post and it seems this is the best group for this. I'm using phpmyadmin, apache, sql via wampserver 3.0.6 on Win10. I'm a noob to sql of any type, and after 2 weeks I finally have it running with Kodi 17. Sort of, and half of what I want to do - sync multiple profiles across multiple devices through one server. I want to only install addons and libraries onto one device, the main pc with Win10 in my office, with all other devices to sync from the server on it. I want to share a few local libraries stored on an external usb hard drive, which isn't much, just home movies, music, family photo albums, etc. I want my main profile to be locked with the other accounts open. I'd like to incororate Emby and Traktv.

I had a small win today after mysql finally communicated with Kodi and built databases for the music and video. Which it wasn't working until I added a user via phpmyadmin where the host name is the name of my computer (WorkV2), because at first I was attempting it with the ip address and 'localhost'. Anywho, that's as far as I got.

I'm considering attempting the Database Version 99 from BigMong to get the 8+ user profiles up and running.
1) It mentions Jarvis, will it work with Krypton? Which i've installed to all my devices
2) Where does the query/code get entered on the phpmyadmin? Again, I haven't used it much, but I'm guessing copy and paste into the 'SQL' tab to 'Run SQL query/queries on server'.
3) Will I still need to edit 'advancedsettings.xml' use separate 'path substitution' commands to sync other folders for profiles, addons, lists, sources, etc? Or does this take care of it all?
4) Speaking of the path substitutions, I'm a bit confused: do I need to use my ip address of the server or the workstation's name, since that's what I had to use to make mysql and kodi talk?
a) I tried pathsub a few times from the kodi client on my office pc first before trying from other clients, and errors in the kodi log, repeated for each item I'm trying to substitute, (this is the error for lists):
ERROR: XFILE::CDirectory::Create - Error creating C:\Users\Admin\AppData\Roaming\Kodi\userdata\playlists\
ERROR: XFILE::CDirectory::Create - Error creating special://profile/playlists/
5) What files still need to be copied onto the devices and where? Just the advancedsettings.xml into [userdata] of each device?
6) I tried to sync to another device, firestick, and it didn't seem it was updating anything. Rebooted device and kodi and still appeared as though it was first installed.

I feel i'm super close and hope you guys can help!
(This post was last modified: 2017-01-11 15:47 by bpanonpt.)
find quote
bpanonpt Offline
Junior Member
Posts: 3
Joined: Jan 2017
Reputation: 0
Post: #230
Looking ahead, once this sql works with Kodi, what's the method for adding to the library db? Let's start with tv shows ... in the past, I would find a show, click add to library, then go back to videos and add files via the home folder/userdata/addondata/*name*plugin/, select folder tvshows, then choose the scraper, etc.
7) do i continue this method for the my 'matt_video' database from the main pc?
a) can it new shows be added or the section modified via other device?
8) since I want to be able to log in to this db from any client, what method is used when logged into a second device? does the db update accordingly for each user across devices with this '99' code?
9) will each user have privilege to add shows or is it done only while logged into master user 'matt'?
10) i imagine this question then invokes other questions surrounding locked options in profile settings...
a)are these settings controlled only from the 'matt' profile?

I had another small win today, pasted the query from Database Version 99 into the SQL query section and everything came up green checks! I changed the info to my setup. 'matt' is 'parent', 'mace' is 'kodi4fam', etc, and I changed the numbers to reflect Kodi 17, so videos 99 to 107. I've pasted the advancedsettings.xml from the main pc/userdata folder to another device userdata, will run Kodi from that device to see if anything syncs.
(This post was last modified: 2017-01-12 16:22 by bpanonpt.)
find quote
Meddie31 Offline
Junior Member
Posts: 2
Joined: Jan 2017
Reputation: 0
Rainbow  RE: [MYSQL] HOW-TO: 5 User XBMC
Post: #231
I'm new to all this. Has anyone heard of the Infinity TV box. I saw it advertised on Facebook. I'm having problems streaming films on it. It was ok, but then I had to do a hard reset. Not sure if the company is still going. But they are useless to get hold of. No Telephone, no email, just msg on Facebook. Then very often don't reply.
Anyone help me. Or suggest where I should post this request.
Frown
find quote
TRaSH Offline
Posting Freak
Posts: 1,124
Joined: Jul 2011
Reputation: 11
Location: Holland, The Netherlands
Post: #232
That's the issue with boxes like that,
You pay for it and the resellers give you 0% support.
Also most likely they have all kind of Banned add-ons (wiki) on it.
Also you won't get support here for it.
It has nothing to-do with Kodi,
Except they are making a bad name of it.



Verstuurd vanaf mijn GT-I9505 met Tapatalk

OpenElec 6.x | Kodi Isengard | Aeon MQ6 | MONEUAL 320B | Intel® Core™ i5 CPU 661 | Zotac GeForce GT 730 1GB GDDR5
Onkyo TX-SR875 | Teufel System 5 THX Cinema 5.1
HP Microserver N54L WHS 2011 10TB
[Image: widget.jpg]
when will our free watched widget be back?
find quote
Meddie31 Offline
Junior Member
Posts: 2
Joined: Jan 2017
Reputation: 0
Post: #233
No I was just asking if anyone could help with the problem.
Blush
find quote
Post Reply