Proposal: Use a Single Database and cache structure for all Videos across all Profile - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222) +--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9) +--- Thread: Proposal: Use a Single Database and cache structure for all Videos across all Profile (/showthread.php?tid=152068) |
Proposal: Use a Single Database and cache structure for all Videos across all Profile - DecK - 2013-01-14 I propose that we should merge all video data and associated file caches into a single structure which supports multiple profiles. The current structure for sharing video data across multiple profiles is inefficient on a number of fronts.
The big code changes that I have identifed (there is more I'm sure);
Right now I am looking for feedback on 3 fronts:
Database - Tables: Add a table to hold the profile information. Table name = "profile" PK = "idProfile" Other fields = TBD Add a table to hold the set of paths available to each profile. Table name = "profilelinkpath" PK = "idProfile"+"idPath" FKs to profile and path tables Other fields = none Add a table to store the play count and last played data on a per profile basis Table name = "profilelinkfile" PK = "idProfile"+"idFile" FKs to profile and file tables Other fields = "playCount" (integer) and "lastPlayed" (text) Remove the play count and last played data from the "file" table There may also be some fields on the settings table that may need to move to the "profilelinkfile" table. --NEED SOME INPUT HERE-- Database - Views: Update the following views such that they only return datasets accessable to the currently active profile. This would be achieved by referencing the profilelinkpath table outlined above. episodeview movieview musicvideoview tvshowview Database - Other Queries (Stored Procedures?): Any queries used to retrieve metadata, actors, genres, years, etc. should also be updated to only return datasets accessable to the currently active profile, again by referencing the profilelinkpath table. --NEED SOME INPUT HERE-- |