5061: Music Database doesn't show all Data... (2 Viewers)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    13,277
    7,863
    Kyiv
    Ukraine Ukraine
    Country flag
    I do not understand the logic of this procedure, why do we always ask the number of columns? MediaPortal/MediaPortal-1
    Maybe it would be easier and more logical to move this to the line MediaPortal/MediaPortal-1
    And then the source code will be like this:
    We delete this lines - MediaPortal/MediaPortal-1 MediaPortal/MediaPortal-1
    And MediaPortal/MediaPortal-1 change to:
    C#:
            // We have some data; lets read it
            if (set1.ColumnNames.Count == 0)
            {
              pN = sqlite3_column_count(pVm); 
              if (pVm == IntPtr.Zero)
              {
                ThrowError("sqlite3_column_count:pvm=null", query, res);
              }
    
              for (int i = 0; i < pN; i++)
              {
                string colName;
                IntPtr pName = sqlite3_column_name16(pVm, i);
                if (pName == IntPtr.Zero)
                {
                  ThrowError(String.Format("SqlClient:sqlite3_column_name16() returned null {0}/{1}", i, pN), query, res);
                }
                colName = Marshal.PtrToStringUni(pName);
                set1.columnNames.Add(colName);
                set1.ColumnIndices[colName] = i;
              }
            }
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    3,752
    1,997
    Nuenen
    Netherlands Netherlands
    Country flag
    @doskabouter if we change this: MediaPortal/MediaPortal-1
    from:
    C#:
    internal void ReadpVm(string query, SQLiteResultSet set1, ref IntPtr pVm)
    to:
    C#:
    internal SQLiteResultSet ReadpVm(string query, ref IntPtr pVm)
    Could this help?
    nah, that wouldnt make much in perfomance, at most a bit more readable

    same holds for your other changes.
    Must say, this isn't the clearest bit of code, had to read it a couple of times to fully grasp what's going on.
    So if not for performance, this is a good candidate for refactoring
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    13,277
    7,863
    Kyiv
    Ukraine Ukraine
    Country flag
    Its not my Code :) but in many places in the Media Portal I do not understand what is happening and why.

    -- Tapatalk | WBR, ajs
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    13,277
    7,863
    Kyiv
    Ukraine Ukraine
    Country flag
    I didn’t look, so my changes didn’t help. In Test 4, the sampling time is increased to a minute, but this is a bad option, you need to find why your time increases from 0 seconds to more than a minute.

    -- Tapatalk | WBR, ajs
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    3,752
    1,997
    Nuenen
    Netherlands Netherlands
    Country flag
    Did you have some performance stats/resource monitor (showing some unusual spikes when you didn't get the full list) open while you got those errors?
    Beginning to get quite curious...
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    joEhSuper Music Views - How to work with Operator Listen Music 26
    G 1.27.0 Problem with One Button Music after upgrade to MP 1.27.0 pre General Support 15
    D Audio dropouts with music and OnlineVideos with MP 1.26 Listen Music 0
    C Music player: stop during playback, and later restart from that spot MediaPortal 1 Talk 0
    B some music videos stutter Watch / Listen Media 0
    horned_reaper [solved] When playing music Fanart does not shuffle Fanart Handler 20
    horned_reaper [solved] When playing music Fanart does not appear immediately after downloading Fanart Handler 272
    horned_reaper [Music] 5012: Start current music track from the beginning Improvement Suggestions 37
    horned_reaper [solved] 5012: Restart current music track General Support 13
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    horned_reaper [solved] Music playback hangs General Support 58
    globaldonkey Music Database Error Listen Music 1
    joecrow Music on Headphones Listen Music 9
    2BitSculptor MP 1.23.. music stops playing General Support 6
    Sarxas What Music Are You Listening To? OffTopic 0
    Edwardfc [solved] Mp 2.2.1 Configuration Issues - Goes to Sleep while playing Music General 6
    G [fixed] [MP2-786] Party Music Player can only play playlists with less than 1000 items 2.2 Archive 7
    KlausWirn Music crash Bass crash no change to play music Installation, configuration support 2
    BlueMax1916 [confirm] Music: Every 2nd track skipped MediaPortal 2 30
    N Music player help Listen Music 4
    N How to shuffle all my music, and how to sort by album artist General 4
    R MP 2.2 client spielt audio-titel kurz an und springt dann zum nächten Allgemeines Support- und Diskussionsforum 9
    toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
    H MP2 database won't keep in synch with recordings General 8
    F How to reset tv recordings database General 5

    Similar threads

    Top Bottom