Manipulating Movie Database (1 Viewer)

Nostradamus6

Portal Member
December 13, 2006
7
0
113
I want to write an app to add all my movie entries from Personal Video Database application to MP movie database.
I have added entries in path, files, movie and movieinfo tables with proper values, but MP just ignores my records and only the ones created in MP are handled properly. It does work if I update existing entries with new information.

Do I need to set some counter or a parameter in configuration file or such for new movies to show up? Maybe there is a problem with the way I am connecting to the database? I use sqlite3 library with UTF8 encoding to connect.
 

rekenaar

Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    Hi

    I can't help you with the database questions.
    But just wondering about your video folders.
    Are all the folders added in MP Configuration, Video section?
     

    Nostradamus6

    Portal Member
    December 13, 2006
    7
    0
    113
    All root folders are added, but I do not think the problem has smth to do with them as the database has its own table of paths.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Can you post here videodatabase file with few imported entries which doesn't work. That's the only way to help you what is missing or wrong in the database.
     

    Nostradamus6

    Portal Member
    December 13, 2006
    7
    0
    113
    Can you post here videodatabase file with few imported entries which doesn't work. That's the only way to help you what is missing or wrong in the database.

    Of course. The database file is attached:
    "The Kite Runner" is added in MP
    "Terminator 2" is added with my app
     

    Attachments

    • VideoDatabaseV5.zip
      5.1 KB

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Ok here's the result of investigation: in table "movieinfo" you need in column"idDirector" to put a record which is related to "actors" table.

    So in case of "Terminator 2" put 1 ->Unknown in "actors" table. If director exists for movie it should be in "actors" table with it's id and that id must be also in "movieinfo" "idDirector" field for that movie.

    I hope that this will help you.

    MP query to get movies and infos is like this:
    select * from movie,movieinfo,actors,path where movieinfo.idmovie=movie.idmovie and movieinfo.iddirector=actors.idActor and movie.idpath=path.idpath
     

    Users who are viewing this thread

    Top Bottom