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

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    Installed on the server, look, think about possible to make the synchronization database Kodi and Media portal. Within a single database. If it comes, will be just fine! :D
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Installed on the server, look, think about possible to make the synchronization database Kodi and Media portal. Within a single database. If it comes, will be just fine! :D

    No.
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141
    @regeszter: i know it was aked before, but any chance that you will look into MovingPictures & MPTVSeries? My knowledege and time isnt enougth in SQL to make it myself :( ill think we have "just" to replace the cornerstone DatabaseManager.cs part with an mysql wrapper.

    i love the idea to have MP1 with a "REAL" centralized database.

    thx
    pOpY
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    @regeszter: i know it was aked before, but any chance that you will look into MovingPictures & MPTVSeries? My knowledege and time isnt enougth in SQL to make it myself :( ill think we have "just" to replace the cornerstone DatabaseManager.cs part with an mysql wrapper.

    i love the idea to have MP1 with a "REAL" centralized database.

    thx
    pOpY

    I do not use any "wrapper". I use Microsoft Entity Framework.

    There are some issue with this feature:
    • I had to update the Gentle Framework binaries which is used by TvServer. But we have code freeze in TvServer.
    • We need to test this feature with 3rd-Party MP1 plugins which use the video database.
    • We need to test this feature with 3rd-Party TvServer plugins which use the TV database.
    • If someone update any other plugin to use MySql database it won't work with the official installer.
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    • We need to test this feature with 3rd-Party MP1 plugins which use the video database.
    The trakt plugin using the Videos Database API to get information about items collected and watched, have you made any changes to public methods that could break?


    If Trakt uses the ExecuteSql() or the ExecuteRuleSql() it won't work because the EF can not run sql without declare the return type.
    If the Trakt uses API where the method run a "free hand sql" like

    GetMoviesByFilter(string sql, out ArrayList movies, bool actorTable, bool movieinfoTable, bool genreTable, bool usergroupTable)

    It will run but with strict conditions.

    A sample:

    original code

    Code:
    strSQL = String.Format("SELECT * FROM path WHERE strPath = '{0}'", strPath);
    
    SQLiteResultSet results = m_db.Execute(strSQL);
    
    if (results.Rows.Count > 0)
    {
      int lPathId;
      Int32.TryParse(DatabaseUtility.Get(results, 0, "idPath"), out lPathId);
      return lPathId;
    }

    with EF LINQ query:

    Code:
    var query = (from sql in _connection.paths
                 where sql.idPath == pathID
                 select sql).FirstOrDefault<>();
    
    if (query == null)
    {
      return;
    }
    
    string path = query.strPath;
     

    Users who are viewing this thread

    Top Bottom