XBMC 12 en 13 MySQL sharing

Door LinuZZ op maandag 7 oktober 2013 17:03 - Reacties (2)
Categorie: -, Views: 5.042

Na lange tijd XBMC gebruikt te hebben heb ik vanaf versie 10 de centrale MySQL database in gebruik (http://wiki.xbmc.org/inde...are_libraries_using_MySQL).

het voordeel hiervan is dat je meerdere htpc-tjes kunt hebben die keurig aan de database vertellen waar je bent gebleven in een film en welke afleveringen je van een serie hebt bekeken. een nadeel is dat je bij een upgrade steevast een nieuwe database versie krijgt (http://wiki.xbmc.org/index.php?title=XBMC_databases/Versions).

omdat ik met mijn tablet de nieuwste alpha wil gebruiken, maar toch ook de database wilde blijven gebruiken ben ik uit gaan zoeken hoe ik versie 12 en versie 13 samen kan laten werken in 1 database. hieronder volgt een stap voor stap uitleg.

1. maak een backup van je xbmc databases en userdata instellingen.
2. drop je xbmc_video76 database indien aanwezig (ik ga ervan uit dat de Frodo database de meest-geupdate versie is, als Gotham de meest up-to-date is kun je stap 2,3 en 4 overslaan)
3. start xbmc v13 op
4. sluit xbmc v13 af
5. navigeer met je favoriete database tool (in mijn geval phpMyAdmin) naar de xbmc_video75 database
6. vanuit database xbmc_video75 draai je de volgende sql commando's:


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
DROP TABLE `actorlinkepisode`;
CREATE VIEW `xbmc_video75`.`actorlinkepisode` AS SELECT * FROM `xbmc_video76`.`actorlinkepisode`;
DROP TABLE `actorlinkmovie`;
CREATE VIEW `xbmc_video75`.`actorlinkmovie` AS SELECT * FROM `xbmc_video76`.`actorlinkmovie`;
DROP TABLE `actorlinktvshow`;
CREATE VIEW `xbmc_video75`.`actorlinktvshow` AS SELECT * FROM `xbmc_video76`.`actorlinktvshow`;
DROP TABLE `actors`;
CREATE VIEW `xbmc_video75`.`actors` AS SELECT * FROM `xbmc_video76`.`actors`;
DROP TABLE `art`;
CREATE VIEW `xbmc_video75`.`art` AS SELECT * FROM `xbmc_video76`.`art`;
DROP TABLE `artistlinkmusicvideo`;
CREATE VIEW `xbmc_video75`.`artistlinkmusicvideo` AS SELECT * FROM `xbmc_video76`.`artistlinkmusicvideo`;
DROP TABLE `bookmark`;
CREATE VIEW `xbmc_video75`.`bookmark` AS SELECT * FROM `xbmc_video76`.`bookmark`;
DROP TABLE `country`;
CREATE VIEW `xbmc_video75`.`country` AS SELECT * FROM `xbmc_video76`.`country`;
DROP TABLE `countrylinkmovie`;
CREATE VIEW `xbmc_video75`.`countrylinkmovie` AS SELECT * FROM `xbmc_video76`.`countrylinkmovie`;
DROP TABLE `directorlinkepisode`;
CREATE VIEW `xbmc_video75`.`directorlinkepisode` AS SELECT * FROM `xbmc_video76`.`directorlinkepisode`;
DROP TABLE `directorlinkmovie`;
CREATE VIEW `xbmc_video75`.`directorlinkmovie` AS SELECT * FROM `xbmc_video76`.`directorlinkmovie`;
DROP TABLE `directorlinkmusicvideo`;
CREATE VIEW `xbmc_video75`.`directorlinkmusicvideo` AS SELECT * FROM `xbmc_video76`.`directorlinkmusicvideo`;
DROP TABLE `directorlinktvshow`;
CREATE VIEW `xbmc_video75`.`directorlinktvshow` AS SELECT * FROM `xbmc_video76`.`directorlinktvshow`;
DROP TABLE `episode`;
CREATE VIEW `xbmc_video75`.`episode` AS SELECT * FROM `xbmc_video76`.`episode`;
DROP VIEW `episodeview`;
CREATE VIEW `xbmc_video75`.`episodeview` AS SELECT * FROM `xbmc_video76`.`episodeview`;
DROP TABLE `files`;
CREATE VIEW `xbmc_video75`.`files` AS SELECT * FROM `xbmc_video76`.`files`;
DROP TABLE `genre`;
CREATE VIEW `xbmc_video75`.`genre` AS SELECT * FROM `xbmc_video76`.`genre`;
DROP TABLE `genrelinkmovie`;
CREATE VIEW `xbmc_video75`.`genrelinkmovie` AS SELECT * FROM `xbmc_video76`.`genrelinkmovie`;
DROP TABLE `genrelinkmusicvideo`;
CREATE VIEW `xbmc_video75`.`genrelinkmusicvideo` AS SELECT * FROM `xbmc_video76`.`genrelinkmusicvideo`;
DROP TABLE `genrelinktvshow`;
CREATE VIEW `xbmc_video75`.`genrelinktvshow` AS SELECT * FROM `xbmc_video76`.`genrelinktvshow`;
DROP TABLE `movie`;
CREATE VIEW `xbmc_video75`.`movie` AS SELECT * FROM `xbmc_video76`.`movie`;
DROP TABLE `movielinktvshow`;
CREATE VIEW `xbmc_video75`.`movielinktvshow` AS SELECT * FROM `xbmc_video76`.`movielinktvshow`;
DROP VIEW `movieview`;
CREATE VIEW `xbmc_video75`.`movieview` AS SELECT * FROM `xbmc_video76`.`movieview`;
DROP TABLE `musicvideo`;
CREATE VIEW `xbmc_video75`.`musicvideo` AS SELECT * FROM `xbmc_video76`.`musicvideo`;
DROP VIEW `musicvideoview`;
CREATE VIEW `xbmc_video75`.`musicvideoview` AS SELECT * FROM `xbmc_video76`.`musicvideoview`;
DROP TABLE `path`;
CREATE VIEW `xbmc_video75`.`path` AS SELECT * FROM `xbmc_video76`.`path`;
DROP TABLE `seasons`;
CREATE VIEW `xbmc_video75`.`seasons` AS SELECT * FROM `xbmc_video76`.`seasons`;
DROP TABLE `sets`;
CREATE VIEW `xbmc_video75`.`sets` AS SELECT * FROM `xbmc_video76`.`sets`;
DROP TABLE `stacktimes`;
CREATE VIEW `xbmc_video75`.`stacktimes` AS SELECT * FROM `xbmc_video76`.`stacktimes`;
DROP TABLE `streamdetails`;
CREATE VIEW `xbmc_video75`.`streamdetails` AS SELECT * FROM `xbmc_video76`.`streamdetails`;
DROP TABLE `studio`;
CREATE VIEW `xbmc_video75`.`studio` AS SELECT * FROM `xbmc_video76`.`studio`;
DROP TABLE `studiolinkmovie`;
CREATE VIEW `xbmc_video75`.`studiolinkmovie` AS SELECT * FROM `xbmc_video76`.`studiolinkmovie`;
DROP TABLE `studiolinkmusicvideo`;
CREATE VIEW `xbmc_video75`.`studiolinkmusicvideo` AS SELECT * FROM `xbmc_video76`.`studiolinkmusicvideo`;
DROP TABLE `studiolinktvshow`;
CREATE VIEW `xbmc_video75`.`studiolinktvshow` AS SELECT * FROM `xbmc_video76`.`studiolinktvshow`;
DROP TABLE `sys_seq`;
CREATE VIEW `xbmc_video75`.`sys_seq` AS SELECT * FROM `xbmc_video76`.`sys_seq`;
DROP TABLE `tag`;
CREATE VIEW `xbmc_video75`.`tag` AS SELECT * FROM `xbmc_video76`.`tag`;
DROP TABLE `taglinks`;
CREATE VIEW `xbmc_video75`.`taglinks` AS SELECT * FROM `xbmc_video76`.`taglinks`;
DROP TABLE `tvshow`;
CREATE VIEW `xbmc_video75`.`tvshow` AS SELECT * FROM `xbmc_video76`.`tvshow`;
DROP TABLE `tvshowlinkpath`;
CREATE VIEW `xbmc_video75`.`tvshowlinkpath` AS SELECT * FROM `xbmc_video76`.`tvshowlinkpath`;
DROP VIEW `tvshowview`;
CREATE VIEW `xbmc_video75`.`tvshowview` AS SELECT * FROM `xbmc_video76`.`tvshowview`;
DROP TABLE `writerlinkepisode`;
CREATE VIEW `xbmc_video75`.`writerlinkepisode` AS SELECT * FROM `xbmc_video76`.`writerlinkepisode`;
DROP TABLE `writerlinkmovie`;
CREATE VIEW `xbmc_video75`.`writerlinkmovie` AS SELECT * FROM `xbmc_video76`.`writerlinkmovie`;




done

bovenstaande is mogelijk omdat er tussen versie 75 en 76 maar bizar weinig wordt aangepast (https://github.com/xbmc/x...o/VideoDatabase.cpp#L4423)

naar aanleiding van videodatabase versie 77 de volgende code toegevoegd:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
DROP TABLE `xbmc_video76`.`streamdetails`
CREATE VIEW `xbmc_video76`.`streamdetails` AS SELECT idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth, iVideoHeight, strAudioCodec, iAudioChannels, strAudioLanguage, strSubtitleLanguage, iVideoDuration FROM `xbmc_video77`.`streamdetails`;
DROP TABLE `xbmc_video76`.`actorlinkepisode`;
CREATE VIEW `xbmc_video76`.`actorlinkepisode` AS SELECT * FROM `xbmc_video77`.`actorlinkepisode`;
DROP TABLE `xbmc_video76`.`actorlinkmovie`;
CREATE VIEW `xbmc_video76`.`actorlinkmovie` AS SELECT * FROM `xbmc_video77`.`actorlinkmovie`;
DROP TABLE `xbmc_video76`.`actorlinktvshow`;
CREATE VIEW `xbmc_video76`.`actorlinktvshow` AS SELECT * FROM `xbmc_video77`.`actorlinktvshow`;
DROP TABLE `xbmc_video76`.`actors`;
CREATE VIEW `xbmc_video76`.`actors` AS SELECT * FROM `xbmc_video77`.`actors`;
DROP TABLE `xbmc_video76`.`art`;
CREATE VIEW `xbmc_video76`.`art` AS SELECT * FROM `xbmc_video77`.`art`;
DROP TABLE `xbmc_video76`.`artistlinkmusicvideo`;
CREATE VIEW `xbmc_video76`.`artistlinkmusicvideo` AS SELECT * FROM `xbmc_video77`.`artistlinkmusicvideo`;
DROP TABLE `xbmc_video76`.`bookmark`;
CREATE VIEW `xbmc_video76`.`bookmark` AS SELECT * FROM `xbmc_video77`.`bookmark`;
DROP TABLE `xbmc_video76`.`country`;
CREATE VIEW `xbmc_video76`.`country` AS SELECT * FROM `xbmc_video77`.`country`;
DROP TABLE `xbmc_video76`.`countrylinkmovie`;
CREATE VIEW `xbmc_video76`.`countrylinkmovie` AS SELECT * FROM `xbmc_video77`.`countrylinkmovie`;
DROP TABLE `xbmc_video76`.`directorlinkepisode`;
CREATE VIEW `xbmc_video76`.`directorlinkepisode` AS SELECT * FROM `xbmc_video77`.`directorlinkepisode`;
DROP TABLE `xbmc_video76`.`directorlinkmovie`;
CREATE VIEW `xbmc_video76`.`directorlinkmovie` AS SELECT * FROM `xbmc_video77`.`directorlinkmovie`;
DROP TABLE `xbmc_video76`.`directorlinkmusicvideo`;
CREATE VIEW `xbmc_video76`.`directorlinkmusicvideo` AS SELECT * FROM `xbmc_video77`.`directorlinkmusicvideo`;
DROP TABLE `xbmc_video76`.`directorlinktvshow`;
CREATE VIEW `xbmc_video76`.`directorlinktvshow` AS SELECT * FROM `xbmc_video77`.`directorlinktvshow`;
DROP TABLE `xbmc_video76`.`episode`;
CREATE VIEW `xbmc_video76`.`episode` AS SELECT * FROM `xbmc_video77`.`episode`;
DROP VIEW `xbmc_video76`. `episodeview`;
CREATE VIEW `xbmc_video76`.`episodeview` AS SELECT * FROM `xbmc_video77`.`episodeview`;
DROP TABLE `xbmc_video76`.`files`;
CREATE VIEW `xbmc_video76`.`files` AS SELECT * FROM `xbmc_video77`.`files`;
DROP TABLE `xbmc_video76`.`genre`;
CREATE VIEW `xbmc_video76`.`genre` AS SELECT * FROM `xbmc_video77`.`genre`;
DROP TABLE `xbmc_video76`.`genrelinkmovie`;
CREATE VIEW `xbmc_video76`.`genrelinkmovie` AS SELECT * FROM `xbmc_video77`.`genrelinkmovie`;
DROP TABLE `xbmc_video76`.`genrelinkmusicvideo`;
CREATE VIEW `xbmc_video76`.`genrelinkmusicvideo` AS SELECT * FROM `xbmc_video77`.`genrelinkmusicvideo`;
DROP TABLE `xbmc_video76`.`genrelinktvshow`;
CREATE VIEW `xbmc_video76`.`genrelinktvshow` AS SELECT * FROM `xbmc_video77`.`genrelinktvshow`;
DROP TABLE `xbmc_video76`.`movie`;
CREATE VIEW `xbmc_video76`.`movie` AS SELECT * FROM `xbmc_video77`.`movie`;
DROP TABLE `xbmc_video76`.`movielinktvshow`;
CREATE VIEW `xbmc_video76`.`movielinktvshow` AS SELECT * FROM `xbmc_video77`.`movielinktvshow`;
DROP VIEW `xbmc_video76`. `movieview`;
CREATE VIEW `xbmc_video76`.`movieview` AS SELECT * FROM `xbmc_video77`.`movieview`;
DROP TABLE `xbmc_video76`.`musicvideo`;
CREATE VIEW `xbmc_video76`.`musicvideo` AS SELECT * FROM `xbmc_video77`.`musicvideo`;
DROP VIEW `xbmc_video76`. `musicvideoview`;
CREATE VIEW `xbmc_video76`.`musicvideoview` AS SELECT * FROM `xbmc_video77`.`musicvideoview`;
DROP TABLE `xbmc_video76`.`path`;
CREATE VIEW `xbmc_video76`.`path` AS SELECT * FROM `xbmc_video77`.`path`;
DROP TABLE `xbmc_video76`.`seasons`;
CREATE VIEW `xbmc_video76`.`seasons` AS SELECT * FROM `xbmc_video77`.`seasons`;
DROP TABLE `xbmc_video76`.`sets`;
CREATE VIEW `xbmc_video76`.`sets` AS SELECT * FROM `xbmc_video77`.`sets`;
DROP TABLE `xbmc_video76`.`stacktimes`;
CREATE VIEW `xbmc_video76`.`stacktimes` AS SELECT * FROM `xbmc_video77`.`stacktimes`;
DROP TABLE `xbmc_video76`.`studio`;
CREATE VIEW `xbmc_video76`.`studio` AS SELECT * FROM `xbmc_video77`.`studio`;
DROP TABLE `xbmc_video76`.`studiolinkmovie`;
CREATE VIEW `xbmc_video76`.`studiolinkmovie` AS SELECT * FROM `xbmc_video77`.`studiolinkmovie`;
DROP TABLE `xbmc_video76`.`studiolinkmusicvideo`;
CREATE VIEW `xbmc_video76`.`studiolinkmusicvideo` AS SELECT * FROM `xbmc_video77`.`studiolinkmusicvideo`;
DROP TABLE `xbmc_video76`.`studiolinktvshow`;
CREATE VIEW `xbmc_video76`.`studiolinktvshow` AS SELECT * FROM `xbmc_video77`.`studiolinktvshow`;
DROP TABLE `xbmc_video76`.`sys_seq`;
CREATE VIEW `xbmc_video76`.`sys_seq` AS SELECT * FROM `xbmc_video77`.`sys_seq`;
DROP TABLE `xbmc_video76`.`tag`;
CREATE VIEW `xbmc_video76`.`tag` AS SELECT * FROM `xbmc_video77`.`tag`;
DROP TABLE `xbmc_video76`.`taglinks`;
CREATE VIEW `xbmc_video76`.`taglinks` AS SELECT * FROM `xbmc_video77`.`taglinks`;
DROP TABLE `xbmc_video76`.`tvshow`;
CREATE VIEW `xbmc_video76`.`tvshow` AS SELECT * FROM `xbmc_video77`.`tvshow`;
DROP TABLE `xbmc_video76`.`tvshowlinkpath`;
CREATE VIEW `xbmc_video76`.`tvshowlinkpath` AS SELECT * FROM `xbmc_video77`.`tvshowlinkpath`;
DROP VIEW `xbmc_video76`. `tvshowview`;
CREATE VIEW `xbmc_video76`.`tvshowview` AS SELECT * FROM `xbmc_video77`.`tvshowview`;
DROP TABLE `xbmc_video76`.`writerlinkepisode`;
CREATE VIEW `xbmc_video76`.`writerlinkepisode` AS SELECT * FROM `xbmc_video77`.`writerlinkepisode`;
DROP TABLE `xbmc_video76`.`writerlinkmovie`;
CREATE VIEW `xbmc_video76`.`writerlinkmovie` AS SELECT * FROM `xbmc_video77`.`writerlinkmovie`;
DROP TABLE `xbmc_video76`.`settings`;
CREATE VIEW `xbmc_video76`.`settings` AS SELECT * FROM `xbmc_video77`.`settings`;