(2014-09-20, 01:11)da-anda Wrote: Ah, so your schema is an Object schema not a DB schema. My suggestions for combining where related to sharing the same DB table for certain objects
Right now is the logical schema. Once we boild down this I will create the physical DB structure
(2014-09-20, 01:54)phate89 Wrote: (2014-09-19, 20:57)m.savazzi Wrote: Well the three cannot be joined as an assed can have one audio and one video
multiple audios, multiple videos, etc...
Subtitle has different info too.
So we need three entities to manage all possible scenarios
I think he meant to join them as movie, episode, video are joined in asset. So you have a stream main with audio stream, video stream and subtitle stream. So a stream could be an audio, a video or a subtitle stream and One asset or version could be connected to 1,2,3,4 etc etc streams.
Ok ,understood. I will check that but I think there are no common fields among the three so it would not create any advantage,.
I've already moved "Language" to it's own entity.
(2014-09-20, 01:54)phate89 Wrote: Another question related to subs. How external subtitle works with upnp? If I remember well somewhere I read we might need to store external subtitles in database to tackle the lack of external subtitles support of upnp. Is it true?
Here I need more info from UPnP team.
In current DB structure ALL files are stored in the DB associated to the library independently on where they are.
In other words is Kodi's file scraping process that should check for the different files and add them correctly to the DB.
So: DB supports scenario. In addition DB can provide a unified view of related assets. Immagine you have on the UPnP share the video and downloaded locally the Subtitle file. DB will allow you to see them as related
It's quite cool.
(2014-09-20, 01:54)phate89 Wrote: Also there is an old pending pull request from ace to add external audio support.
So we need to store these files? If the answer is yes we could simply connect streams to files so a version of an asset could have for example 2 audio streams, one internal and one external (external audio file) and 2 subtitle streams, one internal and one external (external subtitle file)
Yes multiple audio is native in the DB.
Assume you have file: movie foo.mkv with 1 audio
then you have movie foo (eng).ac3
In the DB you will have
asset 1: movie foo
version 1: bound to movie 1
file 1: bound to version 1- movie foo.mkv
audiotrack 1: bound to file 1, version 1 - all mkv audio details
file 2: bound to version 1- movie foo (eng).ac3
audiotrack 2: bound to file 2, version 1 - all ac3 properties