Database: Refactor MP1 database for multi seat usage (4 Viewers)

Anthony Vaughan

MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Hi ajs

    I've done the lion's share of making MP and Configuration work as multi-user applications with the FoldeDatabase, MusicDatabase, PictureDatabase and VideoDatabase.

    Are there any third-party applications that use the MusicDatabase because I notice that MusicDatabase isn't really using a relational design and it doesn't perform very well compared with the other databases? I am very tempted to sort that out while I'm doing the the rest (because I'm having to re-code much of the back-end anyway). It will add a bit of work but relative to what I've already done it won't be much - this has been a mammoth task.

    What do you think?

    There are sections, not many though, that generate SQL on-the-fly, which doesn't lend itself to object-orientation, so I've left that coding alone. It's okay for my purposes because those sections only affect reads and not updates/writes.

    Things are going well and the performance is great though I've still got a lot of testing to do.

    Tony
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,062
    11,144
    Kyiv
    Home Country
    Ukraine Ukraine
    Are there any third-party applications that use the MusicDatabase because I notice that MusicDatabase isn't really using a relational design and it doesn't perform very well compared with the other databases?
    Yes, of course there are, there are plug-ins, there is third-party software.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Okay. It was just a thought that this might be a good time to do some work on that, but I'm happy to leave it alone.

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Hi ajs

    I've got the single, multi-user, centrally configured database working for the Folder, Music, Picture and Video databases and I am using this system as my production system. I have also upgraded it to 1.29 in line with the latest version. I am working on streamlining the code to remove duplication of processing and the performance is really good

    I downloaded the Fanart Handler extension and recompiled it with the new format. The GitHub didn't have the xmp2 file so I'm not sure what happens about promoting extensions. FanartHandler is different because it is included in the main file structure:

    "C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process\FanartHandler.dll"

    The other extensions don't seem to have the same close relationship with MP.

    Can you give me a list of the extensions that use the client databases so I can go through them to align them with the new version?

    I suppose what I really need to know is whether you are wanting to use what I have done. I have fixed a few issues including one or two of the cs scripts and the scan methodology and my version keeps the database current with disk changes; i.e. when a movie is deleted from disk using MP, the database is purged of all data associated with that movie. At the moment I install my version over the standard version by copying a list of files to the production system. The database is automatically changed to the new version but without trying to convert its data. I felt that this is such a major upgrade that users would be better off recreating their movie info data using the new version of configuration (which runs much faster than before). I've added some try/catches to a few scripts to make them more reliable. I can provide documentation of the new approach, in detail, if you want it (I need to finish it off but am happy to let you have it when it's ready).

    Maybe you would want to have this as a third option. I recommend that you use this version because it means you will no longer need to sync databases - although you still could if you wanted to. It also offers several improvements in performance though I am still testing the procduct.

    I'm happy to go along with whatever you decide.

    Tony
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,062
    11,144
    Kyiv
    Home Country
    Ukraine Ukraine
    The GitHub didn't have the xmp2
    Can you give me a list of the extensions that use the client databases so I can go through them to align them with the new version?
    I do not have this list, I can say exactly about FanartHandler, LatestsMediaHandler, MPExtended but this is from memory, I do not keep track of plugins that I do not use. But they are obviously still there ...
    I felt that this is such a major upgrade that users would be better off recreating their movie info data using the new version of configuration
    I'm not sure it's a good idea to rescan 500+ movies, 10,000+ music and about the same number of pictures, not everyone wants to do that. Ideally, you need to migrate from the old database to the new one.
    Maybe you would want to have this as a third option. I recommend that you use this version because it means you will no longer need to sync databases - although you still could if you wanted to.
    How about TVSeries? mvCentral and other plugins?
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I'm happy to look at any plugins that you think are relevant. You've mentioned TVSeries and mvCentral. Let me know about any others that you are concerned about.

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I'll have a look at migrating the database to the new format.

    I'm going to be a busy boy :) .

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom

    I do not have this list, I can say exactly about FanartHandler, LatestsMediaHandler, MPExtended but this is from memory, I do not keep track of plugins that I do not use. But they are obviously still there ...

    I'm not sure it's a good idea to rescan 500+ movies, 10,000+ music and about the same number of pictures, not everyone wants to do that. Ideally, you need to migrate from the old database to the new one.

    How about TVSeries? mvCentral and other plugins?
    BTW, this upgrade will only affect the movie database (VideoDatabaseV?.db3).

    Although the infrastructure for the Music, Pictures and Videos will differ, the Music and Picture databases are unchanged.

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Just to keep you up-to-date, I've decided to change, on the experience of working on extensions and cs scripts, to change my approach to the coding of this upgrade.

    I am going to separate the SQLClient code from the new approach so that the legacy software will see no change but the MP and Configuration applications will see the new approach. So, there will be a delay so I can make these changes. Hopefully, the result will be easier to upgrade.

    Tony

    P.S. I've written the code to upgrade from V5 to V6.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Am I right in thinking that fanart is being integrated more into MP1? One of the things I have noticed is that when I delete a movie that has scraper images, the images don't get deleted as well - so they hang around forever.

    I'm ensuring that all movie database records associated with a movie are removed when a movie is deleted from disk. So this would seem a good time to remove fanart images/records as well. It's really easy to do as I've already developed the code.

    Do you agree?

    Tony
     

    Users who are viewing this thread

    Top Bottom