alberanid/imdbpy — pull request #9 by darklow (2013-03-30 17:56:00+00:00)
Title: Remove canonical titles, fix search for titles with sub-kind, mini-series fix

1) IMDB doesn't return any results anymore, if we add subtype suffixes like `(V)`, `(VG)`, `(TV)` etc.

If we remove suffix, then we get results, but we can't be sure it matched the right kind.
Therefore only one right solution came to my mind.

I added additional parameter to `title2imdbID(title, kind=None)`
Now we can perform search without suffix and when comparing additionally check if `title_kind == kind` from the result
Of course when using `get_imdbMovieID(ID)` this kind is pre-filled from DB value

We can't leave without additional checking because wrong ID can be found:

For example:
Perspectives (2011) (TV Series)
Perspectives (2011) (Video)
http://akas.imdb.com/find?q=Perspective+2011&s=tt

The same will fail for these entries:
Terminator 2: Judgment Day (1991)
Terminator 2: Judgment Day (1991) (Video Game)
http://akas.imdb.com/find?q=Terminator+2%3A+Judgment+Day&s=tt

Second line searches for both these examples will match the first and match wrong ID.

Note: To avoid mis-matches, this parameter should be required, not optional. But i didn't wanted to create backwards compatibility break, so i made it optional. However since now, if no title kind is specified, and multiple matches found, there will be list of matched IDs returned not first one. I think this is better that someone will get wrong ID.

2) Imdb changed from `(mini)` to `(TV Mini-Series)` suffix
3) Imdb doesn't enclose TV series anymore
4) Now search does non-canonical search and compare