Posts: 6,252
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,252
you can use mysql administrator to create db layouts visually
Posts: 10,518
Joined: Oct 2011
Reputation:
637
jjd-uk
Team-Kodi Member
Posts: 10,518
One of the other things to bear in mind is that any new schema must not result in a slow down of queries on devices like the Pi, if I remember correctly this is partly where the last attempt fell down.
Posts: 6,252
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,252
an abstraction will always slow things down a little. And the bottleneck on the PI are not necessarily the queries. We load a shitload of data that's not even needed in many views - this needs to be optimized (-> lazy loading of relational information) and for this a ORM layer on top of the new db schema/abstraction could help
Posts: 38
Joined: Nov 2013
Reputation:
0
I'm excited about the possibility for this. I use mySQL with synology and love it. Just wish I could use profiles for custom libraries with specific resumes without hacks. I'm hoping new and updated database will allow for easy customizations like parental control and the like!
Posts: 6,252
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,252
2014-08-12, 12:02
(This post was last modified: 2014-08-12, 12:02 by da-anda.)
guys, our mastermind jmarshall is currently doing some refactoring of the DB structure (mostly unifying things to share the same structure, logic and code base, see PR5198 ). This is some sort of preparation to make bigger refactorings like applying a new schema like suggested in here more easy. The big refactoring has to be split up in smaller steps though and can't/won't be a hard cut.
I made him aware of the work going on in here and it's appreciated. One of the next things he likes to refactor/cleanup are the profiles and especially the permission handling and content filtering. So if we can come up with a good idea/solution on how to handle access to media and everything related (genres, actors, ..) for profiles, Jonathan could refactor in that direction.
What we have to take into account:
- restrict media to certain shares/folders
- restrict by meta-data like PG ratings or don't let kids listen to songs with explicit lyrics
- what other restrictions for profiles are required?
- not only filter the media itself according to the rules, but also things like genres (don't show "adult" genre to kids)
- how to do this in a well performing way without having to do (much) postprocessing of the items - so can it be done on DB level?
So start your engines and keep concepts coming.
Posts: 635
Joined: Nov 2012
Reputation:
15
phate89
Team-Kodi Member
Posts: 635
2014-08-12, 13:24
(This post was last modified: 2014-08-12, 13:24 by phate89.)
I think with shares filtering, restricting by pg ratings and hiding genres it's almost all covered.
Probably it's better to actually bind the profiles to the sources because it's easier to match the "source_id" than everytime check if the string starts with the path.
Another question is: we want a fully configurable filtering by genre and pg or we're going to propose some group and xbmc will fit the media into one of those like "all-content", "adult-only", "kids-only" or "safe-only"?
Because with defined groups is a lot easier to manage by the user and also cleaner the code. The scraper provides the info, xbmc based on that defines on what group it fits and set it directly in the database and filtering will be a lot easier..
Posts: 3,077
Joined: Jun 2009
Genre / PG are not well defined as can be just anything depending on scaper / user values in NFO, so groups must be editable by users so he can put it's choice in each category if this road is taken.
The main question about profiles is about external access (as I tried to talk a lot in previous thread), right now you need to log in in Xbmc to activate a profile then all DB access are tied to the profile.
Since it seems one of the future direction is all about central database or replication it's important to decide how those profiles will be used from a remote point of view and internally.
Because profiles are not only tied to database but also addons, cache and tons of things, it's important to know the target first.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
Maybe it would be worth looking into DB schemas of other media centres like MediaPortal or MediaBrowser to see how they are doing it.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.