[WiP] Rework of SQLite wrapper (1 Viewer)

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Croatia Croatia
    Country flag
    • Thread starter
    • Moderator
    • #1
    Description of the change

    Update of ancient MediaPortal SQLite wrapper. Instead of direct internal wrapper around SQLite.dll I used System.Data.SQLite, known, open source, fully maintained .NET wrapper. To keep things easy and compatible without many changes, I've kept current wrapper, but it is now just a simple interface to System.Data.SQLite.

    This is the link to the branch on GitHub so that other devs can get the code and try to help/spot any possible bugs:
    Code:
    https://github.com/MediaPortal/MediaPortal-1/tree/FEAT-3687-Rework_of_SQLite_implementation
    Installer(s) are listed in 3rd post of this thread, here.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Germany Germany
    Country flag
    So, directly after applying your patch I had an error message starting moving pictures (logs attached). I could exit moving pictures and upon reentry everything was working. I tested not on my live htpc, so not everything is there, but on a copy on my laptop.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Croatia Croatia
    Country flag
    • Thread starter
    • Moderator
    • #5
    In the log, there is nothing regarding SQLite other than one MP-TVSeries error (error in query). I'm not sure if that error was present before for you.

    Also I must say, you have pretty screwed up setup. There are errors in errors.log all over (not related to SQLite).
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Germany Germany
    Country flag
    Possible, I took over the settings from my htpc (as to getting a replica of the setup) but not everything will work on my laptop (remote, LCD). Additionally my TV Server was offline resulting in errors from TV, Radio & TVWhishlist and an error when I tried to play a music file which was not available. So not really a screwed setup, just some errors that are expected.

    Having a TV Series error is really strange, as it is disabled.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Austria Austria
    Having a TV Series error is really strange, as it is disabled.
    If I remember correctly then even if you disable a plugin manually in MP configuration, it will be loaded.
    At it least it was like this in the past. back then a disabled plugin could still crash/freeze MP/Configuration on startup.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,546
    432
    Germany Germany
    Country flag
    AW: Rework of SQLite wrapper

    I'm getting this error in MP TvSeries since update:

    Code:
    00000023 - 15.01.2012 20:14:36 - Commit failed on this command: <select online_episodes.CompositeID, online_episodes.EpisodeID, online_episodes.SeriesID as online_episodesSeriesID , online_episodes.EpisodeIndex, online_episodes.SeasonIndex, online_episodes.EpisodeName, online_episodes.Watched, online_episodes.Summary, online_episodes.FirstAired, online_episodes.OnlineDataImported, online_episodes.GuestStars, online_episodes.Director, online_episodes.Writer, online_episodes.Hidden, online_episodes.lastupdated, online_episodes.DownloadPending, online_episodes.DownloadExpectedName, online_episodes.ThumbUrl, online_episodes.thumbFilename, online_episodes.Combined_episodenumber, online_episodes.Combined_season, online_episodes.DVD_chapter, online_episodes.DVD_discid, online_episodes.DVD_episodenumber, online_episodes.DVD_season, online_episodes.EpImgFlag, online_episodes.IMDB_ID, online_episodes.Language, online_episodes.ProductionCode, online_episodes.Rating, online_episodes.absolute_number, online_episodes.seasonid, online_episodes.airsafter_season, online_episodes.airsbefore_episode, online_episodes.airsbefore_season, online_episodes.RatingCount, online_episodes.TraktSeen, online_episodes.TraktLibrary, online_episodes.follwit_id, local_episodes.EpisodeFilename, local_episodes.OriginalComposite, local_episodes.CompositeID, local_episodes.SeriesID, local_episodes.SeasonIndex, local_episodes.EpisodeIndex, local_episodes.LocalEpisodeName, local_episodes.LocalImportProcessed, local_episodes.CompositeUpdated, local_episodes.AvailableSubtitles, local_episodes.OriginalComposite2, local_episodes.CompositeID2, local_episodes.EpisodeIndex2, local_episodes.videoWidth, local_episodes.videoHeight, local_episodes.FileDateAdded, local_episodes.FileDateCreated, local_episodes.IsAvailable, local_episodes.ext, local_episodes.Removable, local_episodes.localPlaytime, local_episodes.VideoCodec, local_episodes.VideoFormat, local_episodes.VideoFormatProfile, local_episodes.VideoBitrate, local_episodes.VideoFrameRate, local_episodes.VideoAspectRatio, local_episodes.AudioCodec, local_episodes.AudioFormat, local_episodes.AudioFormatProfile, local_episodes.AudioBitrate, local_episodes.AudioChannels, local_episodes.AudioTracks, local_episodes.TextCount, local_episodes.StopTime, local_episodes.VolumeLabel, local_episodes.DateWatched, local_episodes.FirstAired from online_episodes left join local_episodes on (local_episodes.CompositeID=online_episodes.CompositeID) where online_episodes.EpisodeID > 0 and local_episodes.EpisodeFilename != '' and online_episodes.CompositeID not in (select distinct local_episodes.CompositeID2 from local_episodes where local_episodes.CompositeID2 != '') union select online_episodes.CompositeID, online_episodes.EpisodeID, online_episodes.SeriesID as online_episodesSeriesID , online_episodes.EpisodeIndex, online_episodes.SeasonIndex, online_episodes.EpisodeName, online_episodes.Watched, online_episodes.Summary, online_episodes.FirstAired, online_episodes.OnlineDataImported, online_episodes.GuestStars, online_episodes.Director, online_episodes.Writer, online_episodes.Hidden, online_episodes.lastupdated, online_episodes.DownloadPending, online_episodes.DownloadExpectedName, online_episodes.ThumbUrl, online_episodes.thumbFilename, online_episodes.Combined_episodenumber, online_episodes.Combined_season, online_episodes.DVD_chapter, online_episodes.DVD_discid, online_episodes.DVD_episodenumber, online_episodes.DVD_season, online_episodes.EpImgFlag, online_episodes.IMDB_ID, online_episodes.Language, online_episodes.ProductionCode, online_episodes.Rating, online_episodes.absolute_number, online_episodes.seasonid, online_episodes.airsafter_season, online_episodes.airsbefore_episode, online_episodes.airsbefore_season, online_episodes.RatingCount, online_episodes.TraktSeen, online_episodes.TraktLibrary, online_episodes.follwit_id, local_episodes.EpisodeFilename, local_episodes.OriginalComposite, local_episodes.CompositeID, local_episodes.SeriesID, local_episodes.SeasonIndex, local_episodes.EpisodeIndex, local_episodes.LocalEpisodeName, local_episodes.LocalImportProcessed, local_episodes.CompositeUpdated, local_episodes.AvailableSubtitles, local_episodes.OriginalComposite2, local_episodes.CompositeID2, local_episodes.EpisodeIndex2, local_episodes.videoWidth, local_episodes.videoHeight, local_episodes.FileDateAdded, local_episodes.FileDateCreated, local_episodes.IsAvailable, local_episodes.ext, local_episodes.Removable, local_episodes.localPlaytime, local_episodes.VideoCodec, local_episodes.VideoFormat, local_episodes.VideoFormatProfile, local_episodes.VideoBitrate, local_episodes.VideoFrameRate, local_episodes.VideoAspectRatio, local_episodes.AudioCodec, local_episodes.AudioFormat, local_episodes.AudioFormatProfile, local_episodes.AudioBitrate, local_episodes.AudioChannels, local_episodes.AudioTracks, local_episodes.TextCount, local_episodes.StopTime, local_episodes.VolumeLabel, local_episodes.DateWatched, local_episodes.FirstAired from online_episodes left join local_episodes on (local_episodes.CompositeID2=online_episodes.CompositeID) where online_episodes.EpisodeID > 0 and local_episodes.EpisodeFilename != '' and local_episodes.CompositeID2 != '' order by online_episodesSeriesID asc > (Die Eingabezeichenfolge hat das falsche Format.<> konnte nicht in der online_episodes.absolute_number-Spalte gespeichert werden. Erwarteter Typ: Int64.).
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Croatia Croatia
    Country flag
    • Thread starter
    • Moderator
    • #9
    Perhaps the new wrapper is not so tolerant about types, if I understand the error message correctly.

    (Die Eingabezeichenfolge hat das falsche Format.<> konnte nicht in der online_episodes.absolute_number-Spalte gespeichert werden. Erwarteter Typ: Int64.).

    Please open database in some external program and check the online_episodes table. Perhaps you have some nonsense in one of the rows of absolute_number column.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,546
    432
    Germany Germany
    Country flag
    AW: Rework of SQLite wrapper

    THat was my idea two. But all fields in absolute_number column are null OR numbers from 10 to 140. Viewed with the SQLite Manager of Firefox.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    CyberSimian [Action Required] Rework TV/Radio recordings screen MediaPortal 1 23
    ajs Shared-Cache Mode for SQLite DBs... MediaPortal 1 2
    J Database schema General 0
    Similar threads



    Top Bottom