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

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    14,106
    8,644
    Kyiv
    Home Country
    Ukraine Ukraine
    Country flag
    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
    14,106
    8,644
    Kyiv
    Home Country
    Ukraine Ukraine
    Country flag
    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
    467
    218
    Home Country
    United Kingdom United Kingdom
    Country flag
    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
    467
    218
    Home Country
    United Kingdom United Kingdom
    Country flag
    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
    467
    218
    Home Country
    United Kingdom United Kingdom
    Country flag
    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
    467
    218
    Home Country
    United Kingdom United Kingdom
    Country flag
    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

    Similar threads

    Hi, must be really a while, cuz I can not remember any post from you ;) But might be also that I joined the team too late. Yes, there will be many things. Main reason is simply, that MP2 is not developed based on MP1. I for example never used MP1. I tried it lately to test voice control and was shocked about many inconsistancies in...
    Hi, must be really a while, cuz I can not remember any post from you ;) But might be also that I joined the team too late. Yes...
    It´s been a while... :) Well, simply the reason is cause MP1 was working so well... :) Now I decided to upgrade my old servers and...
    Replies
    1
    Views
    190
    Ok, the importer also remembers the queue of items that are still needed to be processed in settings file. If there is something stuck, it will try again on next server start and probably stuck again. But removing the media source also removes the associated queue. The server's TV plugin automatically creates the media sources for...
    Ok, the importer also remembers the queue of items that are still needed to be processed in settings file. If there is something...
    Hi, I’ve been struggling with MP 2 now for several weeks. Initially all was fine. Then in the client, the listings of recorded TV...
    Replies
    8
    Views
    873
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    MP1 MP2 MP2 DLNA status? DE
    What I meant is that we have a MP2 plugin called UPnP Render that can play media from DLNA servers if I remember correctly. I don't know the current state of the plugin though. That's why MP2 probably never will be certified. ;) Yes, that was also the idea, but it is a big job as all TV's, software etc. seems to not do everything...
    What I meant is that we have a MP2 plugin called UPnP Render that can play media from DLNA servers if I remember correctly. I don't...
    So I'm wondering what the state of play is with MP2 and DLNA functionality? When I started this post, I did see some posts...
    Replies
    10
    Views
    1K
    Thank you joecrow! It seems to resolve the problem I got since 1.22.
    Thank you joecrow! It seems to resolve the problem I got since 1.22.
    Hi Guys, Most times I have had an issue with MP1 it has been a platform/OS/finger-trouble issue that a re-install etc fixes...
    Replies
    9
    Views
    973
    Top Bottom