The branch, eden has been updated
via 7ce360f3620b36f885c69730bfdece9d34000ff8 (commit)
via 856ca683de90575e765e16dfb541047831c3dc8c (commit)
from 8bfe1c285ee737eeb6b0d1b8fca134d3794e724d (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=7ce360f3620b36f885c69730bfdece9d34000ff8
commit 7ce360f3620b36f885c69730bfdece9d34000ff8
Author: amet <[email protected]>
Date: Tue May 22 13:09:15 2012 +0400
[service.libraryautoupdate] -v 0.6.2
- needed a catch in case the last_run.txt file is blank, or has non-integer
data. thanks to mmounirou for catching this
diff --git a/service.libraryautoupdate/addon.xml
b/service.libraryautoupdate/addon.xml
index 5a2f9cc..d5ec786 100644
--- a/service.libraryautoupdate/addon.xml
+++ b/service.libraryautoupdate/addon.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.libraryautoupdate"
- name="XBMC Library Auto Update" version="0.6.1" provider-name="robweber">
+ name="XBMC Library Auto Update" version="0.6.2" provider-name="robweber">
<requires>
<import addon="xbmc.python" version="2.0"/>
</requires>
diff --git a/service.libraryautoupdate/changelog.txt
b/service.libraryautoupdate/changelog.txt
index 2b720aa..a49eb4d 100644
--- a/service.libraryautoupdate/changelog.txt
+++ b/service.libraryautoupdate/changelog.txt
@@ -70,4 +70,12 @@
[B]Version 0.6.0[/B]
-- added "Cleaning" category to schedule a clean operation of the music/video
databases. This operation can happen immediately after a scan or once per
day/week/month. Verifying source paths before a clean is also supported
\ No newline at end of file
+- added "Cleaning" category to schedule a clean operation of the music/video
databases. This operation can happen immediately after a scan or once per
day/week/month. Verifying source paths before a clean is also supported
+
+[B]Version 0.6.1[/B]
+
+- added 2 more custom library path options
+
+[B]Version 0.6.2[/B]
+
+- needed a catch in case the last_run.txt file is blank, or has non-integer
data. thanks to mmounirou for catching this
diff --git a/service.libraryautoupdate/service.py
b/service.libraryautoupdate/service.py
index 4732dc5..79b011a 100644
--- a/service.libraryautoupdate/service.py
+++ b/service.libraryautoupdate/service.py
@@ -313,10 +313,13 @@ class AutoUpdater:
def readLastRun(self):
try:
+ self.last_run = 0
f = open(unicode(xbmc.translatePath(self.datadir +
"last_run.txt"),'utf-8'),"r")
- self.last_run = float(f.read())
+ strlastRun = f.read()
+ if len(strlastRun) != 0 :
+ self.last_run = float(strlastRun)
f.close()
- except IOError:
+ except:
#the file doesn't exist, most likely first time running
self.last_run = 0
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=856ca683de90575e765e16dfb541047831c3dc8c
commit 856ca683de90575e765e16dfb541047831c3dc8c
Author: amet <[email protected]>
Date: Tue May 22 13:07:57 2012 +0400
[script.xbmc.subtitles] -v 3.2.0
- added service Subtitulos.es, thx quillo86
- Fixed Sratim service (url changed), thx BBLN
- Fixed Subscenter service (key field), thx BBLN
- hearing impaired flag for Subscene. thx MartinWallgren
- fix Subdivx .decode("utf-8")
- Portugues Brasileiro strings.xml, thx Wanilton
- fix: Betaseries utf-8
- general cleanups and fixes
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 6c236e7..4de47bf 100755
--- 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="3.1.0"
+ version="3.2.0"
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 f6f9472..d76cbd6 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,13 @@
+3.2.0
+- added service Subtitulos.es, thx quillo86
+- Fixed Sratim service (url changed), thx BBLN
+- Fixed Subscenter service (key field), thx BBLN
+- hearing impaired flag for Subscene. thx MartinWallgren
+- fix Subdivx .decode("utf-8")
+- Portugues Brasileiro strings.xml, thx Wanilton
+- fix: Betaseries utf-8
+- general cleanups and fixes
+
3.1.0
- Fixed 'Ondertitel.com' after site redesign and sync detection added,
mr-blobby
- hearing_imp in hash search in podnapisi
diff --git a/script.xbmc.subtitles/default.py b/script.xbmc.subtitles/default.py
index a92fe11..25c55b3 100644
--- a/script.xbmc.subtitles/default.py
+++ b/script.xbmc.subtitles/default.py
@@ -5,31 +5,27 @@ import sys
import xbmc
import xbmcaddon
-__author__ = "amet,mr_blobby"
-__scriptid__ = "script.xbmc.subtitles"
-__scriptname__ = "XBMC Subtitles"
-
-__addon__ = xbmcaddon.Addon(id='script.xbmc.subtitles')
-
-__cwd__ = xbmc.translatePath( __addon__.getAddonInfo('path')
).decode("utf-8")
+__addon__ = xbmcaddon.Addon()
+__author__ = __addon__.getAddonInfo('author')
+__scriptid__ = __addon__.getAddonInfo('id')
+__scriptname__ = __addon__.getAddonInfo('name')
+__cwd__ = __addon__.getAddonInfo('path')
__version__ = __addon__.getAddonInfo('version')
__language__ = __addon__.getLocalizedString
+__cwd__ = xbmc.translatePath( __addon__.getAddonInfo('path')
).decode("utf-8")
__profile__ = xbmc.translatePath( __addon__.getAddonInfo('profile')
).decode("utf-8")
-__resource__ = os.path.join( __cwd__, 'resources', 'lib' )
+__resource__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib'
) )
sys.path.append (__resource__)
import gui
from utilities import log, pause, unpause, UserNotificationNotifier
-log( __name__ ,"Version: %s" % __version__)
-
if ( __name__ == "__main__" ):
__unpause__ = False
ui = gui.GUI( "script-XBMC-Subtitles-main.xml" , __cwd__ , "Default")
- movieFullPath = ui.set_allparam()
- if (__addon__.getSetting( "auto_download" ) == "true") and
(__addon__.getSetting( "auto_download_file" ) != os.path.basename(
movieFullPath )):
+ if (ui.set_allparam()):
notification = UserNotificationNotifier(__scriptname__, __language__(764),
2000)
if not ui.Search_Subtitles(False):
__unpause__ = pause()
diff --git a/script.xbmc.subtitles/resources/language/Portuguese
(Brazil)/strings.xml b/script.xbmc.subtitles/resources/language/Portuguese
(Brazil)/strings.xml
index 4b2ca61..f7f3c70 100644
--- a/script.xbmc.subtitles/resources/language/Portuguese (Brazil)/strings.xml
+++ b/script.xbmc.subtitles/resources/language/Portuguese (Brazil)/strings.xml
@@ -25,6 +25,13 @@
<string id="755">O servidor está sobrecarregado, por favor tente mais
tarde</string>
<string id="756">O login falhou. Verifique seus dados nas Configurações
do addon</string>
<string id="760">Serviços DisponÃveis</string>
+ <string id="761">Você deve estar logado para efetuar download destas
legendas,[CR]verifique seus ajustes de configuração do addon</string>
+ <string id="762">Ajustes do Addon</string>
+ <string id="763">Auto downloading primeira legenda 'sincronizada'</string>
+ <string id="764">Downloading primeira leg 'sinc'</string>
+ <string id="765">Primeira legenda 'sinc' baixada</string>
+ <string id="766">Escolha Pasta Legenda</string>
+
<!-- Script Settings -->
@@ -52,8 +59,8 @@
<string id="30127">- Itasa Senha</string>
<string id="30128">- Titulky Nome do Usuário</string>
<string id="30129">- Titulky Senha</string>
- <string id="30130">Search next available service if no results are
found</string>
- <string id="30131">Auto download first "sync" subtitle</string>
+ <string id="30130">Procurar Próximo Serviço DisponÃvel, se resultado
não for encontrado</string>
+ <string id="30131">Auto download primeira legenda "sinc"</string>
<string id="30132">- LegendasDivx Usuário</string>
<string id="30133">- LegendasDivx Senha</string>
<string id="30134">- PTSubs Usuário</string>
@@ -62,6 +69,13 @@
<string id="30137">- OmniSubs Senha</string>
<string id="30138">- LegendasZone Usuário</string>
<string id="30139">- LegendasZone Senha</string>
+ <string id="30140">- Escolha Tipo subs:</string>
+ <string id="30141">SubRip</string>
+ <string id="30142">TMPlayer</string>
+ <string id="30143">MicroDVD</string>
+ <string id="30144">MPl2</string>
+ <string id="30145">Use 'Subs' subfolder para armazenar legendas</string>
+
<!-- Languages -->
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 19137e8..c2ca6d3 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -16,6 +16,7 @@ _ = sys.modules[ "__main__" ].__language__
__scriptname__ = sys.modules[ "__main__" ].__scriptname__
__addon__ = sys.modules[ "__main__" ].__addon__
__profile__ = sys.modules[ "__main__" ].__profile__
+__version__ = sys.modules[ "__main__" ].__version__
class GUI( xbmcgui.WindowXMLDialog ):
@@ -58,14 +59,12 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.language_1 = languageTranslate(__addon__.getSetting( "Lang01" ),
4, 0) # Full language 1
self.language_2 = languageTranslate(__addon__.getSetting( "Lang02" ),
4, 0) # Full language 2
self.language_3 = languageTranslate(__addon__.getSetting( "Lang03" ),
4, 0) # Full language 3
- self.tmp_sub_dir = os.path.join( __profile__ ,"sub_tmp" )
# Temporary subtitle extraction directory
- self.stream_sub_dir = os.path.join( __profile__ ,"sub_stream" )
# Stream subtitle directory
-
+ self.tmp_sub_dir = os.path.join( __profile__ ,"sub_tmp"
).decode("utf-8") # Temporary subtitle extraction directory
+ self.stream_sub_dir = os.path.join( __profile__ ,"sub_stream"
).decode("utf-8") # Stream subtitle directory
+
+ self.clean_temp()
# clean temp dirs
+
if ( movieFullPath.find("http") > -1 ):
- if not xbmcvfs.exists(self.stream_sub_dir):
- os.makedirs(self.stream_sub_dir)
- else:
- rem_files(self.stream_sub_dir)
self.sub_folder = self.stream_sub_dir
self.temp = True
@@ -138,12 +137,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
int(self.episode)
)
else:
- self.file_name = "%s (%s)" % (self.title.encode('utf-8'),
str(self.year),)
-
- if not xbmcvfs.exists(self.tmp_sub_dir):
- os.makedirs(self.tmp_sub_dir)
- else:
- rem_files(self.tmp_sub_dir)
+ self.file_name = "%s (%s)" % (self.title.encode('utf-8'),
str(self.year),)
if ((__addon__.getSetting( "auto_download" ) == "true") and
(__addon__.getSetting( "auto_download_file" ) != os.path.basename(
movieFullPath ))):
@@ -172,8 +166,8 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.service_list = service_list
self.next = list(service_list)
self.controlId = -1
- self.subtitles_list = []
+ log( __name__ ,"Addon Version: [%s]" % __version__)
log( __name__ ,"Manual Search : [%s]" % self.mansearch)
log( __name__ ,"Default Service : [%s]" % self.service)
log( __name__ ,"Services : [%s]" % self.service_list)
@@ -190,7 +184,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
log( __name__ ,"Parent Folder Search: [%s]" % self.parsearch)
log( __name__ ,"Stacked(CD1/CD2)?: [%s]" % self.stack)
- return movieFullPath
+ return self.autoDownload
def Search_Subtitles( self, gui = True ):
self.subtitles_list = []
@@ -257,6 +251,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
else:
subscounter = 0
itemCount = 0
+ list_subs = []
for item in self.subtitles_list:
if (self.autoDownload and
item["sync"] and
@@ -286,15 +281,14 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitem.setProperty( "hearing_imp", "false" )
self.list.append(subscounter)
- subscounter = subscounter + 1
- self.getControl( SUBTITLES_LIST ).addItem( listitem )
+ subscounter = subscounter + 1
+ list_subs.append(listitem)
itemCount += 1
if gui:
- self.getControl( STATUS_LABEL ).setLabel( '%i %s '"' %s '"'' %
- (len ( self.subtitles_list ),
- _( 744 ),
- self.file_name,))
+ label = '%i %s '"' %s '"'' % (len ( self.subtitles_list ),_( 744
),self.file_name,)
+ self.getControl( STATUS_LABEL ).setLabel( label )
+ self.getControl( SUBTITLES_LIST ).addItems( list_subs )
self.setFocusId( SUBTITLES_LIST )
self.getControl( SUBTITLES_LIST ).selectItem( 0 )
return False
@@ -407,6 +401,14 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( STATUS_LABEL ).setLabel( _( 654 ) )
self.show_service_list(gui)
+ def clean_temp( self ):
+ dirs = [self.stream_sub_dir,self.tmp_sub_dir]
+ for temp_dir in dirs:
+ if not xbmcvfs.exists(temp_dir):
+ os.makedirs(temp_dir)
+ else:
+ rem_files(temp_dir)
+
def show_service_list(self,gui):
try:
select_index = self.service_list.index(self.service)
@@ -422,37 +424,44 @@ class GUI( xbmcgui.WindowXMLDialog ):
else:
name = os.path.splitext( sub_filename )[0]
if (__addon__.getSetting( "lang_to_end" ) == "true"):
- file_name = u"%s.%s%s" % ( name, subtitle_lang, os.path.splitext(
zip_entry )[1] )
+ file_name = u"%s.%s%s" % ( name,
+ subtitle_lang,
+ os.path.splitext( zip_entry )[1] )
else:
file_name = u"%s%s" % ( name, os.path.splitext( zip_entry )[1] )
- log( __name__ ,"Sub in Zip [%s], File Name [%s]" %
(zip_entry.encode("utf-8"), file_name.encode("utf-8"),))
- return os.path.join(self.tmp_sub_dir, zip_entry.encode("utf-8")),
os.path.join(self.sub_folder, file_name.encode("utf-8"))
+ log( __name__ ,"Sub in Zip [%s], File Name [%s]" %
(zip_entry.encode("utf-8"),
+
file_name.encode("utf-8"),))
+ ret_zip_entry = os.path.join(self.tmp_sub_dir,zip_entry.encode("utf-8"))
+ ret_file_name = os.path.join(self.sub_folder,file_name.encode("utf-8"))
+ return ret_zip_entry,ret_file_name
def list_services( self ):
self.list = []
+ all_items = []
self.getControl( SERVICES_LIST ).reset()
for serv in self.service_list:
listitem = xbmcgui.ListItem( serv )
self.list.append(serv)
listitem.setProperty( "man", "false" )
- self.getControl( SERVICES_LIST ).addItem( listitem )
+ all_items.append(listitem)
if self.mansearch :
listitem = xbmcgui.ListItem( _( 612 ) )
listitem.setProperty( "man", "true" )
self.list.append("Man")
- self.getControl( SERVICES_LIST ).addItem( listitem )
+ all_items.append(listitem)
if self.parsearch :
listitem = xbmcgui.ListItem( _( 747 ) )
listitem.setProperty( "man", "true" )
self.list.append("Par")
- self.getControl( SERVICES_LIST ).addItem( listitem )
+ all_items.append(listitem)
listitem = xbmcgui.ListItem( _( 762 ) )
listitem.setProperty( "man", "true" )
self.list.append("Set")
- self.getControl( SERVICES_LIST ).addItem( listitem )
+ all_items.append(listitem)
+ self.getControl( SERVICES_LIST ).addItems( all_items )
def keyboard(self, parent):
dir, self.year = xbmc.getCleanMovieTitle(self.file_original_path,
self.parsearch)
diff --git a/script.xbmc.subtitles/resources/lib/services/BetaSeries/service.py
b/script.xbmc.subtitles/resources/lib/services/BetaSeries/service.py
index f666d0a..310f800 100644
--- a/script.xbmc.subtitles/resources/lib/services/BetaSeries/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/BetaSeries/service.py
@@ -216,7 +216,7 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
# determine the newest file from tmp_sub_dir
for file in files:
if (string.split(file,'.')[-1] in ['srt','sub','txt','ass']):
- mtime = os.stat(os.path.join(tmp_sub_dir, file)).st_mtime
+ mtime = os.stat(os.path.join(tmp_sub_dir.encode("utf-8"),
file.encode("utf-8"))).st_mtime
if mtime > max_mtime:
max_mtime = mtime
init_max_mtime = max_mtime
diff --git a/script.xbmc.subtitles/resources/lib/services/Sratim/service.py
b/script.xbmc.subtitles/resources/lib/services/Sratim/service.py
index 713fbb5..28b9bdc 100644
--- a/script.xbmc.subtitles/resources/lib/services/Sratim/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Sratim/service.py
@@ -2,7 +2,7 @@
#===============================================================================
# Sratim.co.il subtitles service.
-# Version: 2.1
+# Version: 2.2
#
# Change log:
# 1.1 - Fixed bug with movie search: forgot to replace spaces with + signs.
@@ -10,13 +10,14 @@
# 2.0 - Changed RE patterns and links to match new site layout (Thanks Shai
Bentin!)
# Fixed TV show subtitles (now navigates site to find requested episode)
# 2.1 - Changed RE patterns again due to layout change (Thanks BBLN for also
suggesting different fix).
+# 2.2 - Changed url to subtitle.co.il
#
# Created by: Ori Varon
#===============================================================================
import os, re, xbmc, xbmcgui, string, time, urllib2
from utilities import languageTranslate, log
-BASE_URL = "http://www.sratim.co.il/"
+BASE_URL = "http://www.subtitle.co.il/"
debug_pretext = ""
#===============================================================================
diff --git a/script.xbmc.subtitles/resources/lib/services/Subdivx/service.py
b/script.xbmc.subtitles/resources/lib/services/Subdivx/service.py
index 27eb81d..1928dd7 100644
--- a/script.xbmc.subtitles/resources/lib/services/Subdivx/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Subdivx/service.py
@@ -168,7 +168,7 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
# determine if there is a newer file created in tmp_sub_dir
(marks that the extraction had completed)
for file in files:
if (string.split(file,'.')[-1] in ['srt','sub','txt']):
- mtime = os.stat(os.path.join(tmp_sub_dir,
file)).st_mtime
+ mtime = os.stat(os.path.join(tmp_sub_dir,
file.decode("utf-8"))).st_mtime
if (mtime > max_mtime):
max_mtime = mtime
waittime = waittime + 1
@@ -180,6 +180,6 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
# there could be more subtitle files in tmp_sub_dir, so
make sure we get the newly created subtitle file
if (string.split(file, '.')[-1] in ['srt', 'sub', 'txt'])
and (os.stat(os.path.join(tmp_sub_dir, file)).st_mtime > init_max_mtime): #
unpacked file is a newly created subtitle file
log( __name__ ,u"%s Unpacked subtitles file '%s'" %
(debug_pretext, file))
- subs_file = os.path.join(tmp_sub_dir, file)
+ subs_file = os.path.join(tmp_sub_dir,
file.decode("utf-8"))
return False, language, subs_file #standard output
diff --git a/script.xbmc.subtitles/resources/lib/services/Subscene/service.py
b/script.xbmc.subtitles/resources/lib/services/Subscene/service.py
index 76d5da2..1bdd674 100644
--- a/script.xbmc.subtitles/resources/lib/services/Subscene/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Subscene/service.py
@@ -38,8 +38,8 @@ seasons = seasons + ["Twenty-first", "Twenty-second",
"Twenty-third", "Twenty-fo
"""
subtitle_pattern = "..<tr>.{5}<td>.{6}<a class=\"a1\"
href=\"/([^\n\r]{10,200}?-\d{3,10}.aspx)\" title=\"[^\n\r]{10,200}\">\
[\r\n\t ]+?<span class=\"r(0|100)\" >[\r\n\t\ ]+([^\r\n\t]+?)
[\r\n\t]+</span>[\r\n\t ]+?<span id=\"r\d+\">([^\r\n\t]{5,500})</span>\
-[\r\n\t]+?</a>[\r\n\t ]+?</td>[\r\n\t ]+?<td class=\"a3\">1[\r\n\t\
]+?</td>[\r\n\t\ ]+?<td>(?!<div id=imgEar)"
-# group(1) = downloadlink, group(2) = qualitycode, group(3) = language,
group(4) = filename
+[\r\n\t]+?</a>[\r\n\t ]+?</td>[\r\n\t ]+?<td class=\"a3\">1[\r\n\t\
]+?</td>[\r\n\t\ ]+?<td>(|.{52})\r\n\t\t\t</td>"
+# group(1) = downloadlink, group(2) = qualitycode, group(3) = language,
group(4) = filename, group(5) = hearing impaired
# movie/seasonfound pattern example:
@@ -98,10 +98,10 @@ def find_movie(content, title, year):
def find_tv_show_season(content, tvshow, season):
url_found = None
for matches in re.finditer(movie_season_pattern, content, re.IGNORECASE |
re.DOTALL):
- log( __name__ ,"%s Found tv show season on search page: %s" %
(debug_pretext, matches.group(2)))
+ log( __name__ ,"%s Found tv show season on search page: %s" %
(debug_pretext, matches.group(2).decode("utf-8")))
if string.find(string.lower(matches.group(2)),string.lower(tvshow) + "
") > -1:
if
string.find(string.lower(matches.group(2)),string.lower(season)) > -1:
- log( __name__ ,"%s Matching tv show season found on search
page: %s" % (debug_pretext, matches.group(2)))
+ log( __name__ ,"%s Matching tv show season found on search
page: %s" % (debug_pretext, matches.group(2).decode("utf-8")))
url_found = matches.group(1)
break
return url_found
@@ -114,15 +114,16 @@ def getallsubs(response_url, content, language, title,
subtitles_list, search_st
link = main_url + matches.group(1)
languageshort = languageTranslate(language,0,2)
filename = matches.group(4)
+ hearing_imp = len(matches.group(5)) > 0
if search_string != "":
log( __name__ , "string.lower(filename) = >" +
string.lower(filename) + "<" )
log( __name__ , "string.lower(search_string) = >" +
string.lower(search_string) + "<" )
if
string.find(string.lower(filename),string.lower(search_string)) > -1:
log( __name__ ,"%s Subtitles found: %s, %s" %
(debug_pretext, languagefound, filename))
- subtitles_list.append({'rating': '0', 'movie': title,
'filename': filename, 'sync': False, 'link': link, 'language_flag': 'flags/' +
languageshort + '.gif', 'language_name': language})
+ subtitles_list.append({'rating': '0', 'movie': title,
'filename': filename, 'sync': False, 'link': link, 'language_flag': 'flags/' +
languageshort + '.gif', 'language_name': language, 'hearing_imp': hearing_imp})
else:
log( __name__ ,"%s Subtitles found: %s, %s" % (debug_pretext,
languagefound, filename))
- subtitles_list.append({'rating': '0', 'movie': title,
'filename': filename, 'sync': False, 'link': link, 'language_flag': 'flags/' +
languageshort + '.gif', 'language_name': language})
+ subtitles_list.append({'rating': '0', 'movie': title,
'filename': filename, 'sync': False, 'link': link, 'language_flag': 'flags/' +
languageshort + '.gif', 'language_name': language, 'hearing_imp': hearing_imp})
def geturl(url):
diff --git a/script.xbmc.subtitles/resources/lib/services/Subscenter/service.py
b/script.xbmc.subtitles/resources/lib/services/Subscenter/service.py
index 518dce3..1593c96 100644
--- a/script.xbmc.subtitles/resources/lib/services/Subscenter/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Subscenter/service.py
@@ -2,12 +2,13 @@
#===============================================================================
# Subscenter.org subtitles service.
-# Version: 1.3
+# Version: 1.4
#
# Change log:
# 1.1 - Fixed downloading of non-Hebrew subtitles.
# 1.2 - Added key field for download URL
# 1.3 - Fixed null values in website dictionary (changed to None)
+# 1.4 - Fixed key field (Thanks ILRHAES)
#
# Created by: Ori Varon
#===============================================================================
@@ -217,8 +218,8 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
def download_subtitles (subtitles_list, pos, zip_subs, tmp_sub_dir,
sub_folder, session_id): #standard input
subtitle_id = subtitles_list[pos][ "subtitle_id" ]
filename = subtitles_list[pos][ "filename" ]
- url = BASE_URL +
"/subtitle/download/"+languageTranslate(subtitles_list[pos][ "language_name" ],
0, 2)+"/"+str(subtitle_id)+"/?v="+filename
key = subtitles_list[pos][ "key" ]
+ url = BASE_URL +
"/subtitle/download/"+languageTranslate(subtitles_list[pos][ "language_name" ],
0, 2)+"/"+str(subtitle_id)+"/?v="+filename+"&key="+key
log( __name__ ,"%s Fetching subtitles using url %s" % (debug_pretext, url))
# Get the intended filename (don't know if it's zip or rar)
archive_name = getURLfilename(url)
diff --git a/script.xbmc.subtitles/resources/lib/utilities.py
b/script.xbmc.subtitles/resources/lib/utilities.py
index 01a43ca..9b94ddd 100644
--- a/script.xbmc.subtitles/resources/lib/utilities.py
+++ b/script.xbmc.subtitles/resources/lib/utilities.py
@@ -169,9 +169,9 @@ def rem_files(directory):
try:
for root, dirs, files in os.walk(directory, topdown=False):
for items in dirs:
- xbmcvfs.rmdir(os.path.join(root, items))
+ xbmcvfs.rmdir(os.path.join(root.encode("utf-8"),
items.encode("utf-8")))
for name in files:
- xbmcvfs.delete(os.path.join(root, name))
+ xbmcvfs.delete(os.path.join(root.encode("utf-8"),
name.encode("utf-8")))
except:
pass
diff --git a/script.xbmc.subtitles/resources/settings.xml
b/script.xbmc.subtitles/resources/settings.xml
index f59e511..c2ea3b0 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -55,6 +55,7 @@
<setting id="Subscene" type="bool" label="Subscene.com" default="false"/>
<setting id="Subscenter" type="bool" label="Subscenter.org"
default="false"/>
<setting id="SubtitlesGr" type="bool" label="Subtitles.gr (Greek subs
only)" default="false"/>
+ <setting id="SubtitulosES" type="bool" label="Subtitulos.es"
default="false"/>
<setting id="SuperSubtitles" type="bool" label="SuperSubtitles
(Feliratok.info)" default="false"/>
<setting id="Swesub" type="bool" label="Swesub.nu" default="false"/>
-----------------------------------------------------------------------
Summary of changes:
script.xbmc.subtitles/addon.xml | 2 +-
script.xbmc.subtitles/changelog.txt | 10 +
script.xbmc.subtitles/default.py | 20 +--
.../language/Portuguese (Brazil)/strings.xml | 18 ++-
script.xbmc.subtitles/resources/lib/gui.py | 65 ++++---
.../resources/lib/services/BetaSeries/service.py | 2 +-
.../resources/lib/services/Sratim/service.py | 5 +-
.../resources/lib/services/Subdivx/service.py | 4 +-
.../resources/lib/services/Subscene/service.py | 13 +-
.../resources/lib/services/Subscenter/service.py | 5 +-
.../lib/services/SubtitulosES}/__init__.py | 0
.../resources/lib/services/SubtitulosES/logo.png | Bin 0 -> 28682 bytes
.../{Argenteam => SubtitulosES}/service.py | 192 +++++++++++++-------
script.xbmc.subtitles/resources/lib/utilities.py | 4 +-
script.xbmc.subtitles/resources/settings.xml | 1 +
service.libraryautoupdate/addon.xml | 2 +-
service.libraryautoupdate/changelog.txt | 10 +-
service.libraryautoupdate/service.py | 7 +-
18 files changed, 230 insertions(+), 130 deletions(-)
copy {script.cu.lyrics/resources/lib/scrapers =>
script.xbmc.subtitles/resources/lib/services/SubtitulosES}/__init__.py (100%)
create mode 100644
script.xbmc.subtitles/resources/lib/services/SubtitulosES/logo.png
copy script.xbmc.subtitles/resources/lib/services/{Argenteam =>
SubtitulosES}/service.py (50%)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons