The branch, eden-pre has been updated
via 5810c8aca935d21aacac17c927ab8b39a6d61d30 (commit)
from 7a834abf5507630c1a753364d06358af44fce595 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=5810c8aca935d21aacac17c927ab8b39a6d61d30
commit 5810c8aca935d21aacac17c927ab8b39a6d61d30
Author: amet <[email protected]>
Date: Wed Apr 27 11:55:47 2011 +0400
[script.xbmc.subtitles] -v 2.9.3
- fixed: LegendasDivx.com, string.split now uses os.sep for better results
- fixes: Service LegendasDivx.com v0.2.2
- fixed: "Add Language To Filename" was ignored in some cases
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 4a0becb..f7719c7 100644
--- a/script.xbmc.subtitles/addon.xml
+++ b/script.xbmc.subtitles/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmc.subtitles"
name="XBMC Subtitles"
- version="2.9.2"
+ version="2.9.3"
provider-name="Amet, mr_blobby">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/script.xbmc.subtitles/changelog.txt
b/script.xbmc.subtitles/changelog.txt
index a2e82e5..cc46d7b 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,5 +1,11 @@
+2.9.3
+- fixed: LegendasDivx.com, string.split now uses os.sep for better results
+- fixes: Service LegendasDivx.com v0.2.2
+- fixed: "Add Language To Filename" was ignored in some cases
+
2.9.2
- fixed: revert xbmc.python to 2.0 that was commited by mistake
+
2.9.1
- fixed: use xml.etree.ElementTree in Bierdopje
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 2c1b919..85cf594 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -383,8 +383,11 @@ class GUI( xbmcgui.WindowXMLDialog ):
###-------------------------- Create name -------------################
- def create_name(self,zip_entry,sub_filename,subtitle_lang):
- file_name = "%s.%s%s" % ( os.path.splitext( sub_filename )[0],
subtitle_lang, os.path.splitext( zip_entry )[1] )
+ def create_name(self,zip_entry,sub_filename,subtitle_lang):
+ if (__settings__.getSetting( "lang_to_end" ) == "true"):
+ file_name = "%s.%s%s" % ( os.path.splitext( sub_filename )[0],
subtitle_lang, os.path.splitext( zip_entry )[1] )
+ else:
+ file_name = "%s%s" % ( os.path.splitext( sub_filename )[0],
os.path.splitext( zip_entry )[1] )
return os.path.join(self.tmp_sub_dir, zip_entry),
os.path.join(self.sub_folder, file_name)
###-------------------------- Copy files -------------################
diff --git
a/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
b/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
index 6425407..be7702c 100644
--- a/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/LegendasDivx/service.py
@@ -8,6 +8,9 @@
# http://www.teknorage.com
# License: GPL v2
#
+# NEW on Service LegendasDivx.com v0.2.2:
+# Fixed pathnames using (os.sep). For sure :)
+#
# NEW on Service LegendasDivx.com v0.2.1:
# Fixed bug when the file is played from a root path, no parent dir
search\sync when that happens.
# Fixed pathnames to work with all OS (Win, Unix, etc).
@@ -130,9 +133,17 @@ def getallsubs(searchstring, languageshort, languagelong,
file_original_path, su
#Find filename on the comentaries to show sync label
using filename or dirname (making it global for further usage)
global filesearch
filesearch = os.path.abspath(file_original_path)
+ #For DEBUG only uncomment next line
+ #log( __name__ ,"%s abspath: '%s'" % (debug_pretext,
filesearch))
filesearch = os.path.split(filesearch)
- dirsearch = string.split(filesearch[0], '\\')
+ #For DEBUG only uncomment next line
+ #log( __name__ ,"%s path.split: '%s'" % (debug_pretext,
filesearch))
+ dirsearch = filesearch[0].split(os.sep)
+ #For DEBUG only uncomment next line
+ #log( __name__ ,"%s dirsearch: '%s'" % (debug_pretext,
dirsearch))
dirsearch_check = string.split(dirsearch[-1], '.')
+ #For DEBUG only uncomment next line
+ #log( __name__ ,"%s dirsearch_check: '%s'" %
(debug_pretext, dirsearch_check))
if (searchstring_notclean != ""):
sync = False
if re.search(searchstring_notclean, desc):
@@ -193,7 +204,7 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
global israr
israr = os.path.abspath(file_original_path)
israr = os.path.split(israr)
- israr = string.split(israr[0], '\\')
+ israr = israr[0].split(os.sep)
israr = string.split(israr[-1], '.')
israr = string.lower(israr[-1])
@@ -202,7 +213,7 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
if 'cd1' in string.lower(title) or 'cd2' in
string.lower(title) or 'cd3' in string.lower(title):
dirsearch = os.path.abspath(file_original_path)
dirsearch = os.path.split(dirsearch)
- dirsearch = string.split(dirsearch[0], '\\')
+ dirsearch = dirsearch[0].split(os.sep)
if len(dirsearch) > 1:
searchstring_notclean = dirsearch[-3]
searchstring =
xbmc.getCleanMovieTitle(dirsearch[-3])
@@ -214,7 +225,7 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
elif 'cd1' in string.lower(title) or 'cd2' in
string.lower(title) or 'cd3' in string.lower(title):
dirsearch = os.path.abspath(file_original_path)
dirsearch = os.path.split(dirsearch)
- dirsearch = string.split(dirsearch[0], '\\')
+ dirsearch = dirsearch[0].split(os.sep)
if len(dirsearch) > 1:
searchstring_notclean = dirsearch[-2]
searchstring =
xbmc.getCleanMovieTitle(dirsearch[-2])
@@ -344,12 +355,12 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
searchsubscount = len(searchsubs)
for filesub in searchsubs:
nopath = string.split(filesub,
tmp_sub_dir)[-1]
- justfile = string.split(nopath,
'\\')[-1]
+ justfile = nopath.split(os.sep)[-1]
#For DEBUG only uncomment next line
#log( __name__ ,"%s DEBUG-nopath: '%s'"
% (debug_pretext, nopath))
#log( __name__ ,"%s DEBUG-justfile:
'%s'" % (debug_pretext, justfile))
releasefilename =
filesearch[1][:len(filesearch[1])-4]
- releasedirname =
string.split(filesearch[0], '\\')
+ releasedirname =
filesearch[0].split(os.sep)
if 'rar' in israr:
releasedirname =
releasedirname[-2]
else:
-----------------------------------------------------------------------
Summary of changes:
script.xbmc.subtitles/addon.xml | 2 +-
script.xbmc.subtitles/changelog.txt | 6 +++++
script.xbmc.subtitles/resources/lib/gui.py | 7 ++++-
.../resources/lib/services/LegendasDivx/service.py | 23 ++++++++++++++-----
4 files changed, 29 insertions(+), 9 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons