2019-08-09, 10:57
Yeah, I meant add the subtitles, rather than the MBID's.
Anyway, I think internally that Kodi uses idAlbum to link all the tracks of an album.
~~~~ EDIT ~~~~
So, in my head (which may not be the best place to figure this out !!) I think we need another table in the db (set). In 'Album' we need another field, 'idSet'. Song would also need another field, 'strDiscSubtitle'. We also need a new table, 'set'.
If Album.idSet is NUL, nothing changes. If however, Album.idSet is not NUL, then we need to look up all the disc subtitles in the set table that have a corresponding idSet. Stepping through the GUI, this would show you the Album( which is actually a box-set), then the individual discs within that set (named accordingly with the Disc Subtitle). We can then look up the tracks for each individual disc using the idAlbum (which is the whole entity) and strDiscSubtitle, which is specific to each individual disc within the entity.
The set table should include art so that individual discs within the set can have their own artwork (eg, discart, cover, etc).
A query like
With the little baby steps I have taken so far, I have a version of Kodi that creates the required db. Next step is to add to the tag reader to populate the required fields....... I think !!
Anyway, I think internally that Kodi uses idAlbum to link all the tracks of an album.
sql:mysql> select strTitle,iTrack from song where idAlbum = xxxx;
~~~~ EDIT ~~~~
So, in my head (which may not be the best place to figure this out !!) I think we need another table in the db (set). In 'Album' we need another field, 'idSet'. Song would also need another field, 'strDiscSubtitle'. We also need a new table, 'set'.
If Album.idSet is NUL, nothing changes. If however, Album.idSet is not NUL, then we need to look up all the disc subtitles in the set table that have a corresponding idSet. Stepping through the GUI, this would show you the Album( which is actually a box-set), then the individual discs within that set (named accordingly with the Disc Subtitle). We can then look up the tracks for each individual disc using the idAlbum (which is the whole entity) and strDiscSubtitle, which is specific to each individual disc within the entity.
The set table should include art so that individual discs within the set can have their own artwork (eg, discart, cover, etc).
A query like
should show all the tracks for that box set on a specifically titled disc.sql:mysql> select strTitle,iTrack from song where idAlbum = xxxx AND strDiscSubtitle = 'some title';
With the little baby steps I have taken so far, I have a version of Kodi that creates the required db. Next step is to add to the tag reader to populate the required fields....... I think !!