SQLiteDatabase Plugin for MP2 (1 Viewer)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Actually both, SQLCEDatabase and SQLiteDatabase only use what is stored in Paths.xml - but the value in paths.xml is wrong then :D
    Is currently is
    <Path name="DATABASE" value="&lt;DATA&gt;" />
    and if we want the database to be in a subdirectory it should be
    <Path name="DATABASE" value="&lt;DATA&gt;\Database" />
    So in general no need to change anything in the database plugins - only in paths.xml

    Or simply put it into the release news. We are in "alpha" ;) if caring too much about those things we also can call the releases final/stable.
    Completely agree with this one (y) We are still in alpha state and there must be a reason for that (the reason is not stability :D )
    Fixed already https://github.com/MediaPortal/MediaPortal-2/commit/9575d22fddcb0a0c4330d3483b70bbac772f8474
    Will be included in next build and should be documented as "breaking" change. But as SQLite is contained the first time as default, it should not cause to many issues (except for team members ;))
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Just for refernece:

    There has been some discussion and also some new test versions of SQLiteDatabase in this thread where I tried to improve the sort order of SQLite (taking into account case-insensitivity, culture sensitivity in terms of InvariantCulture, as well as natural number sorting).
    These improvements make SQLiteDatabase slower - but still I'm trying to implement everything MP1 already stumbled upon - just because we have have to learn from mistakes in the past. Meaning first of all everything has to work - including sort order as the user expects it. Performance is important, but comes second...

    What I would also like to mention is that in the meantime SQLiteDatabase has "grown" quite a bit in terms of lines of code. However, there are some things, that we might want to move to the MediaPortal.Utilities namespace later as they may prove useful for other parts of MP2 as well. Namely:
    • SQLiteSettings.GetRamInMegabytes (does what the name implies)
    • For the sort-thingy I have implemented a "LexicographicComparer : IComparer<String>" so that we can use it for e.g. Linq as well.
    • And maybe also our ConnectionPool - I just have to rename it to ObjectPool. The only requirement it has is that the pooled objects implement IDisposable (and even that could be avoided by checking whether the object actually implements IDisposable as we do it in ServiceRegistration) - so no particular thing for connections...
    But this is just not to forget it. There's enough time left to do this once SQLiteDatabase works with SlimTVNative and is fully integrated as standard database...

    Michael
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The SQLite branch has been merged into dev and is deleted now in repo.

    For further developments please start new branches, based on dev.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I just tried to get further with SQLite and TVE35. Until a full EF support is there, we could go an iterim way: you can create a matching database inside the VS designer. This DB we can supply as empty template and TVE35 works with it (tested it before).

    My only issue is, that I have VS2013 and SQLite has no designer support in 1.0.89 version. I also downloaded the latest source from http://system.data.sqlite.org/index.html/vinfo?name=8d1ca7dd3b10c6dff133d0a38c255b65fab75d7a (changelog http://system.data.sqlite.org/index.html/timeline?n=20&y=ci&v), which has VS2013 support included.

    @MJGraf , do you know how I can build and use the installer? If I can manage to install the provider, I can create the template DB
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Great idea!
    Instructions on the System.Data.SQLite homepage are a bit confusing. I basically got my knowledge from here, here and try and error...
    The most important thing for me was to start \setup\build_all.bat. After that you should have all the necessary binaries and other files including the designer below the \bin directory.
    The only thing you don't have after that is an actual installer. Don't know if you really need it. If so, you have to install Inno Setup 5.4.2 on your dev-computer. After that you can run \setup\bake_all.bat and you will have the installer, too.
    As described above, you may run into the problem that build_all.bat tries to find your installed version of VS (for me this is still VS2012). Based on this it determines on what .net version the build should run. For me this is .net 4.5 - I would assume for you it will either be the same or 4.5.1. I haven't found a way to make a build targeting .net 4.0 with VS2012. I had to install VS2010 to do so. But there has to be another solution - maybe one of the other batch files in the setup directory..

    While we are at it: Would you be so kind and describe somewhere what is necessary to do a build of SlimTVNative currently? I know the branch in your private git repo, but I'm a bit lost in what exactly I have to do (i.e. what projects do I have to include in the build for MP2 Server and for MP2 Client, what solution with which projects do I have to build from the TVE3.5 branch and where do I have to put the binaries of that build... Sorry, never tried SlimTVNative due to missing SQLite support so far and therefore still quite clueless...). But no need to hurry - if this workaround does what it's supposed to do, I have more time to make SQLite EF-compliant...)
    Thanks!
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I have taken the effort to install .net 4.5 in preparation to test whatever needs done.
    So you know, the installer for .net was able to see MP2 process's running, asked to stop them and was capable of doing it. Would be interesting to know how MS can do it yet MP has issues.....
    Just thought you would like to know....
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Completely agree - as soon as Alpha 4 is out, I'll remove the download. Maybe we should provide SQLCE as a download then...
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Completely agree - as soon as Alpha 4 is out, I'll remove the download. Maybe we should provide SQLCE as a download then...

    It is out! :)
    Good idea to provide SQLCE as optional download.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Hm, seems like I can only edit the plugin - not remove it.
    @high Could you please lend a hand? Do I need additional rights to remove my SQLiteDatabase plugin from the MP2 download section or am I just too blind to find the right button? :D Thanks!
     

    Users who are viewing this thread

    Top Bottom