nolenfelten / xbmc-addons

Automatically exported from code.google.com/p/xbmc-addons
0 stars 0 forks source link

OpenSubtitle path correction #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
trunk/scripts/OpenSubtitles/resources/lib/utilities.py
Line 15&16:

BASE_DATA_PATH = os.path.join( "T:/script_data", __scriptname__ )
BASE_SETTINGS_PATH = os.path.join( "P:/script_data", __scriptname__ )

to

BASE_DATA_PATH = os.path.join( "special://masterprofile/", "script_data",
__scriptname__ )
BASE_SETTINGS_PATH = os.path.join( "special://profile/", "script_data",
__scriptname__ )

Original issue reported on code.google.com by Ozgur.BASKIN@gmail.com on 8 Mar 2009 at 11:29

GoogleCodeExporter commented 9 years ago
Correction, T: should translate to xbmc.translatePath( "special://temp" ), see

http://xbmc.org/jmarshall/2009/02/10/changes-to-paths-what-it-means-for-scripts-
and-
plugins/

Original comment by dan.dar33@gmail.com on 26 Apr 2009 at 12:10

GoogleCodeExporter commented 9 years ago
yes sry you are right about temp dir. But "xbmc.translatePath" not working. 
Using
"os.path.join" enough.

Original comment by Ozgur.BASKIN@gmail.com on 27 Apr 2009 at 10:27

GoogleCodeExporter commented 9 years ago
BASE_DATA_PATH = os.path.join( "special://temp", "script_data", __scriptname__ )
BASE_SETTINGS_PATH = os.path.join( "special://profile", "script_data", 
__scriptname__ )

Original comment by Ozgur.BASKIN@gmail.com on 27 Apr 2009 at 10:31

GoogleCodeExporter commented 9 years ago
Dear all,

After changing the path's I still get the following errors (in the 19778 
Windows 
Built of XBMC):

23:43:52 T:224 M:2288435200  NOTICE: _create_base_paths()
23:43:52 T:224 M:2288435200  NOTICE:   File "C:\Program Files\XBMC\scripts
\OpenSubtitles\resources\lib\utilities.py", line 32, in _create_base_paths
23:43:52 T:224 M:2288435200  NOTICE: 
23:43:52 T:224 M:2288435200  NOTICE: os.makedirs( BASE_DATA_PATH )
23:43:52 T:224 M:2288435200  NOTICE:   File "special:\\xbmc\system\python
\python24.zlib\os.py", line 156, in makedirs
23:43:52 T:224 M:2288435200  NOTICE:   File "special:\\xbmc\system\python
\python24.zlib\os.py", line 156, in makedirs
23:43:52 T:224 M:2288435200  NOTICE:   File "special:\\xbmc\system\python
\python24.zlib\os.py", line 156, in makedirs
23:43:52 T:224 M:2288435200  NOTICE:   File "special:\\xbmc\system\python
\python24.zlib\os.py", line 159, in makedirs
23:43:52 T:224 M:2288435200  NOTICE: OSError
23:43:52 T:224 M:2288435200  NOTICE: :
23:43:52 T:224 M:2288435200  NOTICE: [Errno 0] Error: 'special:'
23:43:52 T:224 M:2288435200  NOTICE: 
23:43:52 T:224 M:2288435200   ERROR: Scriptresult: Error

I have added the xbmc.translatePath and it works ok:

BASE_DATA_PATH = xbmc.translatePath( os.path.join( "special://temp", 
"script_data", 
__scriptname__ ) )
BASE_SETTINGS_PATH = xbmc.translatePath( os.path.join( "special://profile", 
"script_data", __scriptname__ ) )

I am no coder, so not sure what would be the permanent fix, as the 
xbmc.translatePath
() might disappear...

Regards,

Nika.

Original comment by nikagl@gmail.com on 28 Apr 2009 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by billdaly111@gmail.com on 3 Jun 2009 at 11:57

GoogleCodeExporter commented 9 years ago
This in not fixed. Reopen pls.

Original comment by Ozgur.BASKIN@gmail.com on 4 Jun 2009 at 12:12

GoogleCodeExporter commented 9 years ago

Original comment by rwparris2 on 4 Jun 2009 at 5:06

GoogleCodeExporter commented 9 years ago
rwparris can you handle this.

Original comment by nuka1195@gmail.com on 11 Jun 2009 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by rwparris2 on 1 Nov 2009 at 11:28

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1390.

Original comment by rwparris2 on 1 Nov 2009 at 11:28