Bug Kodi does`nt delete the temp folder
#1
Hi,

many of the subtitles ad-dons that i built clearing the temp folder before downloading the new ones,
Those are the line of code:

PHP Code:
if xbmcvfs.exists(__temp__):
shutil.rmtree(__temp__)
xbmcvfs.mkdirs(__temp__

From some reason, in Kodi versions those lines that should delete the temp folder not delete it, and as a result Kodi loads the wrong subtitles.
The same bug appears in subscene addon, subscenter.org, subtitle.co.il, napiprojekt and more...
http://forum.kodi.tv/showthread.php?tid=...pid1823049

Some one know how to result it?
Reply
#2
Anything obvious in the debug log?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Just a question but why use shutil for one call and then xbmcvfs for the other. Why not use xbmcvfs.rmdir() and see if you get a different result?
Reply
#4
I tried to remove the folder with xbmcvfs.rmdir(), its not did the job also.

There is no something special in the debug log.

In 13.2, the same lines work perfectly.
Reply
#5
please pastebin the entire debug log. it contains extra information that make it easier for the developers to reproduce and fix issues.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Found the bug, it actually was at that line:
Code:
xbmcvfs.exists(__temp__):

From some reason in Kodi version the xbmcvfs.exists requires the last slash at the folders path string, so just added it the the __temp__ parameter, and that resolved the issue.
Reply
#7
https://github.com/amet/service.subtitle...05abdb5763
Reply
#8
Confirmed that the solution from tnuc's post seems to help the problem. I still get some weird errors about not finding correct subtitle in pack when i go to a second video and try to get a sub (after manually clearing the temp folder and such), but it actually does seem to load multiple subs now
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi does`nt delete the temp folder0