Skip to content

Commit

Permalink
use getAddonInfo('profile') for temporary subtitle location
Browse files Browse the repository at this point in the history
  • Loading branch information
amet committed Feb 1, 2011
1 parent b3e2f91 commit dd64747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions script.xbmc.subtitles/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
__language__ = __settings__.getLocalizedString
__version__ = __settings__.getAddonInfo('version')
__cwd__ = __settings__.getAddonInfo('path')
__profile__ = __settings__.getAddonInfo('profile')
__scriptname__ = "XBMC Subtitles"
__scriptid__ = "script.xbmc.subtitles"
__author__ = "Amet,mr_blobby"
Expand Down
10 changes: 6 additions & 4 deletions script.xbmc.subtitles/resources/lib/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
import shutil
import socket

_ = sys.modules[ "__main__" ].__language__
_ = sys.modules[ "__main__" ].__language__
__scriptname__ = sys.modules[ "__main__" ].__scriptname__
__settings__ = sys.modules[ "__main__" ].__settings__
__cwd__ = sys.modules[ "__main__" ].__cwd__
__settings__ = sys.modules[ "__main__" ].__settings__
__cwd__ = sys.modules[ "__main__" ].__cwd__
__profile__ = sys.modules[ "__main__" ].__profile__


STATUS_LABEL = 100
LOADING_IMAGE = 110
Expand Down Expand Up @@ -115,7 +117,7 @@ def set_allparam(self):
else:
self.file_name = "%s (%s)" % (self.title.encode('utf-8'), str(self.year),)

self.tmp_sub_dir = os.path.join( xbmc.translatePath( "special://profile/" ), "addon_data", os.path.basename( __cwd__ ),"sub_tmp" )
self.tmp_sub_dir = os.path.join( __profile__ ,"sub_tmp" )

if not self.tmp_sub_dir.endswith(':') and not os.path.exists(self.tmp_sub_dir):
os.makedirs(self.tmp_sub_dir)
Expand Down

0 comments on commit dd64747

Please sign in to comment.