[Approved] How to Video database section and My Movies get to life (1 Viewer)

Deda

Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    That's a code cemetery. Why is this section abandoned by developers as MP can
    look like this (yes fully functional and working on my system).

    FanArt skin support tested:

    * aMPed - 3.1
    * Black Glass 2.6 - Works ok
    * Black Glass Nova 1.3 - Works ok
    * PureVisionHD 3.9 - Works ok
    * X-Factor Skin (R678)


    Changes, new stuff and fixes:
    [collapse]
    Configuration.exe

    Video Database

    • Settings tab
    1. Use fanart option (checks for fanart plugin and implements fanart downloading and saving
    2. Use Folder name for title (option name tells everything, use this if every video file is in separate folder, otherwise strange result can happen)

    • Scan tab
    1. Refresh existing video files only (refreshing only existing files using IMDB tt number, everything for the movie including actors details <<if that option is checked>> will be refreshed automatically without asking a single question, idea behind this is to refresh movie db from time to time if something is changed or updated on IMDB)

    • Editor tab - Title
    1. Small reorganization of text boxes
    2. IMDB number text box added with hyperlink to IMDB for selected movie
    3. Lookup by IMDB tt number checkbox added (for quick selected movie refresh by IMDB id, no questions no conflicts)
    4. Moved summary to Review tab

    • Editor tab - Review (NEW)
    1. Summary overview and user overview

    • Editor tab - Actor selected movie details (NEW)
    1. Actor details overview with hyperlink to IMDB selected actor page
    2. Refresh actor details button (refresh selected actor details by actor IMDB id, movie data stays untouched)
    3. Refresh All actors button(refresh all actors for all movies in collection, movies data stays untouched)

    • Editor tab - Actor movies (NEW)
    1. Overview of all movies in which selected actor participate with hyperlink to IMDB movie page
    2. Indication in movie list that you have it in your collection
    3. Year and role for every movie in the list

    • Editor tab - Coverart
    1. Cover source checkboxes for manual cover find (TMDB, IMPAwards and IMDB)

    • Editor tab - FanArt (NEW)
    1. Browse fanart for selected movies - for manual fanart selection
    2. Refresh all Fanarts (download and save randomly selected fanart for all movies no other movie or actor data will be changed)

    Code changes and fixes:
    • new settings options - fanart, use Folder name for title
    • delete fanart files when resetting videodatabase (Yes/No)
    • cover fetch based on IMDB movie ID not on the name
    • color visualization in Movie dialog list (for AKA grabber)
    • CDx problem solved (only one file is showed in conflict screen, filename is forwarded into search without CDx)
    • new code for added controls

    Core.dll

    Code changes and fixes:
    • new classes added in Util (Fanart fetch, IMDB cover search, TMDB cover search)
    • re-written IMPAwards cover search
    • search is based on IMDB id number so no more wrong covers

    Databases.dll

    Code changes and fixes:
    • html encoding change because of wrong displayed special country characters
    • added new scene extension to remove method (aka brrip, mbluray..)
    • actor details grab fixed
    • movie director grab fixed
    • all character grab based on IMDB actor id, not by name
    • new columns in actor database table (imdbactorID, thumbnailURL)
    • auto update database for new columns, check and execute
    • fanart GUI download and save
    • cover grab fixed and added new sources for covers (IMDB and TMDB)
    • only actor refresh method added in IMDBFetcher with progress bar
    • all seraching is based on IMDB id (IMDB fetcer)
    • CDx problem solved (IMDB fetcher)
    • GetActorsByMovieID function added
    • Cast fix for single quota
    • GetMovieInfoById - directorID added
    • IMDBActor SetActorInfo - thumbURL and actorIMDBid added
    • IMDBActor AddActorInfoMovie - imdbID added
    • IMDBActor GetActorInfo - thumbnailURL and ActorIMDBid added

    WindowsPlugins.dll (Video part)

    Code changes and fixes:

    • Folder title added as search string
    • Fanart handling
    • new cover sources added
    • removed Amazon cover source
    • NULL check for skin gui controls (could break cover fetch thread)
    [/collapse]
    23.7.2010
    MP Video Database Configuration V 1.1.0 final
    [collapse]
    Global changes:
    • Compiled against MP v 1.1.0 final

    Configuration.exe

    Code changes:
    • Added auto video title based on added filename (without extension) when user manually add video file (or files). First file name goes to title textbox.
    • Media type default filter is MP video filters (default ones and user added new ones taken from MP Video extensions list)
    • Last used file filter is remembered
    [/collapse]

    24.7.2010
    [collapse]Configuration.exe

    Code changes:
    • Fetch all actors info from movie collection "Cancel scan" button function fixed
    • Cover picture sizing fixed
    • Actor movies list columns auto-sized (gray background not visible anymore)

    thx Manfred for pointing me to those flows[/collapse]

    25.7.2010. (Some cleaning and fixes)
    Test IMDB AKA script - only for patched files (populates moviedetails.userReview) **Do not use it with official MP 1.1.0 release
    [collapse]
    Configuration.exe

    Code changes:

    • Removed hardcoded strings

    Core.dll

    Code changes:
    • IMDBCoverSearch (new Util subclass) renamed to IMDBSearch
    • Small change in actors fetch (movie director part) in IMDBSearch

    Databases.dll

    Code changes:

    • Give grabbers which don't use IMDB id number (ttxxxxxx) a chance to do it's job properly
    • User review column added in movieinfo vdb table and upgrading all Get/Add/Update MovieInfo sql queries for that
    • Auto upgrade vDB for new column
    • User review joined with plot (if it's not empty or unknown) with MP localized title string in set GUI #Plot property, this is workaround but clean solution 'till maybe in the future this became separate property
    • New property in IMDBMovie class - userReview now can be added or read in moviedetails
    • "Spot the movie director" within actor list in IMDBFETCHER _fetchActorsInMovie method changed
    • small code clean

    WindowPlugins.dll

    Code changes:
    • Give grabbers which don't use IMDB id number (ttxxxxxx) a chance to do it's job properly
    [/collapse]

    27.7.2010. (MP bug fix and enhancement)
    [collapse]
    Configuration.exe

    Code changes:
    • Fixed label2 name when updating grabbers

    Database.dll

    Code changes:
    • Now grabber can properly use local image for cover

    Example how can be used in grabber script (if cover have movie filename and resides where is movie file):
    Code:
    bool MediaPortal.Video.Database.IIMDBScriptGrabber.GetDetails(MediaPortal.Video.Database.IMDB.IMDBUrl url, ref MediaPortal.Video.Database.IMDBMovie movieDetails)
      {
         try
         {
             movieDetails.Reset();
             movieDetails.Database = "TEST";
    
             //Get movie path
             string movie_Path = movieDetails.Path;
             //Get movie filename
             string movie_FileName = movieDetails.File;
             //Remove media ext and add image ext
             string movie_CoverFile = Path.GetFileNameWithoutExtension(movie_Path + @"\" + movie_FileName) + ".jpg";
       
             //Poster cover
             string movie_cover = movie_Path + @"\" + movie_CoverFile;
             if (File.Exists(movie_cover))
             {
                movieDetails.ThumbURL = "file://" + movie_cover;
             }
    
              ......................

    or for example scraping through nfo file
    Code:
    void MediaPortal.Video.Database.IIMDBScriptGrabber.FindFilm(string strSearch, int iLimit, ArrayList elements)
      {
        //As movie name will be taken from nfo we will just pass back search string
        MediaPortal.Video.Database.IMDB.IMDBUrl url = new MediaPortal.Video.Database.IMDB.IMDBUrl("", strSearch , "NFO");
        elements.Add(url);
    	
        return;
      }
    
    bool MediaPortal.Video.Database.IIMDBScriptGrabber.GetDetails(MediaPortal.Video.Database.IMDB.IMDBUrl url, ref MediaPortal.Video.Database.IMDBMovie movieDetails)
      {
        try
        {
          movieDetails.Reset();
          movieDetails.Database = "NFO";
          //Read nfo file 
          string movie_Path = movieDetails.Path;
          string movie_FileName = movieDetails.File;
          string movie_FileTitle = Path.GetFileNameWithoutExtension(movie_Path + @"\" + movie_FileName);
          string movie_nfo = movie_Path + @"\" + movie_FileTitle + ".nfo";
    	  
          //No nfo file, no movie
          if (!File.Exists(movie_nfo))
          {
    	  movieDetails.ID = -1;
    	  return false;
          }
    
          //Poster cover (file name is folder.jpg)
          string movie_cover = movie_Path + @"\folder.jpg";
          if (File.Exists(movie_cover))
          {
      	  movieDetails.ThumbURL = "file://" + movie_cover;
          }	
          .....................
    [/collapse]

    30.7.2010. (First start grabber update and minor fixes)
    [collapse]
    Configuration.exe

    Code changes:

    • Grabber download and setup by Windows language on first videodatabase setup
    • Code cleaning

    Databases.dll

    Code changes:

    • Added fanart grabbing status into progressbar (visible in GUI and Configuration)
    [/collapse]

    2.8.2010. (Exception fix, new option, PBar tweak)
    [collapse]
    Configuration.exe

    Code changes:

    • Fixed possible exceptions in Editor-Title screen (Year, Duration and Rating txBoxes - just delete values or type letters in those fields and press Save)
    • Added "Refresh all covers" option - refreshes all covers for all movies within collection
    • ProgressBar Dialog-ProgressBar controls upgraded to tweaked PBars (MPProgressBar)
    • Changes in PBars will be visible only in W7/Vista as XP doesn't have value lag issue (Aero problem)
    • CDx match problem upgraded to full MP supported pattern list (Dialog movie conflicts)

    Database.dll

    Code changes:

    • CDx match problem upgraded to full MP supported pattern list

    Core.dll

    Code changes:

    • Progress bar user control added - added in UsersInterfaceControls as MPProgressBar (Windows 7/Vista bar lagging behind the actual percentages passed to the control) - Now it really follows percentage/value (Configuration screen, not GUI)
    [/collapse]

    4.8.2010. (Cover bug for the movies with the equal name fix)
    [collapse]
    Cover thumbs file names now have video database movieID suffix (ie. MovieName{dbID}.jpg)

    There is small tool in Configuration to upgrade all thumbnail file names to the new naming rule so there is no need to scrap them again (Videdatabase-Editor-Tools tab), downgrade is also possible.

    **Note**
    For movies afflicted with that bug (with wrong displayed cover) just refresh cover in Coverart tab (Search cover button) or in GUI with Refresh button in movie details screen.

    [/collapse]

    8.8.2010. (Service release)
    [collapse]

    Temporary disabled initial grabber update (something is wrong so need more testing)

    Configuration.exe

    Code changes:

    • Fixed slow response in configuration (actor movies list display) thx "sleepycol (Collin)" for help
    • Forbidden chars for filenames fix

    Database.dll

    Code changes:

    • Fixed MP bug in "TableColumnExists" method (DatabasUtility.cs). Method fails on empty table.
    • Minor fix in actor details fetch (in rare occasion details fetch fails on some actors)

    [/collapse]

    23.8.2010. (Collection of small updates after 8.8.2010)
    [collapse]

    Visible changes are in:
    • MPlistView control - enabled sort option (sorting property was disabled, but in original MPCode sort was used ie. Actor list and All actor list),
    • Videothumb creation spamming decreased,
    • Actor thumb with better quality

    and lots of small code changes and optimization which I can't remember right now.

    IMDB script small change in Plot parsing.

    [/collapse]

    3.9.2010. (Last unpublished changes)
    [collapse]

    Configuration.exe
    • Small fix for covers and fanarts listbox refresh
    • Added option to add local picture for fanart
    • Added option to manual search fanart for movies without IMDBid (search string textbox)

    Big code refactoring and cleanup.

    Databases.dll
    • Chance to search fanart for movies without IMDBid (uses movie name while grabbing if no IMDBid)
    • Rework of actor details fetch
    • Added fanart link to videodatabase (movieinfo table)

    Big code refactoring and cleanup.

    Core.dll
    • Rework of new cover and fanart fetcher classes and their code refactoring and cleanup.

    IMDB script
    • Rewritten cover grab (uses new cover grab classes from Core.dll)
    • Now fanart can be fetched in script as URL or local file (movieDetails.FanartURL = "http://..." or movieDetails.FanartURL = "file://.....")

    [/collapse]

    5.9.2010. (Config bug fix, TMDB cover grab upgrade, see script info below)
    [collapse]

    Configuration.exe
    • Config crash bug fix (when IMDB cover source is only selected)

    Core.dll
    • TMDB cover grab by name or search string for movies without IMDB id number.

    IMDB script
    • Use the new script if you use Test Script from from 3.9.2010, otherwise scan will fail, original MP script is not affected with latest changes so it should work)

    [/collapse]

    16.9.2010. (Strip title prefix)
    [collapse]

    Configuration.exe
    • Added Strip title prefix option for database view

    Cleaning of deleted movies covers and fanarts improved.
    No thumbnail creation while scanning in config and GUI.
    [/collapse]

    30.9.2010. (New IMDB csscript)
    [collapse]

    Works with new IMDB webpage changes
    • Added compatibility with new IMDB html layout, to be honest, regexes was taken (and adapted with some changes) from MovingPictures new IMDB scraper because I don't have time to follow those changes, so big thx to devs of MoPo. I tested the script and it works OK in my test cases but minor bug can happen so just tell me and I will look into it.
    [/collapse]

    01.10.2010. (V 1.1.1 Binaries)
    [collapse]

    Configuration.exe
    • Added option to use file name for movie search as sub option for: Use folder names for movie titles - each movie is in it's own folder. This don't work if folder contains ripped DVD, main folder will be used as title.

    Databases.dll
    • Local cover (folder.jpg) and fanart (fanart.jpg) is used if available in conjunction with option "Use folder names for movie titles - each movie is in it's own folder".
    • Folder name as title rework

    Full version contain texture deadlock patch https://forum.team-mediaportal.com/bugtracker-feed-462/0003047-guitexturemanager-deadlock-87196/

    [/collapse]

    08.10.2010. (IMDB script update for patched files)
    [collapse]

    Bugfix on movie direct hit.

    [/collapse]

    08.10.2010. (Actor grab fix caused by new IMDB site changes)
    [collapse]

    Rework of actor details grab according to IMDB site layout change.

    [/collapse]

    IMDB script moved here https://forum.team-mediaportal.com/submit-movie-info-grabbers-287/imdb-aka-script-87965/

    ====================================================================

    Patch is now fully implemented in 1.2.0 Alpha. For testing please use 1.2.0 A version and report any issue here: MediaPortal 1.2.0 ALPHA - MediaPortal Forum
     

    Attachments

    • Pic06_BGNova_share.jpg
      Pic06_BGNova_share.jpg
      39.4 KB
    • Pic07_BGNova_database.jpg
      Pic07_BGNova_database.jpg
      49.1 KB
    • Pic13_actorGUIBio1.jpg
      Pic13_actorGUIBio1.jpg
      49.4 KB
    • Pic14_actorGUIMovies1.jpg
      Pic14_actorGUIMovies1.jpg
      41.6 KB
    • Config_1.jpg
      Config_1.jpg
      67.8 KB
    • Config_2.jpg
      Config_2.jpg
      60.2 KB
    • Config_3.jpg
      Config_3.jpg
      90.8 KB
    • Config_4.jpg
      Config_4.jpg
      116.6 KB
    • Config_5.jpg
      Config_5.jpg
      88.5 KB
    • Config_6.jpg
      Config_6.jpg
      102.2 KB
    • Config_7.jpg
      Config_7.jpg
      59.6 KB
    • Config_8.jpg
      Config_8.jpg
      72.4 KB
    • Config_9.jpg
      Config_9.jpg
      63.3 KB

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    That's a code cemetery. Why is this section abandoned by developers as MP can
    look like this (yes fully functional and working on my system).
    We would be happy to receive the changes as *.patch.
    Then our developers can review the changes, and hopefully add them to 1.2.0. :)
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Looking forward to your changes, your original ones worked a treat, so expecting good things :D

    Cheers
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Sure, patch is not a problem, but little bit huge :) and it's almost on everyday basis as I trying to remove all inconsistencies in VideoDB section and sometimes it's not easy to spot them except staring in debugger pressing "Step Into" and watching variables :).
    Many things can be done on different way or better, but in global, inside MP VideoDB lays tons of dead code right now without doing anything except returns NULLs, Exceptions masked with TRY-CATCH or some random things without meaning.

    What I don't like is dependancy on third party add-ons, but fan art handler is one jewel piece of code without need to touch it after install, and of course skin need to be up and ready to support that gem, and I found really superb one (Black Glass Nova) which fulfills everything as good skin should have (look, no forced add-ons install, usability, fast support and almost no exceptions in error log :) and tadaaa.. full fanart support :) )

    Of course this is not replacement for excellent add-on Moving Pictures but I really don't need it, as I like to have all in one place with quick and easy selection. I just use Share view and everything is there ready to view (home movies, music videos, films, external usb disks with temp films just to watch and delete) with all goodies if I really need it (aka video info, covers, arts...) with just one button press because I use "Scan" within GUI and everything is on place without need to exit MP and doing micromanagement.

    oh, and I forgot to attach new IMDB script (not too much different from current one but adds user review and rating by countries according to local settings) and RC6 compiled files if someone wanna try it (backup your originals including videodb file as it will be also upgraded with new fields), and yes, I'm using it on daily basis without any problem.


    ***Patch moved to firts post
     

    sleepycol

    Portal Pro
    June 2, 2006
    538
    39
    Home Country
    United Kingdom United Kingdom
    Hi,

    Is it possible to make a small change.....When manually adding a new title in the video database, is it possible to auto fill in the title with the filename? Saves some typing. Also, have the file filter set to all media file extensions specified in extensions tab, rather than just avis? I add mp4 files now and have to change from avis to mp4 each time I manually add a new movie to the database.

    Cheers,
    Colin
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    I can pretty easily do that, but if question is for developers time is your friend for now.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    Moved the thread to the correct section.
    That way our devs won't be able to miss the patches. :)
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Now that 1.1.0 is released, could we please have a patch for this, and binaries, based on 1.1.0 ?

    Hopefully if we get some testing done, this can be committed into the trunk for 1.2.0, and we can start releasing SVN builds.

    Best wishes,

    Mark
     

    Users who are viewing this thread

    Top Bottom