• 1
  • 13
  • 14
  • 15
  • 16(current)
  • 17
[RELEASE] TED Talks (Video) Plugin
Following is a work-around that made the Ted Talks v4.3.1 add-on work for me with LibreELEC 9.2.6:

Edit the file ~/.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
and comment out lines 23 and 24 by placing a hash mark in front.  Be sure to maintain the original indentation levels.

The change should look similar to the following three line snippet:

python:
       subs = None
       #if subs_language:
       #    subs = subtitles_scraper.get_subtitles_for_talk(talk_json, subs_language, self.logger)

'Hope that helps others.

Interestingly English subtitles continue to work, at least on my RPi3 with LE 9.2.6.
Reply
Thanks a lot, that solved the problem.
Will someone fix the broken addon? Or are the necessary people already noticed?
Reply
The problem with fixing the addon is that one of the libraries I used, parsedom, has not been migrated to Python 3. Several addon authors have asked for it to be made available, but I have not seen any statement on it. The addon could be updated to use an alternative HTML parser. In fact, long ago it did use BeautifulSoup, but I switched to parsedom for performance on ARM hardware (Raspberry Pi).

Ah, https://forum.kodi.tv/showthread.php?tid...t=parsedom seems to be the definitive statement on it. So it does require full conversion to an alternative parser. I guess I'll have a look into it.

For older versions of Kodi I could see if they are prepared to take a python2 compatible update, but I'd rather not spend time on that.
Reply
Hi,

as the workaround is no longer working with the KODI version on my raspberry pi,
I would kindly ask if there is any chance to fix the Ted Talks addon?

I would like to help if I can. Maybe I could if somebody would advice me what exactly is to do. 

Kind Regards

Chris
Reply
How to Patch Add-on for KODI 18.x LEIA and KODI 19.x MATRIX:

NOTE: This post has been superceded by the following posts:
 
Reply
Thank you very much for writing a patch for this!
I tried it on my pi4 with libreelec but the ted addon won't start anymore.
I can provide the log messages later.

btw. It seems you mixed up the filenames a bit in your post.
Regards
Chris
Reply
Unfortunately my mind reading powers are not powerful enough know which files you meant by "It seems you mixed up the filenames a bit in your post".

The three files with changes are:

.kodi/addons/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py - need to comment out subtitles

.kodi/addons/plugin.video.ted.talks/resources/lib/model/talk_scraper.py - need to overwrite file as described in earlier post

.kodi/addons/plugin.video.ted.talks/resources/lib/settings.py - Android users need to overwrite file as described in earlier post.
Reply
Thanks again.
I tried again you patch today and it works perfectly!
Last time i was reading on my mobile and the paths where cut.

Cheers
techie67
Reply
How to Patch Add-on for KODI 19.x MATRIX:

This set of patches enables subtitle support.

The following steps assume that you have the TED Talks video add-on version 5.0.0 for Kodi 19.x Matrix already installed.
 
  1. Create replacement files for the following:
     
    For example: open file link above, open a text editor, copy the file link contents, paste into text editor, save the file with above listed filename, and exit the text editor.

  2. Determine the location of the Kodi addons folder where plugin.video.ted.talks is installed on your Kodi computer.

    For example:
     
    • /storage/.kodi/addons/plugin.video.ted.talks/ for LibreELEC on Raspberry Pi.
    • /home/osmc/.kodi/addons/plugin.video.ted.talks/ for OSMC on Raspberry Pi.
    • ~/.kodi/addons/plugin.video.ted.talks/ for Kodi on Ubuntu where ~ is your home directory.

    Note that the location of the addons folder should be similar to the userdata folder.

  3. Copy the new file over top of the existing kodi file.

    For example on a Raspberry Pi with OSMC installed running Kodi 19.1 I used the following commands:

    scp -p subtitles_scraper.py talk_scraper.py [email protected]:/home/osmc/.kodi/addons/plugin.video.ted.talks/resources/lib/model/

    scp -p settings.py ted_talks_scraper.py [email protected]:/home/osmc/.kodi/addons/plugin.video.ted.talks/resources/lib/

    Note that you would need to substitute the IP address for your Raspberry Pi (see System -> System Info).

NOTE: Android users will need to configure a custom language code (like "en") in the add-on for subtitles to display.

