-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hello there, my Kodi 19.1 is organised with two profiles: one with only 3D movies and the other with only 2D movies.
Each profile uses its own folders, not sharing anything with the other one, so I had installed and enabled your addon for each of them.
But, there is an issue after installing the addon for one profile: it won't work anymore for the other one.
To make it work, I have to uninstall the addon and reinstall it in the current profile.
But the problem reappears when I log in with an other profile.
I have digged in and found the problem issued when using "xbmcvfs.listdir('archive://%s' % (urlpath))" in the "Download" function.
When I replace "archive://" by "zip://" or "rar://" depending on the file name, it works but crashes later on at "xbmcvfs.copy(src, dest)" with the same error.
Same error, same fix: replacing "archive" by the correct file extention in "src" makes the process finishes with no issue.
If you are interested, here is my fix:
# Extract subtitle.
tmp_ext=os.path.splitext(tmp_file)[1].lower().replace('.','')
if tmp_ext in ["rar", "zip"]:
urlpath = urllib.parse.quote_plus(tmp_file)
_, files = xbmcvfs.listdir('%s://%s' % (tmp_ext,urlpath))
for f in files:
src = tmp_ext + '://' + urlpath + '/' + f
dest = os.path.join(TEMP, f)
xbmcvfs.copy(src, dest)