2016-04-28, 11:11
@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
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
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 */
DROP TRIGGER IF EXISTS `Kodi_Test_Matt_Video_99`.`delete_file`;
DELIMITER $$
/* REPLACE ---> KODI <--- WITH YOUR MYSQL LOGIN UID FROM THE ADVANCEDSETTINGS.XML */
CREATE DEFINER=`KODI`@`%` TRIGGER `Kodi_Test_Matt_Video_99`.`delete_file` AFTER DELETE
ON `Kodi_Test_Matt_Video_99`.`globalfiles`
FOR EACH ROW
BEGIN
DELETE FROM `Kodi_Test_Matt_Video_99`.bookmark WHERE idfile = old.idfile;
DELETE FROM `Kodi_Test_Mace_Video_99`.bookmark WHERE idfile = old.idfile;
DELETE FROM `Kodi_Test_Kiyana_Video_99`.bookmark WHERE idfile = old.idfile;
DELETE FROM `Kodi_Test_Jaide_Video_99`.bookmark WHERE idfile = old.idfile;
DELETE FROM settings WHERE idfile = old.idfile;
DELETE FROM stacktimes WHERE idfile = old.idfile;
DELETE FROM streamdetails WHERE idfile = old.idfile;
END$$
DELIMITER ;
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.
- bookmarks [Where you leave an unfinished video]
- settings [Subtitles On, Zoom, Audio Stream data etc (If you turn Subtitles off and another user goes to watch it its off for them too)]
- stacktimes [Stack times for Stacked files (The ones that are like CD1, CD2, etc)]
- streamdetails [Video info Codec, Width, Hight, Video Duration, etc]
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