If anyone is still using Kodi 18.x Leia then let me know if you need patches posted for this older Kodi version.
Reply
Thanks for your work @kodaksmith .
I am still on Kodi 18.9 (rPi3B+, Libreeelec 9.2.8.). Does the same approach to enable subtitles support works on 18.9 Leia?
And one additional question - is there some list of custom language codes (I need for Czech and not sure if it is "cs" or "cz"...).
Reply
(2022-04-27, 11:28)pivoj13 Wrote: Thanks for your work @kodaksmith .
I am still on Kodi 18.9 (rPi3B+, Libreeelec 9.2.8.). Does the same approach to enable subtitles support works on 18.9 Leia?
And one additional question - is there some list of custom language codes (I need for Czech and not sure if it is "cs" or "cz"...).

I am also using LE 9.2.x with Kodi 18.x on all my families RPi2/3/3B+ computers.

The same approach does work with 18.9 Leia. A comment in the settings.py source code indicates that the language codes are based on ISO639-1 language codes. For Czech I think the code is "cs".


How to Patch Add-on for KODI 18.x LEIA ONLY:

For Kodi 19.x Matrix see post #234.

This set of patches enables subtitle support.

The following steps assume that you have the TED Talks video add-on version 4.3.1 for Kodi 18.x Leia already installed.
 
  1. Create replacement files for the following:
     
    For example: open file link above, open a text editor, copy the file link contents, paste into text editor, save the file with above listed filename, and exit the text editor.

  2. Determine the location of the Kodi addons folder where plugin.video.ted.talks is installed on your Kodi computer.

    For example:
     
    • /storage/.kodi/addons/plugin.video.ted.talks/ for LibreELEC on Raspberry Pi.
    • /home/osmc/.kodi/addons/plugin.video.ted.talks/ for OSMC on Raspberry Pi.
    • ~/.kodi/addons/plugin.video.ted.talks/ for Kodi on Ubuntu where ~ is your home directory.

    Note that the location of the addons folder should be similar to the userdata folder.

  3. Copy the new file over top of the existing kodi file.

    For example on a Raspberry Pi with OSMC installed running Kodi 19.1 I used the following commands:

    scp -p subtitles_scraper.py talk_scraper.py [email protected]:/storage/.kodi/addons/plugin.video.ted.talks/resources/lib/model/

    scp -p settings.py ted_talks_scraper.py [email protected]:/storage/.kodi/addons/plugin.video.ted.talks/resources/lib/

    Note that you would need to substitute the IP address for your Raspberry Pi (see System -> System Info).

NOTE: Android users will need to configure a custom language code (like "en") in the add-on for subtitles to display.
Reply
@kodaksmith Great. The patch works on my 18.9 Leia (at least with "en" which is enough for me).

With "cs" I still have some issue - "cs" nor "cz" code in addon settings seemed not working, while "en" works (for english).
Strangely, when I left the code in addon settings empty I suddently got czech subtitles.
In each trial I only get one subtitles stream. Any possibility to scrap all available and select them in player?

Thank you.
Reply
(2022-04-28, 15:58)pivoj13 Wrote: Any possibility to scrap all available and select them in player?

If my understanding of video add-ons is correct, these pass the URL to play to Kodi and the Kodi player takes over from there. If that is the case then I think one would need to look into the Kodi source code for how to make your suggestion work.

I am content just to get this add-on working again.  Note that all my changes are freely available to anyone to use and modify.  Also feel free to investigate and make further improvements.  That is the spirit of Free Libre Open Source Software.
Reply
Surely it's not rocket surgery for these fixes to be applied to the released addon in the Kodi repoHuh
The fixes have been available on this forum for eight years so surely someone at Kodi HQ could have replaced four files in that time. Team Kodi did, after all, claim that when Matrix was released, they had also cleaned out the repo and got rid of dead or incompatible addons.

I realise that the addon developer should be responsible for maintaining their code but for whatever reason, this developer obviously isn't doing that.
I think maybe Kodi should have a policy of removing addons from the official repo if the developers abandon them. It could be something like a script that sends a monthly automated email to all the addon devs and if the dev doesn't respond within 14 days the script deletes their addon from the repo or maybe moves it to a secondary/archive repo for unverified addons.
Reply
WORKING RELEASE NOW AVAILABLE HERE:

To save people the trouble of manually editing the .py files, and for those who aren't confident to do that, I have forked the addon, applied the fixes and published it as a release (v5.0.1) on my GitHub page

CLICK HERE FOR DIRECT ZIP DOWNLOAD

Many thanks to Kodaksmith for posting the information on how to fix the files. I have, of course credited you in the release notes Smile
Reply
  • 1
  • 13
  • 14
  • 15
  • 16(current)
  • 17

Logout Mark Read Team Forum Stats Members Help
[RELEASE] TED Talks (Video) Plugin5