I've posted a message on the forum.Kodi.tv thread, but here are the details: I was receiving "no subtitles found" every time with the LegendasDivX add-on, so I did a bit debugging and found a couple of things that solved it (in service.py):
Line 365: the query string was being sent with "", which was not accepted. I just removed it as follows:
changed
searchstring = '"' + title + ' ' + year + '"'
to
searchstring = title + ' ' + year
Line 248: after that change, I also got an error with the string decode method, so I updated as follows:
changed
if str.lower(searchstring_notclean) in str.lower(desc.decode('utf8', 'ignore')): sync = True
to
if str.lower(searchstring_notclean) in str.lower(desc): sync = True
I also copy below a log extract with other details on the service log messages...
After these changes, the service retrieved subs successfully. Note that this is just was just a quick and dirty fix to check if it worked, and only for a library movie, but it may be that other places in the code might need updating as well... but this, you would know much better than me!
Thanks
----------------------------------------------------------------------------------------------------------
Código: Selecionar todos
2021-05-04 22:17:51.359 T:4900 DEBUG <general>: XFILE::CPluginDirectory::StartScript - calling plugin LegendasDivx.com('plugin://service.subtitles.legendasdivx/','1','?action=search&languages=Portuguese&preferredlanguage=Portuguese','resume:false')
2021-05-04 22:17:51.364 T:10396 DEBUG <general>: Thread LanguageInvoker start, auto delete: false
2021-05-04 22:17:51.364 T:10396 INFO <general>: initializing python engine.
2021-05-04 22:17:51.365 T:10396 DEBUG <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): start processing
2021-05-04 22:17:51.458 T:4100 DEBUG <general>: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Player.OnPause - data: {"item":{"id":215,"type":"movie"},"player":{"playerid":1,"speed":0}}
2021-05-04 22:17:51.526 T:10396 DEBUG <general>: -->Python Interpreter Initialized<--
2021-05-04 22:17:51.526 T:10396 DEBUG <general>:
2021-05-04 22:17:51.526 T:10396 DEBUG <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): the source file to load is "C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py"
2021-05-04 22:17:51.526 T:10396 DEBUG <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): setting the Python path to C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx;C:\Program Files (x86)\Kodi\system\python\Lib;C:\Program Files (x86)\Kodi\python3.8.zip;C:\Program Files (x86)\Kodi\system\python\DLLs;C:\Program Files (x86)\Kodi;C:\Program Files (x86)\Kodi\system\python;C:\Program Files (x86)\Kodi\system\python\lib\site-packages
2021-05-04 22:17:51.526 T:10396 DEBUG <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): entering source directory C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx
2021-05-04 22:17:51.544 T:10396 DEBUG <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): instantiating addon using automatically obtained id of "service.subtitles.legendasdivx" dependent on version 3.0.0 of the xbmc.python api
2021-05-04 22:17:52.031 T:10224 DEBUG <general>: CPtsTracker: pattern lost on diff 0.000000, number of losses 1
2021-05-04 22:17:52.507 T:10396 WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2021-05-04 22:17:52.515 T:10396 DEBUG <general>: Skipped 3 duplicate messages..
2021-05-04 22:17:52.515 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: dirsearch string _parentfolder is 0 = ['F:', 'FILMES', 'Jodorowskys.Dune.2013.720p.BluRay.x264.YIFY.mp4']
2021-05-04 22:17:52.518 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: filename string _parentfolder is 2 = Jodorowskys.Dune.2013.720p.BluRay.x264.YIFY
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - Search: FILENAME = Jodorowskys Dune 2013
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - Search: Tvshow string =
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - Search: Title string = Jodorowsky's Dune
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - Search: Title MOVIE LIBRARY String = "Jodorowsky's Dune 2013"
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: Search String = '"Jodorowsky's Dune 2013"'
2021-05-04 22:17:52.519 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: Search String Not Clean = 'Jodorowskys.Dune.2013.720p.BluRay.x264.YIFY'
2021-05-04 22:17:52.523 T:10396 DEBUG <general>: ### [LegendasDivx.com] - POST url page: 1
2021-05-04 22:17:52.523 T:10396 DEBUG <general>: ### [LegendasDivx.com] - POST url data: b'query=%22Jodorowsky%27s+Dune+2013%22&form_cat=28'
2021-05-04 22:17:52.942 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: LanguageShort = 'pt'
2021-05-04 22:17:52.947 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: Search String = '"Jodorowsky's Dune 2013"'
2021-05-04 22:17:52.947 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: Search String Not Clean = 'Jodorowskys.Dune.2013.720p.BluRay.x264.YIFY'
2021-05-04 22:17:52.949 T:10396 DEBUG <general>: ### [LegendasDivx.com] - POST url page: 1
2021-05-04 22:17:52.949 T:10396 DEBUG <general>: ### [LegendasDivx.com] - POST url data: b'query=%22Jodorowsky%27s+Dune+2013%22&form_cat=29'
2021-05-04 22:17:53.360 T:10396 DEBUG <general>: ### [LegendasDivx.com] - getallsubs: LanguageShort = 'pb'
2021-05-04 22:17:53.361 T:10396 INFO <general>: CPythonInvoker(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py): script successfully run
2021-05-04 22:17:53.361 T:10396 DEBUG <general>: CPythonInvoker::onExecutionDone(15, C:\Users\XXXXX\AppData\Roaming\Kodi\addons\service.subtitles.legendasdivx\default.py)
2021-05-04 22:17:53.742 T:10396 INFO <general>: Python interpreter stopped
2021-05-04 22:17:53.742 T:10396 DEBUG <general>: Thread LanguageInvoker 10396 terminating
2021-05-04 22:18:02.813 T:9300 DEBUG <general>: Keyboard: scancode: 0x0e, sym: 0x8, unicode: 0x0008, modifier: 0x0
2021-05-04 22:18:02.814 T:9300 DEBUG <general>: CInputManager::HandleKey: backspace (0xf008) pressed, action is ParentDir
----------------------------------------------------------------------------------------------------------