home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Database: Refactor MP1 database for multi seat usage
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Anthony Vaughan" data-source="post: 1286855" data-attributes="member: 153283"><p>The whole point of the changes I have made to MP were so that you have one central configuration, when you have multiple clients, including the client databases. You won't appreciate the benefits of my system when you work with a single client - albeit that my system is a lot faster in MP and a bit faster when doing scans. Its real strength is when you have multiple clients.</p><p></p><p>With your system, you have to have a different database for each client because MP locks the client databases while a client is running. So you have to have a separate set of client databases for each client installation. You then have to synchronize your client databases across the different machines in your household so that when you watch a video on one client machine and then resume watching it on another machine, you resume where you left off - not a simple task to get right. MPSync didn't work for my setup - four client machines, centrally configured. So I wrote my own real-time synchronization windows service to handle multiple clients. It worked, but was extremely complicated and I had to keep checking that the different sets of client databases were in-line with each other - requiring code to check that the databases were consistent.</p><p></p><p>I thought a far better would be to stop MP locking the client databases in the first place. That was when I finally started to look at the code in depth.</p><p></p><p>Under my system, MP doesn't lock any client databases so you can have all of the client databases for a household in one location, shared by all client machines, as well as all of the thumbs and scraper fanart images (using MediaPortalDirs.xml in the user documents folder). I implemented this solution by queuing all database updates in a separate thread, checking whether a movie exists by doing a name comparison. If another client has already added a movie during the session, the queue processing picks that up. This is what allows multiple sessions to work at the same time and removes the need for any synchronization. In my household, no-one has lost their place in their watching of a video. I have also been able to ensure that when you delete a movie, using MP, all databases records associated with that movie are also deleted and whenever you enter a folder, using MP, database records for non-existent videos are also deleted. That code now takes into consideration stacked movies. The resume position and the duration for each stacked movie, as well as the total duration for the movie stack, are kept in-line whenever you navigate to a folder containing stacked movies.</p><p></p><p>This all happens in a separate thread so does not affect the front-end performance.</p><p></p><p>This is why I developed my version of the app.</p><p></p><p>I have come to the conclusion, after trying to make it work, that I am encountering too much of an uphill struggle to make the effort of moving my code to your setup worth-while. I think I am better off just working alongside your version. The way I have developed the refactor is to install the refactored version over the main version, having integrated the code. It takes me three to four hours to do an upgrade. I am happy to do that for my household's satisfaction. I have nothing to prove to anyone but myself.</p><p></p><p>Thanks for all of your help and should want to be apprised of what I am doing I will always be willing to let you know how I'm getting on and will share my code should you decide to go in that direction.</p><p></p><p>Tony</p></blockquote><p></p>
[QUOTE="Anthony Vaughan, post: 1286855, member: 153283"] The whole point of the changes I have made to MP were so that you have one central configuration, when you have multiple clients, including the client databases. You won't appreciate the benefits of my system when you work with a single client - albeit that my system is a lot faster in MP and a bit faster when doing scans. Its real strength is when you have multiple clients. With your system, you have to have a different database for each client because MP locks the client databases while a client is running. So you have to have a separate set of client databases for each client installation. You then have to synchronize your client databases across the different machines in your household so that when you watch a video on one client machine and then resume watching it on another machine, you resume where you left off - not a simple task to get right. MPSync didn't work for my setup - four client machines, centrally configured. So I wrote my own real-time synchronization windows service to handle multiple clients. It worked, but was extremely complicated and I had to keep checking that the different sets of client databases were in-line with each other - requiring code to check that the databases were consistent. I thought a far better would be to stop MP locking the client databases in the first place. That was when I finally started to look at the code in depth. Under my system, MP doesn't lock any client databases so you can have all of the client databases for a household in one location, shared by all client machines, as well as all of the thumbs and scraper fanart images (using MediaPortalDirs.xml in the user documents folder). I implemented this solution by queuing all database updates in a separate thread, checking whether a movie exists by doing a name comparison. If another client has already added a movie during the session, the queue processing picks that up. This is what allows multiple sessions to work at the same time and removes the need for any synchronization. In my household, no-one has lost their place in their watching of a video. I have also been able to ensure that when you delete a movie, using MP, all databases records associated with that movie are also deleted and whenever you enter a folder, using MP, database records for non-existent videos are also deleted. That code now takes into consideration stacked movies. The resume position and the duration for each stacked movie, as well as the total duration for the movie stack, are kept in-line whenever you navigate to a folder containing stacked movies. This all happens in a separate thread so does not affect the front-end performance. This is why I developed my version of the app. I have come to the conclusion, after trying to make it work, that I am encountering too much of an uphill struggle to make the effort of moving my code to your setup worth-while. I think I am better off just working alongside your version. The way I have developed the refactor is to install the refactored version over the main version, having integrated the code. It takes me three to four hours to do an upgrade. I am happy to do that for my household's satisfaction. I have nothing to prove to anyone but myself. Thanks for all of your help and should want to be apprised of what I am doing I will always be willing to let you know how I'm getting on and will share my code should you decide to go in that direction. Tony [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Database: Refactor MP1 database for multi seat usage
Contact us
RSS
Top
Bottom