patch - centralized DB fixes. (1 Viewer)

disaster123

MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: patch - centralized DB fixes.

    But most of the users use tvserver service. So they have MySQL or MSSQL already running.
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    I couldn't helt myself.

    I'm currently playing around with sql express 2008 and incorporating this into moving pictures without redesigning anything from scratch.

    So far I managed to create a connection to the sqlexpress database.

    I created a IDatabaseManager interface, which are implemented by :
    DatabaseManagerSQLexpress
    DatabaseManagerSQLite
    DatabaseManagerMySQL (I probably wont do this part, since I have no use of this)

    My new "DatabaseManagerSQLexpress" class is capable of creating missing tables and columns and their respective relational tables as well.
    It's also able to read records.

    All this is done through a simple testunit project, to speed up the coding process.
    Once everything works ok, it's time to fire up mov pics GUI and config.

    Where do I place the connection string etc ?
    Seems silly to place it in sql lite db :)

    /gibman
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: patch - centralized DB fixes.

    too cool to see you working on this. MySQL Support would be great too - at least for me. But i think i'm capabable of porting your patch from SQLexpress to MySQL. I could be a tester for MySQL if you want.
    Why not placing the connection string into a simple .txt file? I mean this is a hack...
     

    joz

    Portal Pro
    March 17, 2008
    1,353
    306
    Home Country
    Netherlands Netherlands
    the connectionstring shoud be in mediaportal.xml imo.
    And btw gibman :D for doing all this!
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Progressing nicely here.

    I am now able to play around in mov pics config, import movies.
    Also seems to be able to move my way around in the plugin inside MP (GUI).

    So this is good indeed.

    I'll clean up the code a bit more.

    Then I'll submit a proper patch for you to play with.
    It should be relatively easy to add new SQL DB providers like MySQL etc.

    I created the movingpictures DB manually, not the tables and columns.
    Mov Pics code have to to this also for the user.
    This is still todo.

    I might submit an early patch for this without this autogeneration of the SQL express DB.
    Users with the SQL server management studio should be able to add the movingpictures database by themselves.

    next stop tvseries :)

    /gibman
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    next stop tvseries

    If you do that you should get in touch with JonJon who is also working on this.
    See here and here

    Also keep in mind that simply talking to MySQL/MSSQL most likely isn't enough to get proper multi-client support.
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Attached "sqlite-sqlexpress enabled patch" to the initial post.

    Inker, ofcourse, but having a real database is a start.

    mov pics should be split up in a MP GUI that doesn't scan drives etc. and either a service or system tray app that does the grunt work like scanning drives, fetching movie details, covers, media etc.
    This service should run on the main server if multiseat, or on the same PC as mediaportal runs on when singleseat.

    /gibman

    next stop tvseries

    If you do that you should get in touch with JonJon who is also working on this.
    See here and here

    Also keep in mind that simply talking to MySQL/MSSQL most likely isn't enough to get proper multi-client support.
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    AW: Re: patch - centralized DB fixes.

    Progressing nicely here.

    I might submit an early patch for this without this autogeneration of the SQL express DB.
    Users with the SQL server management studio should be able to add the movingpictures database by themselves.

    next stop tvseries :)

    /gibman

    Hi Gibman,

    thanks for this work, very much appreciated!
    I created the DB on MSSQL (with modified statement you posted), BUT ... I am unable to compile the plugin myself - so could you maybe also post a compiled DLL?
    Also looking forward for TV-series MSSQL support - hoping to also solve some performace issues I always had with sqlite...
    Thanks again for your work
     

    Users who are viewing this thread

    Top Bottom