2017-02-05, 15:50
Seems any video which has been taken down due to copyright claim causes the addon to crash:
The video in question: https://www.youtube.com/watch?v=jgd8mZZa-HE
Is it possible to implement some error handling that skips the video rather than crashing the addon?
Code:
13:41:15 T:140391257356976 NOTICE: MICHS YoutubeLibrary:::::::: episode_exists(PL1DAB096585E18327, jgd8mZZa-HE, type=)
13:41:15 T:140391257356976 NOTICE: MICHS YoutubeLibrary:::::::: XML_get_elem()
13:41:15 T:140391257356976 NOTICE: MICHS YoutubeLibrary:::::::: playlist_XML_get()
13:41:15 T:140391257356976 NOTICE: MICHS YoutubeLibrary:::::::: episode jgd8mZZa-HE is not yet present in episodenr file
13:41:15 T:140391257356976 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: (u'jgd8mZZa-HE',)
Traceback (most recent call last):
File "/config/.kodi/addons/plugin.video.youtubelibrary/addon.py", line 82, in <module>
routes.run_service()
File "/config/.kodi/addons/plugin.video.youtubelibrary/resources/lib/routes.py", line 35, in run_service
service.update_playlists()
File "/config/.kodi/addons/plugin.video.youtubelibrary/resources/lib/service.py", line 183, in update_playlists
update_playlist(child.attrib['id'], type=type) #Update the nfo & strm files for this playlist
File "/config/.kodi/addons/plugin.video.youtubelibrary/resources/lib/service.py", line 221, in update_playlist
if update_playlist_vids(id, folder, settings, type=type) == False:
File "/config/.kodi/addons/plugin.video.youtubelibrary/resources/lib/service.py", line 354, in update_playlist_vids
if int(minlength) > int(duration[vid['contentDetails']['videoId']]):
KeyError: (u'jgd8mZZa-HE',)
-->End of Python script error report<--
The video in question: https://www.youtube.com/watch?v=jgd8mZZa-HE
Is it possible to implement some error handling that skips the video rather than crashing the addon?