add-ons / plugin.video.viervijfzes

Kodi add-on to watch video-on-demand content from the Play 4, Play 5 and Play 6 channels.
https://github.com/add-ons/plugin.video.viervijfzes/wiki
GNU General Public License v3.0
50 stars 10 forks source link

Directory listing fails #104

Closed badoneti closed 2 years ago

badoneti commented 2 years ago

Kodi (19.3 (19.3.0) Git:19.3-Matrix). Running on LibreELEC (official): 10.0.1, kernel: Linux x86 64-bit version 5.10.76 GoPLay 0.4.7-Matrix

Error when loading "Mijn lijst" or searching for a series. Steps:

  1. open GoPlay, authentication OK
  2. see what's on "Mijn lijst" OK
  3. Select a series from 'Mijn Lijst' to see episodes --> TypeError: an integer is required (got type str)

2022-07-04 21:34:19.031 T:4166 INFO : CPythonInvoker(12, /storage/.kodi/addons/plugin.video.viervijfzes/addon_entry.py): script successfully run 2022-07-04 21:34:20.669 T:4166 INFO : initializing python engine. 2022-07-04 21:34:21.077 T:4166 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

  • NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'TypeError'> Error Contents: an integer is required (got type str) Traceback (most recent call last): File "/storage/.kodi/addons/plugin.video.viervijfzes/addon_entry.py", line 18, in run(argv) File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/addon.py", line 194, in run routing.run(params) File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 130, in run self._dispatch(self.path) File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 141, in _dispatch view_func(**kwargs) File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/addon.py", line 74, in show_catalog_program Catalog().show_program(program) File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/modules/catalog.py", line 62, in show_program program = self._api.get_program(program_id, extract_clips=True, cache=CACHE_PREVENT) # Use CACHE_PREVENT since we want fresh data File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/viervijfzes/content.py", line 257, in get_program program = self._parse_program_data(data) File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/viervijfzes/content.py", line 653, in _parse_program_data program.episodes = [ File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/viervijfzes/content.py", line 654, in ContentApi._parse_episode_data(episode, playlist.get('id')) File "/storage/.kodi/addons/plugin.video.viervijfzes/resources/lib/viervijfzes/content.py", line 692, in _parse_episode_data aired=datetime.fromtimestamp(data.get('createdDate')), TypeError: an integer is required (got type str) -->End of Python script error report<--

2022-07-04 21:34:21.436 T:4166 INFO : Python interpreter stopped 2022-07-04 21:34:21.439 T:4169 INFO : Skipped 1 duplicate messages.. 2022-07-04 21:34:21.439 T:4169 ERROR : GetDirectory - Error getting plugin://plugin.video.viervijfzes/catalog/nonkels 2022-07-04 21:34:21.458 T:820 ERROR : CGUIMediaWindow::GetDirectory(plugin://plugin.video.viervijfzes/catalog/nonkels) failed

M0nty99 commented 2 years ago

I'm facing the same issue, on the same version of libreelec. In addition also having issues with playback, getting a random Goplay error, check the logs for more information. Will upload logs later

EDIT: Logs: -07 11:04:39.542 T:915 INFO : initializing python engine. 2022-07-07 11:04:40.141 T:915 INFO : CPythonInvoker(7, /storage/.kodi/addons/plugin.video.viervijfzes/addon_entry.py): script successfully run 2022-07-07 11:04:41.995 T:915 INFO : initializing python engine. 2022-07-07 11:04:42.351 T:915 WARNING : Invalid media type "" 2022-07-07 11:04:42.504 T:915 INFO : Skipped 313 duplicate messages.. 2022-07-07 11:04:42.504 T:915 INFO : CPythonInvoker(7, /storage/.kodi/addons/plugin.video.viervijfzes/addon_entry.py): script successfully run 2022-07-07 11:05:08.837 T:915 INFO : initializing python engine. 2022-07-07 11:05:08.975 T:915 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

ghost commented 2 years ago

As a temporary workaround I placed the error line in comment.

Try this:

  1. Download the zip from github and extract to folder 'plugin.video.viervijfzes-master'
  2. Navigate to plugin.video.viervijfzes-master/resources/lib/viervijfzes
  3. Open content.py
  4. Place # at the beginning of line 692: #aired=datetime.fromtimestamp(data.get('createdDate')),
  5. Compress the folder 'plugin.video.viervijfzes-master' to zip again
  6. Uninstall the addon from repository and install this zip in kodi
  7. Log in again

Didn't test everything but this worked for me for 'Mijn lijst'.

michaelarnauts commented 2 years ago

@badoneti, @M0nty99 or @ghetom can you try with this version?

plugin.video.viervijfzes-0.4.7.zip plugin.video.viervijfzes-0.4.7+matrix.1.zip

The problem was that data.get('createdDate') suddenly didn't return an integer anymore, but a string. This was due to a change at GoPlay.

badoneti commented 2 years ago

@michaelarnauts this fixes the issue, tested with matrix version included above

michaelarnauts commented 2 years ago

@michaelarnauts this fixes the issue, tested with matrix version included above

Thanks for verifying! I'll make a v0.4.8 release today.

ghost commented 2 years ago

The matrix version works indeed. Thanks!