Edit 28.09.2013:
As of now, the source code is available on Github and the latest version of the binaries is available in our new MP2 Plugin Repository. There are no more source or binary files attached to this post.
---------------------------------------------
Dear MP2 community,
this thread is about the SQLiteDatabase plugin for MP2. I'm already using it on a daily basis and I have not found any bug since quite some time. If you have problems using the inbuilt SQLCEDatabase (in particular, if you hit the database size limit of SQLCE of 2GB, which can easily be the case if you have a big music collection tagged with a lot of covers), I encourage you to test the attached SQLiteDatabase. And please don't forget to post test results in this thread - even if the result is "no errors found, it just works"
cheers,
Michael
The SQLiteDatabase plugin is intended to replace the SQLCEDatabase, which is shipped as standard database for MP2. The reason for providing this database plugin is
Note 1: This plugin has two big advantages over the standard SQLCEDatabase plugin:
Installation:
On your MP2-Server computer
To do:
v0.5
-----------------------------------------
Original Thread:
Hi everybody,
Well, the title says it all - but unfortunately, it doesn't work completely, yet. I thought I could provide you with something, that works, but I'm running out of time. Will not have time to play with it for the next two or three weeks, but maybe someone wants to give it a try in the meantime.
The idea was born, because MSSQLCE has a database size limit of 2GB. MySQL does not have this size limit, but requires a database system being installed. SQLite does not have any of these limitations. It is completely embedded and allows for database sizes in the terabyte range.
Attached is the source code and a compiled binary. As mentioned, it doesn't really work, yet. As far as I can see, the import works correctly (tried with music files so far). After the import, the database looks perfectly to me. Unfortunately, the music files are not displayed in "audio" afterward. So something must be wrong with reading from the database.
So if someone feels like digging into some SQL debugging, please feel free
If not, I'll try to continue when I'm back with some more time...
Have fun!
Michael
As of now, the source code is available on Github and the latest version of the binaries is available in our new MP2 Plugin Repository. There are no more source or binary files attached to this post.
---------------------------------------------
Dear MP2 community,
this thread is about the SQLiteDatabase plugin for MP2. I'm already using it on a daily basis and I have not found any bug since quite some time. If you have problems using the inbuilt SQLCEDatabase (in particular, if you hit the database size limit of SQLCE of 2GB, which can easily be the case if you have a big music collection tagged with a lot of covers), I encourage you to test the attached SQLiteDatabase. And please don't forget to post test results in this thread - even if the result is "no errors found, it just works"
cheers,
Michael
The SQLiteDatabase plugin is intended to replace the SQLCEDatabase, which is shipped as standard database for MP2. The reason for providing this database plugin is
- to have an inbuilt database system, which does not require to install an external database system (such as MySQL)
- and at the same time not to suffer from restriction imposed by the MS SQLCE database (such as the maximum database size limite of 2GB).
Note 1: This plugin has two big advantages over the standard SQLCEDatabase plugin:
- It does not have a size limit for the database.
- It is MUCH faster than the standard SQLCEDatabase plugin.
Installation:
On your MP2-Server computer
- Stop your MP2 server
- In your MP2 server's plugin directory delete the "SQLCEDatabase" directory
- Instead copy the content of the SQLiteDatabase_BIN_v0.x.zip file attached to this thread in the plugin directory of your MP2 server
- To be on the save side also delete your [SystemDrive]:\ProgramData\Team MediaPortal\MP2-Server directory
- Start your MP2 server
- Quit MP2 client
- Delete your [SystemDrive]:\ProgramData\Team MediaPortal\MP2-client directory
- Restart MP2 client
- (Re)attach your MP2 client to the MP2 server
- (Re)add your shares
To do:
- Test, test and again test this database...
- Make sure that it is compatible with TVE3.5
v0.5
- This version is compatible with database files generated by v0.4, so for those of you already using SQLite, just replace the SQLiteDatabase directory in your MP2 server's plugin directory
- This version is compiled as debug binary (same as the previous versions)
- Attached separate ZIP files for compiled files (SQLiteDatabase_BIN_v0.x.zip) and source code (SQLiteDatabase_SRC_v0.x.zip) to make installation easier
- Removed system.data.sqlite binaries from source code and used NuGet instead
- Upgraded system.data.sqlite from version 1.0.85.0 to version 1.0.86.0
- Added lots of comments in the source code (in particular regarding the connection string parameters) to explain why the respective settings are necessary in the context of SQLite
- Execute "PRAGMA foreign_key = on" in every SQLiteDatabaseConnection to ensure that SQLite enforces foreign key constraints, which are used by MP2's database backend to enforce referential integrity (Default for SQLite is to just ignore the respective SQL commands)
- Added a reference to system.database.sqlite.linq as well as the respective dll (via NuGet). MP2-Server does not need this, but TVE3.5 uses the Entity Framework, which (at least I suppose) needs linq support.
- Updated System.Data.SQLite to 1.0.88.0
- Code Cleanups
-----------------------------------------
Original Thread:
Hi everybody,
Well, the title says it all - but unfortunately, it doesn't work completely, yet. I thought I could provide you with something, that works, but I'm running out of time. Will not have time to play with it for the next two or three weeks, but maybe someone wants to give it a try in the meantime.
The idea was born, because MSSQLCE has a database size limit of 2GB. MySQL does not have this size limit, but requires a database system being installed. SQLite does not have any of these limitations. It is completely embedded and allows for database sizes in the terabyte range.
Attached is the source code and a compiled binary. As mentioned, it doesn't really work, yet. As far as I can see, the import works correctly (tried with music files so far). After the import, the database looks perfectly to me. Unfortunately, the music files are not displayed in "audio" afterward. So something must be wrong with reading from the database.
So if someone feels like digging into some SQL debugging, please feel free
If not, I'll try to continue when I'm back with some more time...
Have fun!
Michael
Last edited: