Database: Refactor MP1 database for multi seat usage (1 Viewer)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    I try test Refactor MP1 from first post ... But:
    1637772503288.png 1637772527318.png
    Code:
    [2021-11-24 18:43:09,275] [Config ] [Config Main] [DEBUG] - VideoDatabase: ProcessVideoUpgrade: pDatabaseName: C:\ProgramData\Team MediaPortal\MediaPortal\Database\VideoDatabaseV6.db3
    [2021-11-24 18:43:09,553] [Config ] [Config Main] [WARN ] - Failed to locate assembly 'EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
    [2021-11-24 18:43:09,553] [Config ] [Config Main] [WARN ] - Failed to locate assembly 'EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
    [2021-11-24 18:43:37,250] [Config ] [Config Main] [ERROR] - UpgradeActors: exception err:An error occurred while updating the entries. See the inner exception for details. stack:   в System.Data.Entity.Internal.InternalContext.SaveChanges()
       в System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
       в System.Data.Entity.DbContext.SaveChanges()
       в MediaPortal.Video.Database.VideoDatabase.UpgradeActors()
    [2021-11-24 18:44:28,376] [Config ] [Config Main] [DEBUG] - VideoDatabase: BuildDatabase: end

    Code:
    [2021-11-24 18:44:29,104] [Config ] [Config Main] [DEBUG] - MusicDatabase: ProcessMusicUpgrade: start pDatabaseName: C:\ProgramData\Team MediaPortal\MediaPortal\Database\MusicDatabaseV15.db3
    [2021-11-24 18:45:18,977] [Config ] [Config Main] [ERROR] - UpgradeAlbumInfo: exception err:The 'idGenre' property on 'albuminfo' could not be set to a 'null' value. You must set this property to a non-null value of type 'System.Int64'.  stack:   в System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)
       в lambda_method(Closure , Shaper )
       в System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
       в lambda_method(Closure , Shaper )
       в System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
       в System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
       в System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       в System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       в System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       в MediaPortal.Music.Database.MusicDatabase.UpgradeAlbumInfo()
    [2021-11-24 18:45:19,908] [Config ] [Config Main] [DEBUG] - MusicDatabase: ProcessMusicUpgrade: upgrade finished

    Code:
    [2021-11-24 18:45:23,219] [Config ] [Config Main] [ERROR] - GetPictureDataList: error: The 'HDR' property on 'picturedata' could not be set to a 'null' value. You must set this property to a non-null value of type 'System.Boolean'.  - inner:

    Code:
    [2021-11-24 18:45:39,055] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)
    [2021-11-24 18:45:39,088] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)
    [2021-11-24 18:45:39,092] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)
    [2021-11-24 18:45:39,348] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)
    [2021-11-24 18:45:39,561] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)
    [2021-11-24 18:45:47,832] [Config ] [Config Main] [DEBUG] - GetPathMovie: start pMovieId: 4860
    [2021-11-24 18:45:47,833] [Config ] [Config Main] [ERROR] - SetMovieDetails: exception err:Ссылка на объект не указывает на экземпляр объекта. inner exception:  stack:    в MediaPortal.Video.Database.VideoDatabase.GetPathMovie(Int64 pMovieId)
       в MediaPortal.Video.Database.VideoDatabase.SetMovieDetails(movieinfo pMovieInfo)

    After i try start MP1 (Mediaportal.exe) after long long long long long start ... In log i see a lot of:
    Code:
    [2021-11-24 18:54:45,229] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23175
    [2021-11-24 18:54:45,229] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,230] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23176
    [2021-11-24 18:54:45,231] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,232] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23177
    [2021-11-24 18:54:45,233] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,234] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23178
    [2021-11-24 18:54:45,234] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,235] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23179
    [2021-11-24 18:54:45,236] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,237] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23180
    [2021-11-24 18:54:45,238] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,239] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23181
    [2021-11-24 18:54:45,239] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,240] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23182
    [2021-11-24 18:54:45,241] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,281] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23149
    [2021-11-24 18:54:45,282] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,283] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23150
    [2021-11-24 18:54:45,283] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    [2021-11-24 18:54:45,285] [Log    ] [MPMain   ] [DEBUG] - DeleteTrack: start pTrackId: 23151
    [2021-11-24 18:54:45,285] [Log    ] [MPMain   ] [DEBUG] - DatabaseQueue: EnQueueData: start
    After MP start i try goto MyVideo plugin and Mediaportal crash ...
     

    Attachments

    • Configuration-Error.log
      6.4 KB
    • MediaPortal-Error.log
      112.2 KB

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    The series is not in my database, but for some reason they are in the part table, also there is no movie that I marked.
    1637776211317.png
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Thank you for letting me know about this. When I modified the code to handle stacked movies properly, I forgot to change the upgrade code :( .

    I would expect, when the database is not loaded correctly, for the rest of the app to become unstable - so a crash wold be expected. This got me thinking about what to do when an upgrade fails. Maybe the answer, so users can keep using the system, is to load the default version of the database when something goes wrong so users can at least do something; maybe putting a log entry in to say that the upgrade process failed and to contact MP.

    Of course, this shouldn't happen once I've fixed the bug.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Can you check which version of the MediaPortalRefactor1.29.010.zip you were using? You'll see here that the latest version is 010 and I checked the upgrade processing and it does process stacked files properly (for me anyway). A bit of a mystery.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Can you provide me with a copy of the video database? I need to understand where there may be differences between what I do and what you do. Hopefully, the data will reveal that.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I notice you are using a script file I have not seen before - KTI_MDB.csscript.

    We are now using entity framework so we need to declare that in the script files.

    //css_reference "core.dll";
    //css_reference "Databases.dll";
    //css_reference "EntityFramework.dll";
    //css_reference "utils.dll";

    using System;
    using System.Text;
    using System.IO;
    using System.Net;
    using System.Collections;
    using System.Data;
    using System.Data.Entity;
    using System.Web;
    using System.Text.RegularExpressions;
    using MediaPortal.Util;
    using MediaPortal.Video.Database;
    using System.Windows.Forms;

    Notice entity framework and the system.data references.
     

    Users who are viewing this thread

    Top Bottom