Skip to content

IMDB Search API#1366

Merged
liiight merged 3 commits intoFlexget:developfrom
liiight:imdb_search
Aug 24, 2016
Merged

IMDB Search API#1366
liiight merged 3 commits intoFlexget:developfrom
liiight:imdb_search

Conversation

@liiight
Copy link
Copy Markdown
Member

@liiight liiight commented Aug 24, 2016

Motivation for changes:

To enable a nicer UX, adding a movie to a movie list could to a quick lookup via its title and select the correct movie via IMDB, along with its metada

Detailed changes:

  • Added the /imdb/search/<title_or_id>/ endpoint
  • Tweaked ImdbSearch to return multiple results and not just 1 (default behaviour remains, configraube via single_match flag).
  • Tweaked ImdbSearch.search to parse results on perfect match, to allow for correct metadata response when searching via ID

Log and/or tests output (preferably both):

Request: http://127.0.0.1:5050/api/imdb/search/reloaded/

[
  {
    "imdb_id": "tt5613834",
    "match": 1.1,
    "name": "Reloaded",
    "url": "http://www.imdb.com/title/tt5613834/",
    "year": "2017"
  },
  {
    "imdb_id": "tt3354594",
    "match": 0.860204081632653,
    "name": "Reload",
    "url": "http://www.imdb.com/title/tt3354594/"
  },
  {
    "imdb_id": "tt1884351",
    "match": 0.7703703703703703,
    "name": "Marx Reloaded",
    "url": "http://www.imdb.com/title/tt1884351/",
    "year": "2011"
  },
  {
    "imdb_id": "tt4677344",
    "match": 0.7644444444444445,
    "name": "Trey Reloaded",
    "url": "http://www.imdb.com/title/tt4677344/"
  },
  {
    "imdb_id": "tt1486792",
    "match": 0.7638095238095237,
    "name": "Life Reloaded",
    "url": "http://www.imdb.com/title/tt1486792/",
    "year": "2009"
  },
  {
    "imdb_id": "tt4480774",
    "match": 0.7549999999999999,
    "name": "Uploaded",
    "url": "http://www.imdb.com/title/tt4480774/",
    "year": "2016"
  },
  {
    "imdb_id": "tt2555828",
    "match": 0.7296187683284457,
    "name": "Monk: Reloaded",
    "url": "http://www.imdb.com/title/tt2555828/",
    "year": "2012"
  },
  {
    "imdb_id": "tt0893406",
    "match": 0.7244897959183674,
    "name": "Loaded",
    "url": "http://www.imdb.com/title/tt0893406/",
    "year": "2008"
  },
  {
    "imdb_id": "tt2608030",
    "match": 0.7232142857142857,
    "name": "Loaded",
    "url": "http://www.imdb.com/title/tt2608030/",
    "year": "2015"
  },
  {
    "imdb_id": "tt0450293",
    "match": 0.7161654135338346,
    "name": "Loaded",
    "url": "http://www.imdb.com/title/tt0450293/",
    "year": "2007"
  },
  {
    "imdb_id": "tt5161266",
    "match": 0.7159468438538207,
    "name": "Loaded",
    "url": "http://www.imdb.com/title/tt5161266/",
    "year": "2016"
  }
]

@liiight liiight merged commit 88be548 into Flexget:develop Aug 24, 2016
@liiight liiight deleted the imdb_search branch August 24, 2016 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant