[WiP] Centralised database in My Video, My Pictures and folder settings (3 Viewers)

regeszter

Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Hi Community,

    I am working on a centralised database to better support the multi seat configurations.

    What is the benefit?

    If you have more then one clients, you will see the same picture and video database on all clients without needs any external plugin to synchronise it.

    What are the limitations?

    • The installer won't install a (new) MySQL server but you can use the existing MySQL instance of the TvServer if exists.
    • The switching of the SQLite database or the MySQL database is "hidden". The default is the SQLite. Hidden means no GUI to set it up.
    • The MS SQL Server is not supported.
    • Any plugin may not work in this new database environment. If you find any incompatible plugin, please share with us.
    How can you activate it?

    There is no GUI to switch the database backend yet but you can insert this rows to c:\ProgramData\Team MediaPortal\MediaPortal\MediaPortal.xml.

    Code:
      <section name="folderdatabase">
        <entry name="UseADO">yes</entry>
      </section>
      <section name="moviedatabase">
        <entry name="UseADO">yes</entry>
      </section>
      <section name="picturedatabase">
        <entry name="UseADO">yes</entry>
      </section>

    If you want to use a different MySQL server from TvServer, you have to add this section to the config. The values are samples of course.

    Code:
      <section name="mpdatabase">
        <entry name="hostname">localhost</entry>
        <entry name="username">root</entry>
        <entry name="password">MediaPortal</entry>
      </section>

    The folderdatabase holds your layout and sort settings in My Video, My Pictures and My Music plugins.
    The moviedatabase holds your video database and watched status in My Video plugin.
    The picturedatabase holds your picture database in My Pictures plugin. You use it when you select date view.

    After you switch the database backend, the Configure.exe or the MediaPortal.exe will create an empty database on first start. The old database files will be untouched so you can use it later if you reinstall the official release.

    There is not automatic database migration between the SQLite and the MySQL database but you can create NFO files from the movies before switch the database backend and import they after switch it. Or you can use the IMDB scatter of course.


    Attention!!!! (Read this if you have an older version than MediaPortalSetup_1.11.0_2015-03-21-19-38)

    The new versions requires new database because of the old one was created with wrong characters/collation. Do not install it without drop the old databases! The installer wont drop the databases. You need to do that. Sorry.



    Change log:

    MediaPortalSetup_1.11.0_2015-03-21-19-38
    • Little speed improvement
    • Wake On Lan feature for database host
    • Bugfixes
    • Based on 1.11 Final
    • Need new databases!

    MediaPortalSetup_1.11.0_2015-04-03-16-34
    • Bugfixes

    MediaPortalSetup_1.11.0_2015-04-11-08-56
    • Bugfixes

    This branch is OBSOLETED. The updated code is here.

    Do not forget upload logs (TvServer and client logs) if you report any issue.

    Regards,
    regeszter
     
    Last edited:

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    The MS SQL Server is not supported.
    Well, then unfortunately one potential user less :(

    I am using MS SQL because of a WSUS server on my WS 2012 E installation, which requires it by default. Not much sense to have another database in parallel...
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    The MS SQL Server is not supported.
    Well, then unfortunately one potential user less :(

    I am using MS SQL because of a WSUS server on my WS 2012 E installation, which requires it by default. Not much sense to have another database in parallel...

    I agree with you but most users use the MySQL which installing with TvServer by default.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    In reference to comments made in the MP2 section: Have you guys thought redirecting your efforts towards MP2 in order to speed up its development so that it could (not just eventually but soon) replace MP1?

    My personal feeling is that all the effort made to develop workarounds for design limitations of MP1 would be better spent on MP2, which offers numerous advantages over MP1.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Also we need MySQL version of MovPics and MPTVSeries

    @ltfearme ,

    It is possible to do the same in MovingPictures and MPTVSeries? ;)
    Anything is possible, why don't you announce your feature in the respective plugin forum, you may get the interest of another dev that would like to add support.

    I would not need such a feature even with 4 pcs in the same house so it's unlikely I would look at doing it anytime soon, there is just so many other features I would like to see first.

    Thanks for your work ;)
     

    Users who are viewing this thread

    Top Bottom