2023-01-23, 10:12
Hi,
the only change I've found between 119 db and 121 db was one column in the streamdetails table was added - strHdrType. So what I did was:
1. Main user:
2. For all other users:
I've tested it only for a few moments over the weekend but so far no issues.
If you want to start your 121 db from scratch and then create your multiuser setup i think you can use existing sql's for the 119 version with small modification of this streamdetail table for the additional users.
the only change I've found between 119 db and 121 db was one column in the streamdetails table was added - strHdrType. So what I did was:
1. Main user:
- In phpMyAdmin I've exported my main user db (from version 119) to an SQL file.
- In notepadd++ I've edited the creation of the streamdetails table by adding strHdrType column. So the full create statement looks like that:
I did not changed any insert statements.sql:
CREATE TABLE `streamdetails` (
`idFile` int(11) DEFAULT NULL,
`iStreamType` int(11) DEFAULT NULL,
`strVideoCodec` text DEFAULT NULL,
`fVideoAspect` float DEFAULT NULL,
`iVideoWidth` int(11) DEFAULT NULL,
`iVideoHeight` int(11) DEFAULT NULL,
`strAudioCodec` text DEFAULT NULL,
`iAudioChannels` int(11) DEFAULT NULL,
`strAudioLanguage` text DEFAULT NULL,
`strSubtitleLanguage` text DEFAULT NULL,
`iVideoDuration` int(11) DEFAULT NULL,
`strStereoMode` text DEFAULT NULL,
`strVideoLanguage` text DEFAULT NULL,
`strHdrType` text DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- I've also changed the version number (from 119 to 121) in version table:
sql:
INSERT INTO `version` (`idVersion`, `iCompressCount`) VALUES
(121, 0);
- In phpMyAdmin I've created new db for my main user with _121 suffix (Kodi_Mario_Video_121 in my case) and imported the edited sql file.
2. For all other users:
- In phpMyAdmin I've exported user's db (from version 119) to an SQL file
- In notepad++ I've replaced the name of main user db to point to db for version 121(in my case from Kodi_Mario_Video_119 to Kodi_Mario_Video_121, there was ~300 of such entries in the file so i just used replace all)
- In notepadd++ I've edited the creation of the streamdetails table by adding strHdrType column. So the full create statement looks like that:
sql:
CREATE TABLE `streamdetails` (
`idFile` int(11)
,`iStreamType` int(11)
,`strVideoCodec` text
,`fVideoAspect` float
,`iVideoWidth` int(11)
,`iVideoHeight` int(11)
,`strAudioCodec` text
,`iAudioChannels` int(11)
,`strAudioLanguage` text
,`strSubtitleLanguage` text
,`iVideoDuration` int(11)
,`strStereoMode` text
,`strVideoLanguage` text
,`strHdrType` text
);
- I've also edited creation of streamdetails view for the user, so it looks like that:
sql:
CREATE ALGORITHM=MERGE DEFINER=`kodi`@`%` SQL SECURITY DEFINER VIEW `streamdetails` AS select
`Kodi_Mario_Video_121`.`streamdetails`.`idFile` AS `idFile`,
`Kodi_Mario_Video_121`.`streamdetails`.`iStreamType` AS `iStreamType`,
`Kodi_Mario_Video_121`.`streamdetails`.`strVideoCodec` AS `strVideoCodec`,
`Kodi_Mario_Video_121`.`streamdetails`.`fVideoAspect` AS `fVideoAspect`,
`Kodi_Mario_Video_121`.`streamdetails`.`iVideoWidth` AS `iVideoWidth`,
`Kodi_Mario_Video_121`.`streamdetails`.`iVideoHeight` AS `iVideoHeight`,
`Kodi_Mario_Video_121`.`streamdetails`.`strAudioCodec` AS `strAudioCodec`,
`Kodi_Mario_Video_121`.`streamdetails`.`iAudioChannels` AS `iAudioChannels`,
`Kodi_Mario_Video_121`.`streamdetails`.`strAudioLanguage` AS `strAudioLanguage`,
`Kodi_Mario_Video_121`.`streamdetails`.`strSubtitleLanguage` AS `strSubtitleLanguage`,
`Kodi_Mario_Video_121`.`streamdetails`.`iVideoDuration` AS `iVideoDuration`,
`Kodi_Mario_Video_121`.`streamdetails`.`strStereoMode` AS `strStereoMode`,
`Kodi_Mario_Video_121`.`streamdetails`.`strVideoLanguage` AS `strVideoLanguage`,
`Kodi_Mario_Video_121`.`streamdetails`.`strHdrType` AS `strHdrType`
from `Kodi_Mario_Video_121`.`streamdetails`;
- In phpMyAdmin I've created new db for a user with _121 suffix and imported its edited sql file.
- Repeat for all users.
I've tested it only for a few moments over the weekend but so far no issues.
If you want to start your 121 db from scratch and then create your multiuser setup i think you can use existing sql's for the 119 version with small modification of this streamdetail table for the additional users.