The branch, dharma has been updated
via 0f456ad355d909d465ed0687ea92052d28e5817d (commit)
from 1a7f4b88d27bbbedb03649234dae9fa4733658ae (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=0f456ad355d909d465ed0687ea92052d28e5817d
commit 0f456ad355d909d465ed0687ea92052d28e5817d
Author: amet <[email protected]>
Date: Sat Feb 5 02:40:33 2011 +0400
[script.xbmc.subtitles] -v2.2.6
- added: theSubDB, thanks to jrhames
- added: open addon settings from the service window
- removed: legacy window support
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 0c1677e..1b0c90a 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.2.5"
+ version="2.2.6"
provider-name="Amet">
<requires>
<import addon="xbmc.python" version="1.0"/>
@@ -16,12 +16,12 @@
<summary lang="sr">XBMC ÐÑеводи</summary>
<summary lang="nl">XBMC Ondertitels</summary>
<summary lang="bg">XBMC СÑбÑиÑÑи</summary>
- <description lang="en">Search and download subtitles from 13
websites:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com,
Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com,
Subdivx.com, Legendas.tv, Italiansubs.net, Swesub.nu and Titlovi.com.Subtitle
button on OSD needs to be activated and path set to XBMC Subtitles under
System-> Skin-> Addon Scripts</description>
- <description lang="es">Busca y descarga subtÃtulos de:OpenSubtitles.org,
Podnapisi.net, Sublight.si, Bierdopje.com, Subscene.com, Undertexter.se,
Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com, Legendas.tv,
Italiansubs.net, Swesub.nu y Titlovi.com.El botón de subtitulos en el OSD debe
ser añadido, y la ruta al addon debe ponerse en Sistema-> Skin-> Addons de
Scripts</description>
- <description lang="hu">Film feliratok keresése letöltése
az:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com, Subscene.com,
Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com,
Legendas.tv, Italiansubs.net, Swesub.nu és Titlovi.com webhelyekról.A
dalszöveg OSD gombot aktiválni kell az elérési út megadásával a
BeállÃtások -> Skin -> Szkriptek alatt.</description>
- <description lang="sr">ÐÑеÑÑажи и Ñкини пÑеводе Ñа
13 веб ÑÑÑаниÑа:OpenSubtitles.org, Podnapisi.net, Sublight.si,
Bierdopje.com, Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl,
Titulky.com, Subdivx.com, Legendas.tv, Italiansubs.net, Swesub.nu и
Titlovi.com.ÐÑгме за пÑеводе на OSD ÑÑеба да Ñе
акÑивиÑа и изабеÑе XBMC Subtitles Ñ Ð¡Ð¸ÑÑем->
ÐаÑка-> СкÑÐ¸Ð¿Ñ Ð´Ð¾Ð´Ð°Ñи</description>
- <description lang="nl">Zoek en download ondertitels van 13
websites:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com,
Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com,
Subdivx.com, Legendas.tv, Italiansubs.net, Swesub.nu en Titlovi.com.De
ondertitel knop in het OSD scherm moet zijn geactiveerd met het pad naar XBMC
Subtitles via Systeem-> Skin-> Addon Scripts.</description>
- <description lang="bg"> ТÑÑÑи и ÑвалÑй ÑÑбÑиÑÑи оÑ
13 ÑебÑайÑа: OpenSubtitles.org (ÐÑепоÑÑÑвам за Ñилми,
ÑÑÑо за ÑеÑиали), Podnapisi.net (ÐÑепоÑÑÑвам за
ÑеÑиали), Sublight.si, Bierdopje.com, Subscene.com, Undertexter.se,
Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com, Legendas.tv,
Swesub.nu, Italiansubs.net and Titlovi.com. ÐÑÑонÑÑ Ð·Ð°
ÑÑбÑиÑÑи в OSD менÑÑо над Ñилма ÑÑÑбва да
бÑде акÑивиÑан и пÑÑÑ ÐºÑм пÑиложениеÑо
ÑÑÑбва да бÑде Ñказан, каÑо и за двеÑе
оÑиваÑе в менÑÑо на СиÑÑема(System)-> Ðожа(Skin)->
Ðобавка(Addon Scripts)</description> <platform>all</platform>
+ <description lang="en">Search and download subtitles from 14
websites:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com,
Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com,
Subdivx.com, Legendas.tv, Italiansubs.net, theSubDB.com, Swesub.nu and
Titlovi.com.Subtitle button on OSD needs to be activated and path set to XBMC
Subtitles under System-> Skin-> Addon Scripts</description>
+ <description lang="es">Busca y descarga subtÃtulos de:OpenSubtitles.org,
Podnapisi.net, Sublight.si, Bierdopje.com, Subscene.com, Undertexter.se,
Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com, Legendas.tv,
Italiansubs.net, theSubDB.com, Swesub.nu y Titlovi.com.El botón de subtitulos
en el OSD debe ser añadido, y la ruta al addon debe ponerse en Sistema->
Skin-> Addons de Scripts</description>
+ <description lang="hu">Film feliratok keresése letöltése
az:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com, Subscene.com,
Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com,
Legendas.tv, Italiansubs.net, theSubDB.com, Swesub.nu és Titlovi.com
webhelyekról.A dalszöveg OSD gombot aktiválni kell az elérési út
megadásával a BeállÃtások -> Skin -> Szkriptek alatt.</description>
+ <description lang="sr">ÐÑеÑÑажи и Ñкини пÑеводе Ñа
14 веб ÑÑÑаниÑа:OpenSubtitles.org, Podnapisi.net, Sublight.si,
Bierdopje.com, Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl,
Titulky.com, Subdivx.com, Legendas.tv, Italiansubs.net, theSubDB.com, Swesub.nu
и Titlovi.com.ÐÑгме за пÑеводе на OSD ÑÑеба да Ñе
акÑивиÑа и изабеÑе XBMC Subtitles Ñ Ð¡Ð¸ÑÑем->
ÐаÑка-> СкÑÐ¸Ð¿Ñ Ð´Ð¾Ð´Ð°Ñи</description>
+ <description lang="nl">Zoek en download ondertitels van 14
websites:OpenSubtitles.org, Podnapisi.net, Sublight.si, Bierdopje.com,
Subscene.com, Undertexter.se, Ondertitel.com, Napiprojekt.pl, Titulky.com,
Subdivx.com, Legendas.tv, Italiansubs.net, theSubDB.com, Swesub.nu en
Titlovi.com.De ondertitel knop in het OSD scherm moet zijn geactiveerd met het
pad naar XBMC Subtitles via Systeem-> Skin-> Addon Scripts.</description>
+ <description lang="bg"> ТÑÑÑи и ÑвалÑй ÑÑбÑиÑÑи оÑ
14 ÑебÑайÑа: OpenSubtitles.org (ÐÑепоÑÑÑвам за Ñилми,
ÑÑÑо за ÑеÑиали), Podnapisi.net (ÐÑепоÑÑÑвам за
ÑеÑиали), Sublight.si, Bierdopje.com, Subscene.com, Undertexter.se,
Ondertitel.com, Napiprojekt.pl, Titulky.com, Subdivx.com, Legendas.tv,
Swesub.nu, theSubDB.com, Italiansubs.net and Titlovi.com. ÐÑÑонÑÑ Ð·Ð°
ÑÑбÑиÑÑи в OSD менÑÑо над Ñилма ÑÑÑбва да
бÑде акÑивиÑан и пÑÑÑ ÐºÑм пÑиложениеÑо
ÑÑÑбва да бÑде Ñказан, каÑо и за двеÑе
оÑиваÑе в менÑÑо на СиÑÑема(System)-> Ðожа(Skin)->
Ðобавка(Addon Scripts)</description> <platform>all</platform>
<platform>all</platform>
</extension>
</addon>
diff --git a/script.xbmc.subtitles/changelog.txt
b/script.xbmc.subtitles/changelog.txt
index 7d1c586..c6372bf 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,8 @@
+2.2.6
+- added: theSubDB, thanks to jrhames
+- added: open addon settings from the service window
+- removed: legacy window support
+
2.2.5
- added: Added storing of Bierdopje show ids to reduce the number of api
calls. thx mr_blobby
- use getAddonInfo('profile') for temporary subtitle location
diff --git a/script.xbmc.subtitles/resources/language/English/strings.xml
b/script.xbmc.subtitles/resources/language/English/strings.xml
index 59de5a3..6030dfa 100644
--- a/script.xbmc.subtitles/resources/language/English/strings.xml
+++ b/script.xbmc.subtitles/resources/language/English/strings.xml
@@ -26,6 +26,7 @@
<string id="759">Enter code of image in notification area</string>
<string id="760">Available Services</string>
<string id="761">You must be logged in to download these
subtitles,[CR]verify your settings at the addon Configuration</string>
+ <string id="762">Addon Settings</string>
<!-- Script Settings -->
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index d0ee1bf..ca83a30 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -33,9 +33,8 @@ class GUI( xbmcgui.WindowXMLDialog ):
def set_allparam(self):
temp = False
rar = False
- self.newWindow = True
movieFullPath = urllib.unquote(xbmc.Player().getPlayingFile())
- path = __settings__.getSetting( "subfolder" ) == "true" # True for
movie folder
+ path = __settings__.getSetting( "subfolder" ) == "true" #
True for movie folder
sub_folder = xbmc.translatePath(__settings__.getSetting( "subfolderpath" ))
if (movieFullPath.find("http://") > -1 ):
@@ -117,7 +116,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
else:
self.file_name = "%s (%s)" % (self.title.encode('utf-8'),
str(self.year),)
- self.tmp_sub_dir = os.path.join( __profile__ ,"sub_tmp" )
+ self.tmp_sub_dir = xbmc.translatePath(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)
@@ -179,11 +178,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
log( __name__ ,"Languages: [%s] [%s] [%s]" % (self.language_1,
self.language_2, self.language_3,))
log( __name__ ,"Parent Folder Search: [%s]" % self.parsearch)
- try:
- self.list_services()
- except:
- self.newWindow = False
- self.list_services()
+ self.list_services()
try:
self.Search_Subtitles()
@@ -243,16 +238,11 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( STATUS_LABEL ).setLabel( msg )
else:
self.getControl( STATUS_LABEL ).setLabel( _( 657 ) )
- if self.newWindow:
- self.setFocusId( SERVICES_LIST )
- self.getControl( SERVICES_LIST ).selectItem( 0 )
- else:
- self.list_services()
- self.setFocusId( SUBTITLES_LIST )
- self.getControl( SUBTITLES_LIST ).selectItem( 0 )
+
+ self.setFocusId( SERVICES_LIST )
+ self.getControl( SERVICES_LIST ).selectItem( 0 )
else:
- if not self.newWindow: self.list_services()
subscounter = 0
for item in self.subtitles_list:
listitem = xbmcgui.ListItem( label=item["language_name"],
label2=item["filename"], iconImage=item["rating"],
thumbnailImage=item["language_flag"] )
@@ -265,7 +255,6 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( SUBTITLES_LIST ).addItem( listitem )
self.getControl( STATUS_LABEL ).setLabel( '%i %s '"' %s '"'' % (len (
self.subtitles_list ), _( 744 ), self.file_name,) )
-
self.setFocusId( SUBTITLES_LIST )
self.getControl( SUBTITLES_LIST ).selectItem( 0 )
###-------------------------- Download Subtitles -------------################
@@ -284,10 +273,14 @@ class GUI( xbmcgui.WindowXMLDialog ):
if (__settings__.getSetting( "lang_to_end" ) == "true"):
file_name = "%s.%s%s" % ( sub_name, sub_lang, sub_ext )
else:
- file_name = "%s%s" % ( sub_name, sub_ext )
- file_path = os.path.join(self.sub_folder, file_name)
- shutil.copyfile(file, file_path)
- xbmc.Player().setSubtitles(file_path)
+ file_name = "%s%s" % ( sub_name, sub_ext )
+ file_from = os.path.join(self.tmp_sub_dir,
"zipsubs.zip").replace('\\','/')
+ file_to = os.path.join(self.sub_folder, file_name).replace('\\','/')
+ try:
+ shutil.copyfile(file_from, file_to)
+ except IOError, e:
+ log( __name__ ,"Error: [%s]" % (e,) )
+ xbmc.Player().setSubtitles(file_to)
self.rem_files(self.tmp_sub_dir)
self.exit_script()
@@ -300,11 +293,8 @@ class GUI( xbmcgui.WindowXMLDialog ):
exts = [".srt", ".sub", ".txt", ".smi", ".ssa", ".ass" ]
if len(files) < 1 :
self.getControl( STATUS_LABEL ).setLabel( _( 654 ) )
- if self.newWindow:
- self.setFocusId( SERVICES_LIST )
- self.getControl( SERVICES_LIST ).selectItem( 0 )
- else:
- self.list_services()
+ self.setFocusId( SERVICES_LIST )
+ self.getControl( SERVICES_LIST ).selectItem( 0 )
else :
self.getControl( STATUS_LABEL ).setLabel( _( 652 ) )
un.extract( zip_subs, self.tmp_sub_dir )
@@ -335,13 +325,8 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.exit_script()
else:
self.getControl( STATUS_LABEL ).setLabel( _( 654 ) )
- if self.newWindow:
- self.setFocusId( SERVICES_LIST )
- self.getControl( SERVICES_LIST ).selectItem( 0 )
- else:
- self.list_services()
- self.setFocusId( SUBTITLES_LIST )
- self.getControl( SUBTITLES_LIST ).selectItem( 0 )
+ self.setFocusId( SERVICES_LIST )
+ self.getControl( SERVICES_LIST ).selectItem( 0 )
###-------------------------- Create name -------------################
@@ -378,45 +363,30 @@ class GUI( xbmcgui.WindowXMLDialog ):
def list_services( self ):
self.list = []
- if self.newWindow:
- for serv in self.service_list:
- listitem = xbmcgui.ListItem( serv )
- self.list.append(serv)
- listitem.setProperty( "man", "false" )
+ 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 )
+
+ if self.mansearch :
+ listitem = xbmcgui.ListItem( _( 612 ) )
+ listitem.setProperty( "man", "true" )
+ self.list.append("Man")
self.getControl( SERVICES_LIST ).addItem( listitem )
- if self.mansearch :
- listitem = xbmcgui.ListItem( _( 612 ) )
- listitem.setProperty( "man", "true" )
- self.list.append("Man")
- self.getControl( SERVICES_LIST ).addItem( listitem )
-
- if self.parsearch :
- listitem = xbmcgui.ListItem( _( 747 ) )
- listitem.setProperty( "man", "true" )
- self.list.append("Par")
- self.getControl( SERVICES_LIST ).addItem( listitem )
- else:
- self.getControl( SUBTITLES_LIST ).reset()
- label = ""
- for serv in self.service_list:
- if serv != self.service:
- label2 = "[COLOR=FF0084ff]%s%s[/COLOR]" %(_( 610 ), serv,)
- listitem = xbmcgui.ListItem( label,label2 )
- self.list.append(serv)
- self.getControl( SUBTITLES_LIST ).addItem( listitem )
-
- if self.mansearch :
- label2 = "[COLOR=FF00FF00]%s[/COLOR]" % ( _( 612 ) )
- listitem = xbmcgui.ListItem( label,label2 )
- self.list.append("Man")
- self.getControl( SUBTITLES_LIST ).addItem( listitem )
-
- if self.parsearch :
- label2 = "[COLOR=FF00FF00]%s[/COLOR]" % ( _( 747 ) )
- listitem = xbmcgui.ListItem( label,label2 )
- self.list.append("Par")
- self.getControl( SUBTITLES_LIST ).addItem( listitem )
+ if self.parsearch :
+ listitem = xbmcgui.ListItem( _( 747 ) )
+ listitem.setProperty( "man", "true" )
+ self.list.append("Par")
+ self.getControl( SERVICES_LIST ).addItem( listitem )
+
+ listitem = xbmcgui.ListItem( _( 762 ) )
+ listitem.setProperty( "man", "true" )
+ self.list.append("Set")
+ self.getControl( SERVICES_LIST ).addItem( listitem )
+
###-------------------------- Manual search Keyboard
-------------################
@@ -453,23 +423,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
def onClick( self, controlId ):
if controlId == 120:
- if self.newWindow:
- self.Download_Subtitles( self.getControl( SUBTITLES_LIST
).getSelectedPosition() )
- else:
- selection = str(self.list[self.getControl( SUBTITLES_LIST
).getSelectedPosition()])
- log( __name__ ,"In 'On click' selected : [%s]" % (selection, ) )
- if selection.isdigit():
- log( __name__ , "Selected : [%s]" % (selection, ) )
- self.Download_Subtitles( int(selection) )
- else:
- if selection == "Man":
- self.keyboard(False)
- elif selection == "Par":
- self.keyboard(True)
- else:
- self.service = selection
- self.Search_Subtitles()
-
+ self.Download_Subtitles( self.getControl( SUBTITLES_LIST
).getSelectedPosition() )
elif controlId == 150:
selection = str(self.list[self.getControl( SERVICES_LIST
).getSelectedPosition()])
log( __name__ ,"In 'On click' selected : [%s]" % (selection, ) )
@@ -478,6 +432,9 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.keyboard(False)
elif selection == "Par":
self.keyboard(True)
+ elif selection == "Set":
+ __settings__.openSettings()
+ self.set_allparam()
else:
self.service = selection
self.Search_Subtitles()
@@ -511,9 +468,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
if controlId == 8999:
self.setFocusId( 150 )
except:
- pass
-
-
+ pass
###-------------------------- "Esc" , "Back" button
-------------################
diff --git a/script.xbmc.subtitles/resources/settings.xml
b/script.xbmc.subtitles/resources/settings.xml
index 4a13da2..5289ddf 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -29,6 +29,7 @@
<setting id="Itasa" type="bool" label="Itasa (Italiansubs.net, TV Shows
and Italian only)" default="false"/>
<setting id="ITuser" type="text" visible= "eq(-1,true)"
enable="eq(-1,true)" label="30126" default=""/>
<setting id="ITpass" type="text" option = "hidden" visible=
"eq(-2,true)" enable="eq(-2,true)" label="30127" default=""/>
+ <setting id="SubDB" type="bool" label="theSubDB.com" default="false"/>
</category>
<category label="30106">
<setting id="defmovieservice" type="fileenum" mask="/" label="30113"
default="OpenSubtitles" values="/resources/lib/services" />
-----------------------------------------------------------------------
Summary of changes:
script.xbmc.subtitles/addon.xml | 14 +-
script.xbmc.subtitles/changelog.txt | 5 +
.../resources/language/English/strings.xml | 1 +
script.xbmc.subtitles/resources/lib/gui.py | 135 +++++++-------------
.../resources/lib/services/SubDB}/__init__.py | 0
.../resources/lib/services/SubDB/logo.png | Bin 0 -> 4137 bytes
.../resources/lib/services/SubDB/service.py | 107 ++++++++++++++++
script.xbmc.subtitles/resources/settings.xml | 1 +
8 files changed, 166 insertions(+), 97 deletions(-)
copy {script.cu.lyrics/resources/lib/scrapers =>
script.xbmc.subtitles/resources/lib/services/SubDB}/__init__.py (100%)
create mode 100644 script.xbmc.subtitles/resources/lib/services/SubDB/logo.png
create mode 100644
script.xbmc.subtitles/resources/lib/services/SubDB/service.py
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons