The branch, dharma has been updated
via edbbd2ff17f72ada324b6eaf91d01e4ee48ac2b6 (commit)
via 212da302e369e6b89a6eb1bad54bbae1b076dbfe (commit)
from 16b06c4211cab363a996a177c74d05aa55a047e4 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=edbbd2ff17f72ada324b6eaf91d01e4ee48ac2b6
commit edbbd2ff17f72ada324b6eaf91d01e4ee48ac2b6
Author: amet <[email protected]>
Date: Sat Feb 19 00:36:09 2011 +0400
[script.xbmc.subtitles] -v 2.3.3
- oops, c/p error
2.3.2
- added: support for xbmcvfs module, with this its possible to search by
hash and save on smb:// drives.
2.3.1
- fixed: more xbmc.translatePath() games for external python setups
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index d13aeeb..a3c96fa 100644
--- a/script.xbmc.subtitles/addon.xml
+++ b/script.xbmc.subtitles/addon.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.xbmc.subtitles"
name="XBMC Subtitles"
- version="2.3.0"
- provider-name="Amet">
+ version="2.3.3"
+ provider-name="Amet, mr_blobby">
<requires>
<import addon="xbmc.python" version="1.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
diff --git a/script.xbmc.subtitles/changelog.txt
b/script.xbmc.subtitles/changelog.txt
index a5b8dca..d6f3a4c 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,12 @@
+2.3.3
+- oops, c/p error
+
+2.3.2
+- added: support for xbmcvfs module, with this its possible to search by hash
and save on smb:// drives on git post 07214fed10baf7dff89e and atv2 branch post
9da6df570ce8b840fd85
+
+2.3.1
+- fixed: more xbmc.translatePath() games for external python setups
+
2.3.0
- fixed: temporary folder needs xbmc.translatePath()
- removed Addic7ed service, requested by alex from Addic7ed.com
diff --git a/script.xbmc.subtitles/default.py b/script.xbmc.subtitles/default.py
index 4f7eca8..4ec0c42 100644
--- a/script.xbmc.subtitles/default.py
+++ b/script.xbmc.subtitles/default.py
@@ -9,7 +9,7 @@ __settings__ = xbmcaddon.Addon(id='script.xbmc.subtitles')
__language__ = __settings__.getLocalizedString
__version__ = __settings__.getAddonInfo('version')
__cwd__ = __settings__.getAddonInfo('path')
-__profile__ = __settings__.getAddonInfo('profile')
+__profile__ = xbmc.translatePath( __settings__.getAddonInfo('profile') )
__scriptname__ = "XBMC Subtitles"
__scriptid__ = "script.xbmc.subtitles"
__author__ = "Amet,mr_blobby"
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 75d7d11..8304fd6 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -9,6 +9,11 @@ import unicodedata
import shutil
import socket
+try:
+ import xbmcvfs
+ VFS = True
+except:
+ VFS = False
_ = sys.modules[ "__main__" ].__language__
__scriptname__ = sys.modules[ "__main__" ].__scriptname__
__settings__ = sys.modules[ "__main__" ].__settings__
@@ -117,7 +122,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( xbmc.translatePath(__profile__)
,"sub_tmp" )
+ self.tmp_sub_dir = 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)
@@ -287,7 +292,11 @@ class GUI( xbmcgui.WindowXMLDialog ):
file_from = file.replace('\\','/')
file_to = os.path.join(self.sub_folder, file_name).replace('\\','/')
try:
- shutil.copyfile(file_from, file_to)
+ if VFS:
+ xbmcvfs.copy(file_from, file_to)
+ log( __name__ ,"vfs module copy %s -> %s" % (file_from, file_to))
+ else:
+ shutil.copyfile(file_from, file_to)
except IOError, e:
log( __name__ ,"Error: [%s]" % (e,) )
xbmc.Player().setSubtitles(file_to)
@@ -329,7 +338,6 @@ class GUI( xbmcgui.WindowXMLDialog ):
if not subtitle_set:
for zip_entry in files:
if os.path.splitext( zip_entry )[1] in exts:
- print os.path.splitext( zip_entry )[1]
subtitle_file, file_path =
self.create_name(zip_entry,sub_filename,subtitle_lang)
subtitle_set,file_path = self.copy_files( subtitle_file,
file_path )
@@ -361,7 +369,11 @@ class GUI( xbmcgui.WindowXMLDialog ):
def copy_files( self, subtitle_file, file_path ):
subtitle_set = False
try:
- shutil.copy(subtitle_file, file_path)
+ if VFS:
+ xbmcvfs.copy(subtitle_file, file_path)
+ log( __name__ ,"vfs module copy %s -> %s" % (subtitle_file, file_path))
+ else:
+ shutil.copy(subtitle_file, file_path)
subtitle_set = True
except :
import filecmp
diff --git a/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
b/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
index 794b71b..be3080f 100644
--- a/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
@@ -3,9 +3,11 @@ from utilities import log
_ = sys.modules[ "__main__" ].__language__
__settings__ = sys.modules[ "__main__" ].__settings__
+__profile__ = sys.modules[ "__main__" ].__profile__
+
apiurl = "http://api.bierdopje.com/"
apikey = "369C2ED4261DE9C3"
-showids_filename = os.path.join( __settings__.getAddonInfo('profile')
,"bierdopje_show_ids.txt" )
+showids_filename = os.path.join( __profile__ ,"bierdopje_show_ids.txt" )
#====================================================================================================================
# Functions
diff --git
a/script.xbmc.subtitles/resources/lib/services/OpenSubtitles/service.py
b/script.xbmc.subtitles/resources/lib/services/OpenSubtitles/service.py
index 5dae0dc..0a800d7 100644
--- a/script.xbmc.subtitles/resources/lib/services/OpenSubtitles/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/OpenSubtitles/service.py
@@ -62,8 +62,12 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
hashTry = "000000000000"
else:
try:
- hashTry = timeout(set_filehash, args=(file_original_path, rar),
timeout_duration=5)
- file_size = os.path.getsize( file_original_path )
+ try:
+ file_size, hashTry = xbmc.subHashAndFileSize(file_original_path)
+ log( __name__ ,"xbmc module hash and size")
+ except:
+ hashTry = timeout(set_filehash, args=(file_original_path, rar),
timeout_duration=5)
+ file_size = str(os.path.getsize( file_original_path ))
hash_search = True
except:
file_size = ""
@@ -94,4 +98,4 @@ def download_subtitles (subtitles_list, pos, zip_subs,
tmp_sub_dir, sub_folder,
-
\ No newline at end of file
+
diff --git a/script.xbmc.subtitles/resources/lib/services/Podnapisi/service.py
b/script.xbmc.subtitles/resources/lib/services/Podnapisi/service.py
index 7cef840..f348a03 100644
--- a/script.xbmc.subtitles/resources/lib/services/Podnapisi/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Podnapisi/service.py
@@ -42,7 +42,6 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
ok = False
msg = ""
- hash_search = False
osdb_server = OSDBServer()
osdb_server.create()
subtitles_list = []
@@ -55,8 +54,12 @@ def search_subtitles( file_original_path, title, tvshow,
year, season, episode,
hash_search = False
else:
try:
- hashTry = timeout(set_filehash, args=(file_original_path, rar),
timeout_duration=5)
- file_size = os.path.getsize( file_original_path )
+ try:
+ file_size, hashTry = xbmc.subHashAndFileSize(file_original_path)
+ log( __name__ ,"xbmc module hash and size")
+ except:
+ hashTry = timeout(set_filehash, args=(file_original_path, rar),
timeout_duration=5)
+ file_size = str(os.path.getsize( file_original_path ))
hash_search = True
except:
hash_search = False
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=212da302e369e6b89a6eb1bad54bbae1b076dbfe
commit 212da302e369e6b89a6eb1bad54bbae1b076dbfe
Author: amet <[email protected]>
Date: Sat Feb 19 00:28:52 2011 +0400
[script.image.lastfm.slideshow] -v0.0.2
removed settings, no longer required
diff --git a/script.image.lastfm.slideshow/addon.xml
b/script.image.lastfm.slideshow/addon.xml
index 305c866..d4f7489 100644
--- a/script.image.lastfm.slideshow/addon.xml
+++ b/script.image.lastfm.slideshow/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.image.lastfm.slideshow"
name="Last.FM - SlideShow"
- version="0.0.1"
+ version="0.0.2"
provider-name="divingmule">
<requires>
<import addon="xbmc.python" version="1.0"/>
@@ -15,7 +15,6 @@
<extension point="xbmc.addon.metadata">
<summary>Plays a slide show of the currently playing artist.</summary>
<description>While playing music, this addon will start a slideshow of
images from Last.FM, of the current artist. Tip: Pressing "i" during a
slideshow will show the music player info.</description>
- <disclaimer>Requires - Settings -> Network -> Services -> Allow
controll of XBMC via HTTP</disclaimer>
<platform>all</platform>
</extension>
</addon>
\ No newline at end of file
diff --git a/script.image.lastfm.slideshow/default.py
b/script.image.lastfm.slideshow/default.py
index fa142fe..64b3c73 100644
--- a/script.image.lastfm.slideshow/default.py
+++ b/script.image.lastfm.slideshow/default.py
@@ -1,10 +1,9 @@
-import urllib,urllib2,re,os
+import urllib,urllib2,re
import xbmcaddon,xbmcgui
from BeautifulSoup import BeautifulSoup
__settings__ = xbmcaddon.Addon(id='script.image.lastfm.slideshow')
__language__ = __settings__.getLocalizedString
-portnum = __settings__.getSetting('port_number')
def SlideShow():
class MyPlayer( xbmc.Player ) :
@@ -43,12 +42,10 @@ def SlideShow():
response.close()
soup = BeautifulSoup(link)
images = soup('image')
- useradd = xbmc.getIPAddress()+':'+portnum
- HTTP_API_url =
"http://%s/xbmcCmds/xbmcHttp?command="%useradd
- urllib.urlopen(HTTP_API_url + "ClearSlideshow" )
+ xbmc.executehttpapi("ClearSlideshow")
for image in images:
url = image.size.string
- urllib.urlopen(HTTP_API_url +
"AddToSlideshow(%s)" % url)
+ xbmc.executehttpapi("AddToSlideshow(%s)" % url)
xbmc.executebuiltin( "SlideShow(,,notrandom)" )
MyPlayer().onPlayBackStarted()
diff --git
a/script.image.lastfm.slideshow/resources/language/English/strings.xml
b/script.image.lastfm.slideshow/resources/language/English/strings.xml
index 6b10bbd..124004b 100644
--- a/script.image.lastfm.slideshow/resources/language/English/strings.xml
+++ b/script.image.lastfm.slideshow/resources/language/English/strings.xml
@@ -2,7 +2,7 @@
<strings>
<string id="30000">Last.FM SlideShow</string>
<string id="30001">Try playing some music first!</string>
- <string id="30002">HTTP Port:</string>
+ <string id="30002"></string>
<string id="30003"></string>
<string id="30004"></string>
<string id="30005"></string>
-----------------------------------------------------------------------
Summary of changes:
script.image.lastfm.slideshow/addon.xml | 3 +--
script.image.lastfm.slideshow/changelog.txt | 5 +++++
script.image.lastfm.slideshow/default.py | 9 +++------
.../resources/language/English/strings.xml | 2 +-
.../resources/settings.xml | 4 ----
script.xbmc.subtitles/addon.xml | 4 ++--
script.xbmc.subtitles/changelog.txt | 9 +++++++++
script.xbmc.subtitles/default.py | 2 +-
script.xbmc.subtitles/resources/lib/gui.py | 20 ++++++++++++++++----
.../resources/lib/services/Bierdopje/service.py | 4 +++-
.../lib/services/OpenSubtitles/service.py | 10 +++++++---
.../resources/lib/services/Podnapisi/service.py | 9 ++++++---
12 files changed, 54 insertions(+), 27 deletions(-)
create mode 100644 script.image.lastfm.slideshow/changelog.txt
delete mode 100644 script.image.lastfm.slideshow/resources/settings.xml
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons