Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TMDB Entries without a "release_date" crashes the whole search #67

Open
firatakandere opened this issue Jun 9, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@firatakandere
Copy link

firatakandere commented Jun 9, 2020

Describe the bug
The search crashed for TMDB when the json from TMDB api does not include "release_date" for an entry. Parsing error for a single entry should not cause the whole search to crash, maybe a better exception handling would be good to have.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Search
  2. Enter "ant" and search.
  3. Click TMDB Movies
  4. Search crashes.

Expected behavior
Search happens.

Platform

  • Kodi version 18.1 Leia
  • Device Raspberry Pi
  • Operating System (Android, WIndows, etc...)

Log File

                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: 'release_date'
                                            Traceback (most recent call last):
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/addon.py", line 157, in <module>
                                                plugin.run()
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/resources/lib/xswift2.py", line 917, in run
                                                items = self._dispatch(self.request.path)
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/resources/lib/xswift2.py", line 929, in _dispatch
                                                resp = view_func(**items)
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/resources/lib/nav_movies.py", line 209, in tmdb_movies_search_term
                                                return list_tmdb_items(result)
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/resources/lib/nav_movies.py", line 373, in list_tmdb_items
                                                movies = [meta_info.get_movie_metadata(item, None) for item in result['results']]
                                              File "/home/firat/.kodi/addons/plugin.video.openmeta/resources/lib/meta_info.py", line 12, in get_movie_metadata
                                                info['year'] = text.parse_year(movie['release_date'])
                                            KeyError: 'release_date'
                                            -->End of Python script error report<--
2020-06-09 23:48:49.273 T:140032770660096   ERROR: GetDirectory - Error getting plugin://plugin.video.openmeta/movies/tmdb/search_term/ant/1/
2020-06-09 23:48:49.285 T:140035975051968   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.openmeta/movies/tmdb/search_term/ant/1/) failed```
@firatakandere firatakandere added the bug Something isn't working label Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant