[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 - BigMong - 2021-05-16 (2021-05-15, 03:03)Supay Wrote: I'm not sure if it is due to having this setup, but is anyone able to please advise me?Yes this is because of the DB, I do remember someone else doing some changes to the views that are used for the kids to remove content. I can have a look at editing some of the SQL for you. What are the 3 sources you want for the kids? RE: [MYSQL] HOW-TO: 5 User XBMC - Supay - 2021-05-17 (2021-05-16, 16:53)BigMong Wrote:(2021-05-15, 03:03)Supay Wrote: I'm not sure if it is due to having this setup, but is anyone able to please advise me?Yes this is because of the DB, I do remember someone else doing some changes to the views that are used for the kids to remove content. I Thank you for this! Though I imagine if you get a nice way to work this out you will also make a lot of others happy. The sources I want specifically for the children are below. I have them in folders based on UK age ratings for films and just a kids TV folder. <default pathversion="1"></default> <source> <name>movies-12</name> <path pathversion="1">nfs://10.17.42.50/srv/nfs/movies-12/</path> <allowsharing>true</allowsharing> </source> <source> <name>movies-pg</name> <path pathversion="1">nfs://10.17.42.50/srv/nfs/movies-pg/</path> <allowsharing>true</allowsharing> </source> <source> <name>tv-kids</name> <path pathversion="1">nfs://10.17.42.50/srv/nfs/tv-kids/</path> <allowsharing>true</allowsharing> RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2021-05-22 (2021-05-17, 11:22)Supay Wrote:@Supay Sorry for the delay been away with work.(2021-05-16, 16:53)BigMong Wrote:(2021-05-15, 03:03)Supay Wrote: I'm not sure if it is due to having this setup, but is anyone able to please advise me?Yes this is because of the DB, I do remember someone else doing some changes to the views that are used for the kids to remove content. I Give this a try Kodi V119 - 05 Custom Views.sql This is set to create the views for U02, you can change easy on line 12 at the bottom of each view I have added 3 where strings more can be added and even removed as long as there is a OR at the end of each line except the last line that needs a ; the % is wildcards. Let me know if you get the desired results. If the string are found anywhere in the path it will show RE: [MYSQL] HOW-TO: 5 User XBMC - ponkotsu - 2021-05-26 Thank you for continually updating this thread for each new Kodi version. For the longest time I've been running 16.1 with the multi-user MySQL setup (needed to keep a SPMC installation synchronized). But now thanks to new hardware, I'll be moving to 19.1. I've already run your scripts to create and modify the 119 schema databases. For the next step, do I simply run an instance of Kodi 19.1 and let it migrate my existing library on its own? Or do I have to export the library in Kodi 16.1, and then import it using 19.1? Or do I have to run each major version migration one at a time, 16 -> 17 -> 18 -> 19? RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2021-05-29 (2021-05-26, 02:48)runningnaked Wrote: Thank you for continually updating this thread for each new Kodi version. For the longest time I've been running 16.1 with the multi-user MySQL setup (needed to keep a SPMC installation synchronized). But now thanks to new hardware, I'll be moving to 19.1. I've already run your scripts to create and modify the 119 schema databases. If you setup the 119 like you said then rebuild your library. from your old setup for each user use Step 5 "texturecache.py" to export then import once the new library is ready. there are lots of little changes from each db version and its easier to do it this way then to write a script todo it sorry. on a plus side your library information is all updated hope this helps RE: [MYSQL] HOW-TO: 5 User XBMC - ponkotsu - 2021-06-01 @BigMong Thank you so much! That definitely helps a lot -- it's very clear and I'll take a stab at it this week. RE: [MYSQL] HOW-TO: 5 User XBMC - Supay - 2021-10-03 (2021-05-22, 09:32)BigMong Wrote:(2021-05-17, 11:22)Supay Wrote:@Supay Sorry for the delay been away with work.(2021-05-16, 16:53)BigMong Wrote: Yes this is because of the DB, I do remember someone else doing some changes to the views that are used for the kids to remove content. I Sorry for the long delay. Life went a bit crazy and I wasn't able to do anything further to my systems since then. However, sometime after you posted this (again not entirely sure when due to chaos here), all of the content in my kids profiles that I did not want them to see just vanished of its own accord. It has remained that way since, they can only see the content that their sources provide and the adult profiles can see everything. I have no idea why, as I made no changes to either Kodi or the database other than Kodi updates, but it now works exactly the way I wanted it to. I'm unsure if this is simply part of an update to Kodi to provide this function more easily, or if there was some odd delay between the initial setup and my clients realising they should only be showing the added sources. Whatever happened, it works and had no need for any changes by me. I really appreciate the information you provided though and if I find out anything further as to why this just started working I will reply again. RE: [MYSQL] HOW-TO: 5 User XBMC - john_es - 2021-12-24 If we are already running 116 an want to upgrade... I first start with 1.) Create the default table, make all the new DB tables/views... then run the new version of Kodi and let it upgrade itself? Will that allow the old data that was stored transfer over to the new one? RE: [MYSQL] HOW-TO: 5 User XBMC - Giangi - 2022-01-02 I have 2 Kodi apps running, each one with 2 profiles. Basically the Kodi running on my TCL tv is the main on and the 2 profiles are master (the default one created) and the second is for my wife. I started installing mySQL on my home pc (which is also my main repository) but then I stopped when I've realized that simply sharing the db isn't enough for sharing the profiles too... I've read a bit this topic (from https://kodi.wiki/view/MySQL/Advanced_notes#Multiple_profiles_with_one_MySQL_database) so I've stopped because it's too complex... The OP did a very great job! ...but it's a shame Kodi itself cannot deal with sharing db and profiles by its own... RE: [MYSQL] HOW-TO: 5 User XBMC - palym - 2022-01-14 Hi @BigMong , thanks for your tutorial and work. I tried to migrate from a v19 mysql DB with single user to your multi user approach. I copied my old database to Kodi_U01_Video_119 applied the change to "tvshow" table column "C06" manually and executed the sql commands 2-5 afterwards. I thought that everything is working but I realized now that for U1 the watched status doesn't seem to work correctly. The strange thing is that it is working fine for the movies but it isn't for the TV shows' episodes. I checked the database and the playcount gets updated while it is still shown as being unwatched from within kodi. Do you have any clue why this could be happening? Thanks! RE: [MYSQL] HOW-TO: 5 User XBMC - palym - 2022-03-03 Ok, fixed it by starting with an empty DB. The next thing I'm struggeling with is that the clean library function doesn't work as intended anymore. How do you work around that? Thanks! RE: [MYSQL] HOW-TO: 5 User XBMC - john_es - 2022-03-13 I started here: Create the default tables If you have already got a Multi-User setup then start here as Kodi will fail to update the database So I ran the scripts, got that all created. Started Kodi, and the database upgrade failed. MYSQL: Connected to version 10.0.38-MariaDB-0+deb8u1 2022-03-13 12:08:20.016 T:5904 INFO <general>: Running database version MyMusic82 2022-03-13 12:08:20.127 T:5904 ERROR <general>: Can't update database Kodi_U01_Video_119 from version 0 - it's too old 2022-03-13 12:08:20.142 T:5904 ERROR <general>: Unable to open database: Kodi_U01_Video_118 [1049](Unknown database 'Kodi_U01_Video_118') 2022-03-13 12:08:20.157 T:5904 ERROR <general>: Unable to open database: Kodi_U01_Video_117 [1049](Unknown database 'Kodi_U01_Video_117') 2022-03-13 12:08:20.217 T:5904 INFO <general>: Old database found - updating from version 116 to 119 2022-03-13 12:08:20.317 T:5904 ERROR <general>: SQL: Can't create database for copy: 'Kodi_U01_Video_116' (1007) 2022-03-13 12:08:20.317 T:5904 ERROR <general>: Unable to copy old database Kodi_U01_Video_116 to new version Kodi_U01_Video_119 2022-03-13 12:08:20.319 T:5904 INFO <general>: Running database version TV38 2022-03-13 12:08:20.320 T:5904 INFO <general>: Running database version Epg13 The 1007 error is because the database already exists. So while this guide is good from a new start, I don't see how it possibly lets anyone upgrade from an old database to a new one. Any ideas? RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2022-03-15 (2022-03-13, 18:22)john_es Wrote: I started here: @john_es inside the table Kodi_U01_Video_119.version is there a single row with the value of 119 as if you have created all the tables then it shouldn't try to upgrade, it should just start with a blank setup, as its not easy to upgrade with the changes. I normal just start again, export your watch status to Trakt or texturecache.py there are other services/scripts too. Reimport your data (this also will update any text and pictures too unless you have nfo files) RE: [MYSQL] HOW-TO: 5 User XBMC - yusufvml - 2022-03-19 (2022-03-03, 08:57)palym Wrote: Ok, fixed it by starting with an empty DB. RE: [MYSQL] HOW-TO: 5 User XBMC - BigMong - 2022-03-19 (2022-03-03, 08:57)palym Wrote: Ok, fixed it by starting with an empty DB.@palym What do you mean not working as intended? |