The branch, eden has been updated
via bc47a12e4351638d9d421c599f58e9e7b7e7fde5 (commit)
via 83f62a3bdc9b8758087f108cdfa58d172667916d (commit)
from b536d91fb4c1482a44c6248d1121fe9be4adc996 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=bc47a12e4351638d9d421c599f58e9e7b7e7fde5
commit bc47a12e4351638d9d421c599f58e9e7b7e7fde5
Author: amet <[email protected]>
Date: Fri Oct 5 00:58:51 2012 +0400
[script.game.whatthemovie] -v1.0.4
- Fix image retrieving
diff --git a/script.game.whatthemovie/addon.xml
b/script.game.whatthemovie/addon.xml
index 3f5a43d..defd2f8 100644
--- a/script.game.whatthemovie/addon.xml
+++ b/script.game.whatthemovie/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.game.whatthemovie"
name="WhatTheMovie"
- version="1.0.3"
+ version="1.0.4"
provider-name="sphere, tadi, skiller2k1">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/script.game.whatthemovie/changelog.txt
b/script.game.whatthemovie/changelog.txt
index c7dbfc2..66bb41c 100644
--- a/script.game.whatthemovie/changelog.txt
+++ b/script.game.whatthemovie/changelog.txt
@@ -1,5 +1,9 @@
+1.0.4
+- Fix image retrieving
+
1.0.3
- Fix white shot (website changes)
+- Catch HTTPError and URLError in background threads
1.0.2
- Multithreading background scraping of shots
diff --git a/script.game.whatthemovie/resources/lib/whatthemovie.py
b/script.game.whatthemovie/resources/lib/whatthemovie.py
index 326fc54..5c7b2d0 100644
--- a/script.game.whatthemovie/resources/lib/whatthemovie.py
+++ b/script.game.whatthemovie/resources/lib/whatthemovie.py
@@ -22,6 +22,7 @@
import re
import urllib
import urllib2
+import socket
import cookielib
import threading
import Queue
@@ -347,7 +348,11 @@ class WhatTheMovie(object):
# scrape the shot - this will take some time
is_new = False
while not is_new:
- shot = self.scrapeShot(job)
+ try:
+ shot = self.scrapeShot(job)
+ except (urllib2.HTTPError, socket.timeout):
+ print 'Timeout occured, trying again...'
+ continue
WhatTheMovie.Scraper.next_shots_lock.acquire()
if shot['shot_id'] in [s['shot_id'] for s in
WhatTheMovie.Scraper.next_shots]:
pass
@@ -367,6 +372,15 @@ class WhatTheMovie(object):
WhatTheMovie.Scraper.next_shots_lock.release()
WhatTheMovie.Scraper.jobs.task_done()
+ def download_file(self, url, local_file, referer=None):
+ req = urllib2.Request(url)
+ if referer:
+ req.add_header('Referer', referer)
+ res = urllib2.urlopen(req)
+ f = open(local_file, 'wb')
+ f.write(res.read())
+ f.close()
+
def scrapeShot(self, shot_request):
self.shot = dict()
shot_url = '%s/shot/%s' % (WhatTheMovie.MAIN_URL, shot_request)
@@ -391,13 +405,13 @@ class WhatTheMovie(object):
r_img = re.compile('background-image:url\("(.+?)"\)')
m_img = re.search(r_img, section.string)
if m_img:
- image_url = WhatTheMovie.MAIN_URL + m_img.group(1)
+ image_url = m_img.group(1)
subst_image_url = 'http://static.whatthemovie.com/images/subst'
if self.image_download_path:
if not image_url.startswith(subst_image_url):
local_image_file = '%s%s.jpg' % (self.image_download_path,
shot_id)
- urllib.urlretrieve(image_url, local_image_file, )
+ self.download_file(image_url, local_image_file,
referer=shot_url)
image_url = local_image_file
# languages
lang_list = dict()
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=83f62a3bdc9b8758087f108cdfa58d172667916d
commit 83f62a3bdc9b8758087f108cdfa58d172667916d
Author: amet <[email protected]>
Date: Fri Oct 5 00:58:13 2012 +0400
[script.xbmc.subtitles] -v3.3.4
- [fix] mkdirs for all temp folders
- [fix] make "subs" folder if it doesn't exist in destination folder
diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index f33dd25..d5b7246 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.3.3"
+ version="3.3.4"
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 fc79037..a6de992 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,7 @@
+3.3.4
+- [fix] mkdirs for all temp folders
+- [fix] make "subs" folder if it doesn't exist in destination folder
+
3.3.3
- [fix] safe streaming subtitle name
- xbmc.validatePath() should fix activating subs in some windows cases, thx
WiSo and Martijn
diff --git a/script.xbmc.subtitles/resources/lib/gui.py
b/script.xbmc.subtitles/resources/lib/gui.py
index 1a6e127..393a6a5 100644
--- a/script.xbmc.subtitles/resources/lib/gui.py
+++ b/script.xbmc.subtitles/resources/lib/gui.py
@@ -98,6 +98,9 @@ class GUI( xbmcgui.WindowXMLDialog ):
dialog = xbmcgui.Dialog()
self.sub_folder = dialog.browse( 0, _( 766 ), "files")
+ if not xbmcvfs.exists(self.sub_folder):
+ xbmcvfs.mkdirs(self.sub_folder)
+
if self.episode.lower().find("s") > -1: #
Check if season is "Special"
self.season = "0" #
self.episode = self.episode[-1:] #
diff --git a/script.xbmc.subtitles/resources/lib/utilities.py
b/script.xbmc.subtitles/resources/lib/utilities.py
index 791e3fd..b1af42d 100644
--- a/script.xbmc.subtitles/resources/lib/utilities.py
+++ b/script.xbmc.subtitles/resources/lib/utilities.py
@@ -173,7 +173,7 @@ def rem_files(directory):
except:
pass
- xbmcvfs.mkdir(directory)
+ xbmcvfs.mkdirs(directory)
def copy_files( subtitle_file, file_path ):
subtitle_set = False
-----------------------------------------------------------------------
Summary of changes:
script.game.whatthemovie/addon.xml | 2 +-
script.game.whatthemovie/changelog.txt | 4 ++++
.../resources/lib/whatthemovie.py | 20 +++++++++++++++++---
script.xbmc.subtitles/addon.xml | 2 +-
script.xbmc.subtitles/changelog.txt | 4 ++++
script.xbmc.subtitles/resources/lib/gui.py | 3 +++
script.xbmc.subtitles/resources/lib/utilities.py | 2 +-
7 files changed, 31 insertions(+), 6 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons