Reverse the MovieSignature Compare routine? (1 Viewer)

vuego

Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,644
    764
    Göteborg
    Home Country
    Sweden Sweden
    I noticed that when multiple matches are compared in the action name="search" section of the scraper, the last match seems to be auto-approved. The web site I'm grabbing from already does a good job of placing the correct movie first so I'd like this logic to be reversed.

    Example scanning for "Jabberwocky" the scraper builds the match list:

    Code:
    movie[0].title = Stackars Dennis
    movie[0].alternate_titles = Jabberwocky
    movie[0].year = 1977
    movie[1].title = Jabberwocky
    movie[1].alternate_titles = Zvahlav aneb Saticky Slameného Huberta
    movie[1].year = 1971
    movie[2].title = ?vahlav
    movie[2].year = 2006
    movie[2].alternate_titles = |Jabberwocky
    and auto-approves the last 0 result:
    Code:
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: 'stackars dennis', Result: 13 
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: 'jabberwocky', Result: 0 
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: 'jabberwocky', Result: 0 
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: 'zvahlav aneb saticky slameneho huberta', Result: 33 
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: '?vahlav', Result: 11 
    10-Oct-2009 15:41:17 Debug [      MovieSignature]: Compare: 'jabberwocky', With: 'jabberwocky', Result: 0 
    10-Oct-2009 15:41:17  Info [       MovieImporter]: Auto-approved Jabberwocky.avi as ?vahlav

    Is there a way to change this logic to instead prefer the first result 0 (movie[0], Stackars Dennis)?

    I'm using Moving Pictures 0.7.5.
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    in 0.8 the comparing has been improved, i'll try to explain how it will work:

    each match is weighted using the following information: imdb id, title, alternate titles, year and popularity (which should be supplied by the dataprovider, usualy this is just the order of result).
    each individual element is then giving a score, the lower the better. Depending on the scores matches are given an auto-approve flag depending (e.g. imdb id matches, or if the (alternative) title is within the specified range). There are also user (advanced) settings available (like the title slider) that influence the auto-approve mechanic. Multiple matches can an auto-approve flag.

    Title and alternate titles are first "equalized" before they are compared (and given a score). Some key modifications in this process are: swapping articles "Movie, The" becomes "The Movie and converting characters to their base form (e.g. ë will become e). This equalizing process only affects the comparing and the original title will not be altered in any way if it is entered into the movie manager after import.

    After the results are scored and flagged the results are sorted on their elements weight. The auto-approve flag is the first to be compared (so everything which has an auto-approve flag is moved to the top of the list), after that the sorting is done in this order: imdb, title, alternate title, year and popularity (a lower score for an element will rank it higher in the list). If you know a little bit of C# and the CompareTo method the exact sorting logic can be found here.

    Once the sorting is done it will hit the importer, if an auto-approve flag is found on the first match in the list it will auto-approve and the user gets the green icon. If there's no auto-approve flag the user is presented with the blue icon and a dropdown list with the sorted results.

    :D
     

    Users who are viewing this thread

    Top Bottom