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

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    By selecting the title users can see full details about the movie online. Do we need to store anything other than year and role, and the link of course, in our database?
    Why break something that works, now there is a necessary minimum of information, I would not want to lose it.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Movie - IMDB Info - Actors - Actor - Movies list
    Sorry. You'll need to be more explicit for me to understand.


    I'm trying to limit what we store to only that information that the user will see. Doesn't that make sense?

    For actors movie information, I can we need:
    1) Actor ID (internally - to find actor data for name);
    2) IMDB number (internally - link actor to movie);
    3) Movie title;
    4) PictureURL;
    5) Movie year;
    6) Actor role.

    because they appear on the screen.

    Can you tell me where detailed movie information for an actor is displayed in the configuration application because I can't understand why would want to store information we don't use?

    I can easily add any data we want to add later if required.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    In addition to the columns above, I have also included the following columns in the IMDB movie info table:

    plot;
    cast;
    credits;
    genre;
    mpaa.

    These are fields that GUIVideoArtistInfo process and I have stuck with that.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    all people need to do is to use .nfo files so you don't lose all the movie info when re scanning there movies.
    I have this option has not caught on, a lot of duplicate information and unnecessary files. But on the whole, it's a good solution...
    I haven't used nfo. When I tried that option it didn't work - for me anyway.
    Strange, importing and exporting always worked well. And this part should also be checked when you change the database structure.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    I'm trying to limit what we store to only that information that the user will see. Doesn't that make sense?
    Now in the table almost all the necessary data, I do not remember whether this table added data about the awards or not. But to remove any columns I would not, there are few of them, and not everything is enough.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    1636110174072.png
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    Hi AJS

    I suspect that is what you think is happening. And, just looking at the screen, I can understand why you think it is doing what you say. But, looking at the code and doing debug on this, the data you are seeing is actually coming from movieinfo: i.e. the information gathered by the scan process for the user's video.

    I wrote the code to get the data for all movies belonging top an actor and all that is returned is the IMDBId, title and year. All of the other fields are blank. I can show you the code if you want. Furthermore, the code that populates the listbox below:

    1636111537450.png


    does not populate from IMDBMovies. Instead, it gets the data from movieinfo and actorlinkmovie. Exactly what I told you it was doing. Even when we try to get the data from IMDBMovies, the URL field is blank. Therefore, if we showed all the movies in which the actor has partaken, you wouldn't be able to link to the IMDB page for that movie because we don't have the data.

    Here is the current code (1.29) that insert/updates actorinfomovies and IMDBMovies


    string strSQL =
    String.Format(
    "INSERT INTO actorinfomovies (idActor, idDirector , strPlotOutline , strPlot , strTagLine , strVotes , fRating ,strCast ,strCredits , iYear , strGenre , strPictureURL , strTitle , IMDBID , mpaa ,runtime , iswatched , role , iUserRating ) VALUES( {0}, {1}, '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', {9}, '{10}', '{11}', '{12}', '{13}', '{14}', {15}, {16}, '{17}', {18})",
    idActor,
    -1,
    "",
    "",
    "",
    "",
    "",
    "",
    "",
    1900,
    "",
    "",
    "",
    movie.MovieImdbID,
    "",
    -1,
    0,
    movieRole,
    0);
    m_db.Execute(strSQL);

    // populate IMDB Movies
    if (CheckMovieImdbId(movie.MovieImdbID))
    {
    strSQL = String.Format("SELECT * FROM IMDBMovies WHERE idIMDB='{0}'", movie.MovieImdbID);
    SQLiteResultSet results = m_db.Execute(strSQL);

    if (results.Rows.Count == 0)
    {
    strSQL = String.Format("INSERT INTO IMDBMovies ( idIMDB, idTmdb, strPlot, strCast, strCredits, iYear, strGenre, strPictureURL, strTitle, mpaa) VALUES( '{0}' ,'{1}' ,'{2}' , '{3}' , '{4}' , {5} , '{6}' ,'{7}' ,'{8}' , '{9}')",
    movie.MovieImdbID,
    "", // Not used (TMDBid)
    "",
    "",
    "",
    movie.Year,
    "",
    "",
    movieTitle,
    "");
    m_db.Execute(strSQL);
    }
    else
    {
    strSQL = String.Format("UPDATE IMDBMovies SET iYear={0}, strTitle='{1}' WHERE idIMDB='{2}'",
    movie.Year,
    movieTitle,
    movie.MovieImdbID);
    m_db.Execute(strSQL);
    }
    }


    So, I think actorinfomovies and IMDBMOvie are pointless. I've written the code to populate IMDBMovie and, for 12 Years a Slave it returned 349 movies related to participants in the movie, but then the system didn't use that data anyway.
     

    Anthony Vaughan

    MP Donator
  • Premium Supporter
  • June 25, 2015
    584
    292
    Home Country
    United Kingdom United Kingdom
    I am thinking that it is too easy sometimes to get so deeply involved with a project that the overall picture is forgotten.

    I see MP as a media application that enables users to view videos, music and pictures and record TV programs. It provides enough information about a video to be able to know what it's about.

    In the case of

    1636112850696.png


    all you need to do is click the link to give users the ability to view the entire IMDB database for the movie and all of its participants. Why would we want to overwhelm MP with all of that responsibility when there is already a fund of information available online? I think the data shown at the moment is good and that it is simply unnecessary to add any more. And then it turns out that the code isn't using that data anyway.

    Would someone please make a decision about this? I'm trying my best to make MP work more efficiently as well as to be more user-friendly when I see a case of lack of clarity about functionality. I appreciate that I don't have a deep knowledge of the history of MP and that there will be a lot of aspects of the system that I don't fully understand. I need a clear indication of what the product is meant to do and be given some trust that I do have some idea about what I am doing :) . I have, after all, worked out pretty well everything I know about MP from scratch will very little help.

    I am happy to use my refactored code for my own use. I am also willing to share that code and support it for you. But, it is starting to feel like I am pulling teeth to get the information I need to get things right.

    I don't blame you if you decide to stick with what you have. That's a perfectly understand position to take. But if you want to go down the road of change, then there will need to be a level of trust and commitment at your end for this to work.

    I hope you understand my position. I feel it is better to be frank and clear from the start about who is responsible for what and how much freedom and trust I am going to be given.
     

    Users who are viewing this thread

    Top Bottom