Skip to content

Commit

Permalink
Merge pull request #2 from martinrevert/master
Browse files Browse the repository at this point in the history
- Fixed temp path definition to allow rmtree empty the 'temp' folder
  • Loading branch information
estemendoza committed Jan 10, 2015
2 parents 052f6ba + 1730029 commit 190ce19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service.py
Expand Up @@ -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__)

Expand Down Expand Up @@ -193,6 +194,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__):
Expand Down

0 comments on commit 190ce19

Please sign in to comment.