From 78ac6396872740e173d2b149a5d7a87feedf51de Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 2 Jan 2015 22:53:59 -0300 Subject: [PATCH 1/2] - Fixed temp path definition to allow rmtree empty the 'temp' folder --- service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service.py b/service.py index d007b24..b6a1b49 100644 --- a/service.py +++ b/service.py @@ -24,7 +24,7 @@ __cwd__ = xbmc.translatePath(__addon__.getAddonInfo('path')).decode("utf-8") __profile__ = xbmc.translatePath(__addon__.getAddonInfo('profile')).decode("utf-8") __resource__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib')).decode("utf-8") -__temp__ = xbmc.translatePath(os.path.join(__profile__, 'temp')).decode("utf-8") +__temp__ = xbmc.translatePath(os.path.join(__profile__,'temp','')).decode("utf-8") sys.path.append(__resource__) @@ -193,6 +193,7 @@ def search(item): def download(id, url, filename, search_string=""): subtitle_list = [] exts = [".srt", ".sub", ".txt", ".smi", ".ssa", ".ass"] + ## Cleanup temp dir, we recomend you download/unzip your subs in temp folder and ## pass that to XBMC to copy and activate if xbmcvfs.exists(__temp__): From 17300292a866c56b8aec4ba1cd662fe60925a1f7 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 4 Jan 2015 02:40:12 -0300 Subject: [PATCH 2/2] - Replane null string fix with os.path.sep for compatibility across different OS platform --- service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service.py b/service.py index b6a1b49..8b2d1e9 100644 --- a/service.py +++ b/service.py @@ -24,7 +24,8 @@ __cwd__ = xbmc.translatePath(__addon__.getAddonInfo('path')).decode("utf-8") __profile__ = xbmc.translatePath(__addon__.getAddonInfo('profile')).decode("utf-8") __resource__ = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib')).decode("utf-8") -__temp__ = xbmc.translatePath(os.path.join(__profile__,'temp','')).decode("utf-8") +__temp__ = xbmc.translatePath(os.path.join(__profile__,'temp')).decode("utf-8") +__temp__ = __temp__ + os.path.sep sys.path.append(__resource__)