Duplicate records in VideoDatabaseV5.db3 (1 Viewer)

Anthony Vaughan

MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Hi CyberSimian

    I am finding that, for some folders, I get duplicate records created in the file table, and consequently the movie table, in VideoDatabaseV5.db3 when I browse a folder in MediaPortal1 (1.21.0 - though this was happening in 1.21.0 pre-release as well).

    I have attached an example. I have renamed the extension as db3 is not an allowed extension.

    The duplicates occur in idPath = 14.

    I see the duplicates immediately after I have browsed a folder, so I know the duplication must be happening in the application. Can't think why it only happens in the one folder though.

    Tony

    P.S. The reason this problem is very important is that when there is a duplicate record in the folder your are browsing and you then watch one of the duplicated programs, the resume processing doesn't know which record to link to and, therefore, your last watched position in the program is not recorded.

    P.S. again: I've now noticed that there are duplicate Path records as well (i.e. more than one record with the same path name) that spawn file records with duplicate program names. Hope that gives a further clue.

    P.S. again again; I am thinking that this issue might be associated with my changing the EPG source since all of these problems started from then. So, I've created a new VideoDatabaseV5 file and will monitor this issue to see if it crops up again, though there must be some sort of issue though I don't know whether MediaPortal searches files and paths by name or by id.
     

    Attachments

    • VideoDatabaseV5.001
      672 KB
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    I am finding that, for some folders, I get duplicate records created in the file table, and consequently the movie table, in VideoDatabaseV5.db3 when I browse a folder in MediaPortal1
    Unfortunately, this is an area of MP of which I have no knowledge. :( I have been using MP 1.21 as my production system for a couple of weeks now, and have not noticed any problems (and I use the broadcast EPG too!). A couple of points:

    (1) Make sure that the folder(s) that you have specified for recorded TV are not also specified as video folders, as that might lead to duplicated entries.

    (2) Do you use any plugins (other than "TV Server" and "PowerScheduler")? If you do, it might be worthwhile disabling them for a week or two, and seeing if the problem no longer occurs. I don't use any plugins other than "TV Server" and "PowerScheduler".

    Possibly someone who knows more about SQL and the problems that can arise will be familiar with the symptoms and be able to suggest some possible causes and solutions. Sorry I cannot be of more help.

    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Hi CyberSimian

    This issue is with a SQLite database. I think I am on the track with this one. Need to do a bit more investigation. Should know by tomorrow lunchtime.

    BTW, I am a SQL database architect of some 25 years; though now retired. But I am leaving the actual MP code alone.

    I'll let you know when I have worked this out.

    Tony
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Hi CyberSimian

    Okay, I think I have worked it out. In the VideoDatabaseV5.db3 SQLite database there is a table called 'path' that has a column called 'cdlabel'. If this column is empty for non-film program, MP seems to ignore it and created a duplicate record. When the 'cdlabel' contains 'unknown', then MP does not create a duplicate record nad uses the existing record to generate file and movie records.

    How, you may ask, could the cdlabel column be null. Well, I have developed a system that synchronizes VideoDatabaseV5.db3 changes for all clients in my MP setup. VideoDatabaseV5.db3 is a single user database and I have to make the MP system multi-user. I do this by saving all changes to any of the client VideoDatabaseV5.db3 files in a separate - common to all clients - database and then apply those changes to each of the client VideoDatabaseV5.db3 files when the system is idle. I have also allowed a new VideoDatabaseV5.db3 database file to be created based on an existing common synchronized database. Since I was unaware of the 'unknown' feature, I found the duplication issue. Of course, this is not a issue with MP, but a self-imposed problem.

    Anyway, all is now resolved.

    Tony
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    VideoDatabaseV5.db3 is a single user database and I have to make the MP system multi-user.
    The main difference between MP1 and MP2 is this very point (I think :unsure:). MP2 was designed from the outset to have a central database on the server which is updated by the clients as needed. It allows such things as starting watching a recording on one client, stopping play part-way through, and then resuming watching that recording on a different client.

    I have only a "single seat" system, so this property of MP2 is of no benefit to me, which is why I have not installed it as a trial. Also, there are functional differences, and user-interface differences. In some cases MP2 is better, but in other cases MP1 is better. So MP2 is not a slot-in replacement for MP1. Nevertheless, if you have not yet evaluated MP2, it might be worth trying it, to see if it gives you more of what you want. The TV part of MP2 is the same as MP1, so there is no functional difference there.

    Note: MP1 and MP2 cannot co-exist peacefully on the same system, as they will fight over access to the tuners. So you need to stop the MP1 TV Service before installing MP2, and stop the MP2 TV Service before reverting to MP1. (I think that is correct -- I have never tried it myself :eek:)

    -- from CyberSimian in the UK
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    566
    292
    Home Country
    United Kingdom United Kingdom
    Hi CyberSimian

    I have done a fair bit of testing off MP2. I had to abandon it because the user interface is a bit primitive in its functionality. Namely, the MP2 guide does not scroll perpetually; i.e. when you scroll up and reach BBC1 the scrolling stops. So, to get to the programmes immediately before BBC1, you have to scroll down through the entire channel list. MP1 scrolls perpetually. To me, this is a deal breaker and I cannot use MP2 as I constantly scroll through the channels in both directions.

    When I pointed this out, this was the reply:

    "Try Channel+/Channel- to jump one screen up/down. Much faster this way.

    In that case we regret, but this is something that won't change. Otherwise the controls on the top of this screen cannot be reached with a remote.

    The mediaportalsdir.xml is an unofficial feature, which, when in doubt, is unsupported. I found myself victim to this when bringing to the team's attention something that wouldn't work anymore. I would need to search for the exact posting but the response was probably what pushed me to abandon MP1."

    Now, MP1 can reach the top of the screen by moving control to the channel name then moving up. If MP1 can do this, then I cannot see why MP 2 cannot.

    The last point is the other deal breaker. MP2 cannot share configurations as MP1 does by using mediaportalsdir.xml. I often have needed to make configuration changes to the client that I need to extend to all clients. MP1 allows this to be done by using mediaportalsdir.xml.

    The inflexibility in this reply suggests to me that MP2 will have limited application and that is why I am staying with MP1 and have developed several add-ons to enhance it:

    1) A backup facility that backs up the SQL Server database, the configuration and all of the SQLite databases;
    2) A multi-user synchronizing function that ensures that you can watch a program on one client and resume watching it from another client at the same place;
    3) A management facility that allows key words to be removed from program names, like 'New: ' and extracts episode data from the program description and places them in the episode fields.

    These features make my user experience of MP1 as good as, if not better, than Media Center. That is why I try to bring bugs to your attention because I think that fixing these bugs will encourage current and future users to keep working with MP.

    I hope you agree and that MP developers out there will feel encouraged to keep up the good work.

    Tony
     

    Users who are viewing this thread

    Top Bottom