The branch, eden-pre has been updated
via 2744e13067e663f206015c8083507f12c0cbbddf (commit)
from 1f6990dd9a2c42d465a71557e6c7525fae06eb01 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=2744e13067e663f206015c8083507f12c0cbbddf
commit 2744e13067e663f206015c8083507f12c0cbbddf
Author: spiff <[email protected]>
Date: Mon Nov 7 15:22:22 2011 +0100
[script.image.bigpictures] -v2.0.1
diff --git a/.gitignore b/.gitignore
index eaa5927..ccf23e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ script.tvguide/.idea
script.cdartmanager/.git
script.module.parsedom/.hg
script.common.plugin.cache/.hg
+script.image.bigpictures/.git
diff --git a/script.image.bigpictures/addon.xml
b/script.image.bigpictures/addon.xml
index abc79c4..9cae486 100644
--- a/script.image.bigpictures/addon.xml
+++ b/script.image.bigpictures/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.image.bigpictures" name="The Big Picture" version="2.0.0"
provider-name="sphere">
+<addon id="script.image.bigpictures" name="The Big Picture" version="2.0.1"
provider-name="sphere">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
diff --git a/script.image.bigpictures/changelog.txt
b/script.image.bigpictures/changelog.txt
index b909511..c6f297f 100644
--- a/script.image.bigpictures/changelog.txt
+++ b/script.image.bigpictures/changelog.txt
@@ -1,3 +1,11 @@
+2.0.1
+ New plugin-way for scrapers
+ Fixed: Wallstreetjournal Scraper
+ Fixed: Sacramento Bee Scraper
+ Fixed: Visible-conditions in Eden
+ Fixed: Back-key in Eden
+ Code Improvements
+
2.0.0
Eden release
diff --git a/script.image.bigpictures/resources/lib/gui.py
b/script.image.bigpictures/resources/lib/gui.py
index c60f70a..46bcae8 100644
--- a/script.image.bigpictures/resources/lib/gui.py
+++ b/script.image.bigpictures/resources/lib/gui.py
@@ -1,12 +1,11 @@
import sys
+import os
import xbmcgui
import imageDownloader
import xbmcaddon
import xbmc
-from scrapers import aif, sbb, tbp, wsj
-
Addon = sys.modules['__main__'].Addon
getLS = Addon.getLocalizedString
getSetting = Addon.getSetting
@@ -20,7 +19,7 @@ class GUI(xbmcgui.WindowXML):
# Actions
ACTION_CONTEXT_MENU = [117]
ACTION_MENU = [122]
- ACTION_PREVIOUS_MENU = [9]
+ ACTION_PREVIOUS_MENU = [9, 92]
ACTION_SHOW_INFO = [11]
ACTION_EXIT_SCRIPT = [10, 13]
ACTION_DOWN = [4]
@@ -28,11 +27,18 @@ class GUI(xbmcgui.WindowXML):
ACTION_0 = [58]
def __init__(self, xmlFilename, scriptPath, defaultSkin, defaultRes):
- self.SOURCES = list()
- self.SOURCES.append(tbp.Scraper())
- self.SOURCES.append(aif.Scraper())
- self.SOURCES.append(sbb.Scraper())
- self.SOURCES.append(wsj.Scraper())
+ self.getScraper()
+
+ def getScraper(self):
+ addon_path = xbmc.translatePath(Addon.getAddonInfo('path'))
+ res_path = os.path.join(addon_path, 'resources', 'lib')
+ scrapers_path = os.path.join(res_path, 'scrapers')
+ scrapers = [f[:-3] for f in os.listdir(scrapers_path) \
+ if f.endswith('.py')]
+ sys.path.append(res_path)
+ sys.path.append(scrapers_path)
+ imported_modules = [__import__(scraper) for scraper in scrapers]
+ self.SOURCES = [m.register() for m in imported_modules]
def onInit(self):
self.show_info = 'true'
@@ -129,8 +135,8 @@ class GUI(xbmcgui.WindowXML):
def showPhotos(self):
link = self.getProperty('link')
- photos = self.Source.getPhotos(link)
self.getControl(self.CONTROL_MAIN_IMAGE).reset()
+ photos = self.Source.getPhotos(link)
self.showItems(photos, 'photo')
def showAlbums(self):
diff --git a/script.image.bigpictures/resources/skins/default/720p/script-The
Big Picture-main.xml
b/script.image.bigpictures/resources/skins/default/720p/script-The Big
Picture-main.xml
index 9a607d9..56e06fa 100644
--- a/script.image.bigpictures/resources/skins/default/720p/script-The Big
Picture-main.xml
+++ b/script.image.bigpictures/resources/skins/default/720p/script-The Big
Picture-main.xml
@@ -72,7 +72,7 @@
<aligny>center</aligny>
<label>$INFO[ListItem.Property(Album)]</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
</control>
<control type="label">
@@ -85,7 +85,7 @@
<aligny>center</aligny>
<label>$INFO[ListItem.Label]</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
</control>
<control type="label">
@@ -98,7 +98,7 @@
<aligny>center</aligny>
<label>($INFO[ListItem.Property(duration)])</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
</control>
</itemlayout>
@@ -133,7 +133,7 @@
<height>64</height>
<texture border="0,0,20,0">HeaderBack.png</texture>
<colordiffuse>AAFFFFFF</colordiffuse>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="label">
@@ -146,7 +146,7 @@
<aligny>center</aligny>
<label>$INFO[ListItem.Property(Album)]</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
@@ -160,7 +160,7 @@
<aligny>center</aligny>
<label>$INFO[ListItem.Label]</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
@@ -174,12 +174,12 @@
<aligny>center</aligny>
<label>($INFO[ListItem.Property(duration)])</label>
<textcolor>FFDDDDDD</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<font>font13</font>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="image">
- <description>Arrow left</description>
+ <description>Arrow
left</description>
<animation type="Focus">
<effect type="slide" start="-50,0" end="0"
time="100" delay="2000"/>
<effect type="fade" start="0" end="100" time="100"
delay="2000"/>
@@ -189,11 +189,11 @@
<width>80</width>
<height>80</height>
<texture>left.png</texture>
- <visible>$INFO[ListItem.Property(show_info)] +
Container(100).HasPrevious</visible>
+ <visible>ListItem.Property(show_info) +
Container(100).HasPrevious</visible>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="image">
- <description>Arrow right</description>
+ <description>Arrow
right</description>
<animation type="Focus">
<effect type="slide" start="50,0" end="0"
time="100" delay="2000"/>
<effect type="fade" start="0" end="100" time="100"
delay="2000"/>
@@ -203,7 +203,7 @@
<width>80</width>
<height>80</height>
<texture>right.png</texture>
- <visible>$INFO[ListItem.Property(show_info)] +
Container(100).HasNext</visible>
+ <visible>ListItem.Property(show_info) +
Container(100).HasNext</visible>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="image">
@@ -216,7 +216,7 @@
<width>1280</width>
<height>270</height>
<texture>DescriptionBack.png</texture>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="textbox">
@@ -235,7 +235,7 @@
<wrapmultiline>true</wrapmultiline>
<label>$INFO[ListItem.Label2]</label>
<textcolor>white</textcolor>
- <visible>$INFO[ListItem.Property(show_info)]</visible>
+ <visible>ListItem.Property(show_info)</visible>
<animation effect="fade"
time="200">VisibleChange</animation>
</control>
</focusedlayout>
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
script.image.bigpictures/addon.xml | 2 +-
script.image.bigpictures/changelog.txt | 8 +++
script.image.bigpictures/resources/lib/gui.py | 24 ++++++---
.../lib/{scrapers/parent.py => scraper.py} | 9 ++-
.../resources/lib/scrapers/{tbp.py => 1_tbp.py} | 15 +++--
.../resources/lib/scrapers/{aif.py => 2_aif.py} | 13 +++--
.../resources/lib/scrapers/{sbb.py => 3_sbb.py} | 16 ++++--
.../resources/lib/scrapers/4_wsj.py | 54 ++++++++++++++++++++
.../resources/lib/scrapers/wsj.py | 44 ----------------
.../default/720p/script-The Big Picture-main.xml | 26 +++++-----
11 files changed, 125 insertions(+), 87 deletions(-)
rename script.image.bigpictures/resources/lib/{scrapers/parent.py =>
scraper.py} (88%)
rename script.image.bigpictures/resources/lib/scrapers/{tbp.py => 1_tbp.py}
(86%)
rename script.image.bigpictures/resources/lib/scrapers/{aif.py => 2_aif.py}
(85%)
rename script.image.bigpictures/resources/lib/scrapers/{sbb.py => 3_sbb.py}
(82%)
create mode 100644 script.image.bigpictures/resources/lib/scrapers/4_wsj.py
delete mode 100644 script.image.bigpictures/resources/lib/scrapers/__init__.py
delete mode 100644 script.image.bigpictures/resources/lib/scrapers/wsj.py
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons