[Approved] - How to Video database section and My Movies get to life | Page 17

Discussion in 'Archive' started by Deda, July 20, 2010.

    • Team MediaPortal

    Guzzi Retired Team Member

    System Specs
    AW: Re: How to Video database section and My Movies get to life

    Hi Deda,
    thanks for your feedback!
    So I have two questions left ;-)
    First: Do you think this is something that should be part of the MePo classes and thus being added there (as IMDB is a supported source in nMePo)?
    Second: If not (which means I would have to do it myself ....) - can you give me a hint where I find similar code to learn from? I have never dealt with the grabberclasses and -templates that are available and probably would not be able to do that from scratch.
    The approch you mentioned was about the same I was thinking of (checked to imdb source pages) - so it should be possible ...
    ... maybe I first check the existing code that gets the current single picture ... ;-)
    • Team MediaPortal

    Deda Thread Starter Lead Dev MP1 Videos

    System Specs
    Right now I don't see any benefit from using that in MP (all MP needs is one PIC, and actor view is not so common view and rarely used by users).
    If you can wait a little I can write small sample how to extract those pics in array so you can implement that in My Films.

    Also if you want you can see how one way of extraction works in MP, look at:
    Databases/Video/Imdb.cs line 753 public bool GetActorDetails(IMDBUrl url, bool director, out IMDBActor actor)

    HTMLParser (using MediaPortal.Util) class is the tool for parsing and extracting.
    • Team MediaPortal

    Guzzi Retired Team Member

    System Specs
    AW: Re: How to Video database section and My Movies get to life

    Hi Deda,

    thanks, will have a look at the existing source - and I would very much appreciate if you could provide me with a code skeleton!
    btw - it's not only the movie- or actor picture galleries - I have seen there is also clip gallery. Grabbing the links to them should be almost the same as with mediaindex - and that would be a nice think and addedvalue ... just have to check if and how those clips can be played (required code should probably be available in onlinevideos plugin...).
    • Premium Supporter

    yhoogi MP Donator

    Thanks for the info.
    Biggest problem for me is to find the ones missing out of a significant list of files. So, I would opt for a cleanup dialog showing all entries which were not found.
    This would at least give also a second barrier before the entry gots lost

    Cheers,
    • Premium Supporter

    pilehave Community Skin Designer

    When I show info on a movie in My Videos (F3) and want to change the cover (using the spincontrol) the cover is not updated, until I go back to the list with videos. This makes it hard to pick to the right cover. It DID work on older MP versions, but cannot tell how far back it was...

    Does it work for you?
    • Team MediaPortal

    Deda Thread Starter Lead Dev MP1 Videos

    System Specs
    • Premium Supporter

    pilehave Community Skin Designer

    • Team MediaPortal

    Deda Thread Starter Lead Dev MP1 Videos

    System Specs
    No, cover source is not relevant (Mp will look at TMDB and IMPAwards and show in spin control as number of covers found, if number is 0 then it will look in IMDB). So if number is greater than 1, fetch works. Now q is why cover doesn't change on spin control click. As I know that you use VS, you can trace what's going on upon spin click in GUIVideoInfo.cs, put break point on line 365 and try to debug to see if new cover is in coverArtUrls[item];

    Code (text):
    -->line 365 (Plugins/WindowPlugins/GUIVideoFiles/GUIVideoInfo.cs)
          if (control == spinImages)
          {
            int item = spinImages.Value - 1;
            if (item < 0 || item >= coverArtUrls.Length)
            {
              item = 0;
            }
            if (currentMovie.ThumbURL == coverArtUrls[item])
            {
              return;
            }

            currentMovie.ThumbURL = coverArtUrls[item]; // Set new cover url which will be assigned to image control property #thumb
            // Title suffix for problem with covers and movie with the same name
            string titleExt = currentMovie.Title + "{" + currentMovie.ID + "}";
            string coverArtImage = Util.Utils.GetCoverArtName(Thumbs.MovieTitle, titleExt);
            string largeCoverArtImage = Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, titleExt);
            Util.Utils.FileDelete(coverArtImage);
            //
            // 07.11.2010 Deda: Cache entry Flag change for cover thumb file
            //
            Util.Utils.FileLookUpItem fileLookUpItem = new Util.Utils.FileLookUpItem();
            fileLookUpItem.Filename = coverArtImage;
            fileLookUpItem.Exists = false;
            Util.Utils.UpdateLookUpCacheItem(fileLookUpItem, coverArtImage);
            //
            Util.Utils.FileDelete(largeCoverArtImage); // (this delete old cover)
            Refresh(false); // Gets new cover
            Update(); // Update controls and properties
            int idMovie = currentMovie.ID;
            if (idMovie >= 0)
            {
              VideoDatabase.SetThumbURL(idMovie, currentMovie.ThumbURL); // Write new cover url into database
            }
            return;
          }
     
    • Team MediaPortal
    • Administrator

    catavolt Design Group Manager

    System Specs
    AW: How to Video database section and My Movies get to life

    Works like a charm here (SVN 27630) ;) Evidence:

    Attached Files:

    • 17-48-21
      17-48-21.jpg
      File size:
      179.3 KB
      Uploaded:
      March 2, 2011
      Views:
      39
    • 17-48-27
      17-48-27.jpg
      File size:
      183.5 KB
      Uploaded:
      March 2, 2011
      Views:
      42
    • 17-48-31
      17-48-31.jpg
      File size:
      180.4 KB
      Uploaded:
      March 2, 2011
      Views:
      39
    • 17-48-34
      17-48-34.jpg
      File size:
      181 KB
      Uploaded:
      March 2, 2011
      Views:
      34
    • Premium Supporter

    pilehave Community Skin Designer

    I had just done something stupid - changed the ID of the imagecontrol :(

    Which made me wonder...why is there a #thumb property on the image, when it is updated through the hardcoded ID?

    Either way, it works just fine when ID is correct ;)

    :oops:

Share This Page

Users Viewing Thread (Users: 0, Guests: 1)

Running the latest version?

V1.3.0 FINAL - released March 2013
Releasenews | Download
Changelog
 | Requirements
HTPC
Team-MediaPortal
 
About
Contact |  Press
Partners