Reply to thread

The reason for my upgrade for MP1 was to make MP1 work with the client SQLite databases (Folder, Music, Picture and Video) without locking the databases for the entirety of a user session - doing away with any need to synchronization applications. My design works with a single user or a multi-client household. For a multi-user household, you just need to place the databases in a location where all of the clients can see them and configure the documents folder MediaPortalDirs.xml to point to that location.


All of the database handing is performed in the databases class of MP1. I have incorporated Entity Framework into this design. To achieve a multi-user setup in a multi-threaded application I have removed auto-increment from the primary keys of the tables in the Music and Video databases, except for VideoThumbBList (because of the multi-threading), and have rationalized the video database to remove redundancy. I have also made GUIVideoFiles work more efficiently when building and manipulating folders to add new videos to the database and remove existing database records for videos that no longer exist.


The code handles stacked files though I don't fully understand that and the reasons behind them as I don't use multi file videos myself, so it would be good for me to get a better understanding of that because I am sure that processing could be much for efficient (less duplication of processing).


I see this as an excellent opportunity to streamline the database processing and I have employed object-orientation throughout and am caching all of the data so it is processed much more quickly behind the scenes - to allow the front-end to proceed with as little interference from the database processing as possible.


I will produce documentation that explains the rational behind the design.


Since introducing this upgrade in my household, I have not had any synchronization issues and the product has been stable. Having said that, I am sure we need to do more testing to cater for all of the features I don't use or know about.


Tony


Top Bottom