Hello,
From what i've understood from various threads, it seems xbmc.extract does not work anymore for .rar in Kodi 18. Instead, we have to use external libraries (my addon -> Virtual Filesystems) vfs.rar (with rar://) or vfs.libarchive (archive://)
ERROR: GetDirectory - Error getting archive://%2fstorage%2f.kodi%2fuserdata%2faddon_data%2fservice.subtitles.zimuku%2ftemp%2fsubtitles.rar/
But the rar file exists and the path is correct !
the script finds the .rar and xbmcvfs.listdir finds the subtitle inside it, but xbmcvfs.copy does not "extract" the subtitle file. Instead i got below error:
ERROR: AddOnLog: RAR archive support: filerar::open failed to open file in cache: special://temp/rarfolderWKscUK/subtitle_file.ass
When I look in the folder mentioned: "/storage/.kodi/temp/rarfolderWKscUK/", it is actually empty.
One more thing I do not understand is why it is using a temp folder, while I specified a "dest" folder ?!?
So basically non of vfs.rar or vfs.libarchive seem to work so far for me in Kodi 18 :/
is anyone else having issues to extract subtitles from a RAR archive with Kodi 18 ?
(i'm using CoreElec 8.99.2)
Thank you
From what i've understood from various threads, it seems xbmc.extract does not work anymore for .rar in Kodi 18. Instead, we have to use external libraries (my addon -> Virtual Filesystems) vfs.rar (with rar://) or vfs.libarchive (archive://)
- When I enable vfs.libarchive (and disable vfs.rar) and use below code:
__temp__ = '/storage/.kodi/userdata/addon_data/service.subtitles.zimuku/temp'
tempfile = '/storage/.kodi/userdata/addon_data/service.subtitles.zimuku/temp/subtitles.rar'
path = urllib.quote_plus(tempfile)
(dirs, files) = xbmcvfs.listdir('archive://%s' % (path))
for file in files:
src = 'archive://' + path + '/' + file
dest = os.path.join(__temp__, file)
xbmcvfs.copy(src, dest)
i got the following error:ERROR: GetDirectory - Error getting archive://%2fstorage%2f.kodi%2fuserdata%2faddon_data%2fservice.subtitles.zimuku%2ftemp%2fsubtitles.rar/
But the rar file exists and the path is correct !
- Now, when I enable vfs.rar (and disable vfs.libarchive) and use below code:
__temp__ = '/storage/.kodi/userdata/addon_data/service.subtitles.zimuku/temp'
tempfile = '/storage/.kodi/userdata/addon_data/service.subtitles.zimuku/temp/subtitles.rar'
path = urllib.quote_plus(tempfile)
(dirs, files) = xbmcvfs.listdir('rar://%s' % (path))
for file in files:
src = 'rar://' + path + '/' + file
dest = os.path.join(__temp__, file)
xbmcvfs.copy(src, dest)
the script finds the .rar and xbmcvfs.listdir finds the subtitle inside it, but xbmcvfs.copy does not "extract" the subtitle file. Instead i got below error:
ERROR: AddOnLog: RAR archive support: filerar::open failed to open file in cache: special://temp/rarfolderWKscUK/subtitle_file.ass
When I look in the folder mentioned: "/storage/.kodi/temp/rarfolderWKscUK/", it is actually empty.
One more thing I do not understand is why it is using a temp folder, while I specified a "dest" folder ?!?
So basically non of vfs.rar or vfs.libarchive seem to work so far for me in Kodi 18 :/
is anyone else having issues to extract subtitles from a RAR archive with Kodi 18 ?
(i'm using CoreElec 8.99.2)
Thank you