Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when switching profiles #6

Open
beneva52 opened this issue Aug 29, 2021 · 0 comments
Open

Error when switching profiles #6

beneva52 opened this issue Aug 29, 2021 · 0 comments

Comments

@beneva52
Copy link

beneva52 commented Aug 29, 2021

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant