[python] update xbmc.translatePath() to xbmcvfs

xbmc.translatePath is deprecated and might be removed in future kodi versions. 
Please use xbmcvfs.translatePath instead.
The reference if from: xbmc/xbmc#17735
This commit is contained in:
heitbaum 2020-10-18 16:42:35 +11:00 committed by GitHub
parent ec1292ba3f
commit ccc5b096d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,14 +3,14 @@
import urllib, os, zipfile
from urllib2 import URLError
import xbmc, xbmcgui, xbmcaddon
import xbmc, xbmcvfs, xbmcgui, xbmcaddon
import shutil
import sys
url = 'https://github.com/tvheadend/dtv-scan-tables/archive/tvheadend.zip'
temp = xbmc.translatePath('special://temp')
temp = xbmcvfs.translatePath('special://temp')
temp_folder = os.path.join(temp, 'dtv-scan-tables-tvheadend')
dest_folder = os.path.join(xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'dvb-scan')
dest_folder = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo('path')), 'dvb-scan')
archive = os.path.join(temp, 'dtv_scantables.zip')
ADDON_NAME = xbmcaddon.Addon().getAddonInfo('name')