SQLiteDatabase Plugin for MP2 (1 Viewer)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    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,475
    1,385
    Country flag
    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

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    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

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,399
    6,970
    Germany Germany
    Country flag
    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,475
    1,385
    Country flag
    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,903
    769
    61
    Arlington Heights, Illinois
    United States of America United States of America
    Country flag
    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,475
    1,385
    Country flag
    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,930
    2,234
    Ba-Wü
    Germany Germany
    Country flag
    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,475
    1,385
    Country flag
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom