mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2025-01-04 20:16:26 +00:00
No longer using os.path.getcwd to lookup addon path
This commit is contained in:
parent
e40529ca65
commit
c5b3cb47fe
2 changed files with 7 additions and 8 deletions
12
default.py
12
default.py
|
@ -2,9 +2,10 @@
|
|||
# Copyright (c) 2010 Correl J. Roush
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import xbmcaddon
|
||||
|
||||
__scriptname__ = "Transmission-XBMC"
|
||||
__author__ = "Correl Roush <correl@gmail.com>"
|
||||
__url__ = "http://github.com/correl/Transmission-XBMC"
|
||||
|
@ -13,18 +14,17 @@ __credits__ = ""
|
|||
__version__ = "0.5.2"
|
||||
__XBMC_Revision__ = "30377"
|
||||
|
||||
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( os.getcwd(), 'resources', 'lib' ) )
|
||||
sys.path.append (BASE_RESOURCE_PATH)
|
||||
|
||||
__settings__ = xbmcaddon.Addon(id='script.transmission')
|
||||
|
||||
__language__ = __settings__.getLocalizedString
|
||||
|
||||
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __settings__.getAddonInfo('path'), 'resources', 'lib' ) )
|
||||
sys.path.append (BASE_RESOURCE_PATH)
|
||||
|
||||
KEY_BUTTON_BACK = 275
|
||||
KEY_KEYBOARD_ESC = 61467
|
||||
|
||||
if __name__ == '__main__':
|
||||
from gui import TransmissionGUI
|
||||
w = TransmissionGUI("script-Transmission-main.xml",os.getcwd() ,"Default")
|
||||
w = TransmissionGUI("script-Transmission-main.xml", __settings__.getAddonInfo('path') , "Default")
|
||||
w.doModal()
|
||||
del w
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2010 Correl J. Roush
|
||||
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import urllib2
|
||||
|
@ -184,7 +183,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
if (controlID == 120):
|
||||
# A torrent was chosen, show details
|
||||
item = list.getSelectedItem()
|
||||
w = TorrentInfoGUI("script-Transmission-details.xml",os.getcwd() ,"Default")
|
||||
w = TorrentInfoGUI("script-Transmission-details.xml", __settings__.getAddonInfo('path') ,"Default")
|
||||
w.setTorrent(self.transmission, int(item.getProperty('TorrentID')))
|
||||
w.doModal()
|
||||
del w
|
||||
|
|
Loading…
Reference in a new issue