dawoudt / JustWatchAPI

Python 3 JustWatch.com API - https://justwatch.com
MIT License
326 stars 45 forks source link

Bug on search_title_id if two or more movies have the same title #45

Closed DamnMiri closed 3 years ago

DamnMiri commented 4 years ago

If after a query two or more movies have the same title the line return {item['title']: item['id'] for item in results['items']} overwrites the values in the dict with the same title.

Example just_watch = JustWatch(country='US') just_watch.search_title_id(query="oldboy") return 10 values at search_for_item but 9 after search_title_id

Possible Solution implemented PR #46 : Invert key and value of dict return {item['id']: item['title'] for item in results['items']}