The branch, dharma has been updated
via 0643b30b25eacd5ae87eb4e5fb4310567654e566 (commit)
from 464cbea16a67578d3dabaada807fd6ee1435202c (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=0643b30b25eacd5ae87eb4e5fb4310567654e566
commit 0643b30b25eacd5ae87eb4e5fb4310567654e566
Author: amet <[email protected]>
Date: Thu Mar 24 13:21:12 2011 +0400
[ script.image.bigpictures0 -v1.4.0
Changed: Skin has a new Look - thanks to Jezz_X
Changed: Skin is now animated
Changed: Dedicated Usage-Help-Box (hides if any key is pressed)
Added: French Translation
Changed: Split Sourcename, Albumtitle and Picturetitle for different use
in 3rd party Skins
Improved: The toggle "showInfo" stays now in its last state
Improved: Respect pep8 styleguide (except line length...)
Improved: Skin XML-File is now clean
diff --git a/script.image.bigpictures/addon.xml
b/script.image.bigpictures/addon.xml
index 8288568..628b4be 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="1.3.2"
provider-name="sphere">
+<addon id="script.image.bigpictures" name="The Big Picture" version="1.4.0"
provider-name="sphere">
<requires>
<import addon="xbmc.python" version="1.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
@@ -10,10 +10,12 @@
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<summary lang="de">Zeigt Alben/Bilder von Photojournalismus-Seiten wie
Boston.com's "The Big Pictures"</summary>
- <summary lang="en">Shows Albums/Pictures from photojournalism site's like
Boston.com's 'The Big Picture'</summary>
+ <summary lang="en">Shows Albums/Photos from photojournalism site's like
Boston.com's 'The Big Picture'</summary>
+ <summary lang="fr">Affichage d'albums/photos de sites photojournalistiques
comme Boston.com "The big picture"</summary>
<summary lang="nl">Bladen door fotojournalistiek albums en afbeeldingen
zoals Boston.com's 'The Big Picture'</summary>
<description lang="de">Die Quelle kann mit hoch und runter gewechselt
werden - das album mit links und rechts[CR]Mit select wird das Album
geöffnet.[CR]Herunterladen der Bilder ist mit der Kontext-Menu Taste
möglich.[CR]Aktuell sind die folgenden Quellen verfügbar:[CR] - Boston.com:
The Big Picture[CR] - Boston.com: The Big Shot[CR] - Sacramento Bee: The
Frame[CR] - Wallstreetjournal: The Photo Journal</description>
<description lang="en">You can switch the source with up and down, switch
the album with left and right[CR]With select-key you can enter an album to view
its content.[CR]Picture Downloading is possible with the context menu
key.[CR]Currently the following Sources are included:[CR] - Boston.com: The Big
Picture[CR] - Boston.com: The Big Shot[CR] - Sacramento Bee: The Frame[CR] -
Wallstreetjournal: The Photo Journal</description>
+ <description lang="fr">Vous pouvez changer la source avec haut et bas,
changer l'album avec gauche et droite.[CR]Avec la touche entrée vous pouvez
ouvrir et visualiser un album.[CR]Le téléchargement de photos est possible
grâce au menu contextuel[CR]Actuellement les sources suivantes sont
incluses:[CR] - Boston.com: The Big Picture[CR] - Boston.com: The Big Shot[CR]
- Sacramento Bee: The Frame[CR] - Wallstreetjournal: The Photo
Journal</description>
<description lang="nl">U kunt de bron veranderen door de Boven en Beneden
toets te gebruiken; wisselen van album door de Links en Rechts toets te
gebruiken [CR]Met de Enter toets bekijkt u de inhoud van het
album.[CR]Afbeeldingen downloaden is mogelijk door gebruik te maken van het
Context menu.[CR]De volgende bronnen zijn aanwezig:[CR] - Boston.com: The Big
Picture[CR] - Boston.com: The Big Shot[CR] - Sacramento Bee: The Frame[CR] -
Wallstreetjournal: The Photo Journal</description>
</extension>
</addon>
diff --git a/script.image.bigpictures/changelog.txt
b/script.image.bigpictures/changelog.txt
index fd0ffc5..ade33e9 100644
--- a/script.image.bigpictures/changelog.txt
+++ b/script.image.bigpictures/changelog.txt
@@ -1,3 +1,13 @@
+1.4.0
+ Changed: Skin has a new Look - thanks to Jezz_X
+ Changed: Skin is now animated
+ Changed: Dedicated Usage-Help-Box (hides if any key is pressed)
+ Added: French Translation
+ Changed: Split Sourcename, Albumtitle and Picturetitle for different use in
3rd party Skins
+ Improved: The toggle "showInfo" stays now in its last state
+ Improved: Respect pep8 styleguide (except line length...)
+ Improved: Skin XML-File is now clean
+
1.3.2
Changed: Don't use 'os.getcwd()'
Improved: author, name, id, version only at one place
diff --git a/script.image.bigpictures/resources/lib/gui.py
b/script.image.bigpictures/resources/lib/gui.py
index 209ef57..d3510a4 100644
--- a/script.image.bigpictures/resources/lib/gui.py
+++ b/script.image.bigpictures/resources/lib/gui.py
@@ -9,15 +9,16 @@ import sbb_scraper
import wsj_scraper
Addon = sys.modules['__main__'].Addon
-#enable localization
+# enable localization
getLS = Addon.getLocalizedString
class GUI(xbmcgui.WindowXML):
- #Label Controls
+ # Label Controls
CONTROL_MAIN_IMAGE = 100
CONTROL_USAGE_TEXT = 103
- #Label Actions
+ CONTROL_USAGE_BG = 104
+ # Label Actions
ACTION_CONTEXT_MENU = [117]
ACTION_MENU = [122]
ACTION_PREVIOUS_MENU = [9]
@@ -25,9 +26,10 @@ class GUI(xbmcgui.WindowXML):
ACTION_EXIT_SCRIPT = [10, 13]
ACTION_DOWN = [4]
ACTION_UP = [3]
+ ACTION_ANYKEY = [117, 122, 9, 11, 10, 13, 4, 3, 1, 2]
ACTIVESOURCE = 0
-
+
SOURCES = list()
SOURCES.append({'name': 'Boston.com: The Big Picture', 'object': 'tbp',
'url': 'http://www.boston.com/bigpicture/'})
SOURCES.append({'name': 'Boston.com: The Big Shot', 'object': 'tbp',
'url': 'http://www.boston.com/sports/blogs/bigshots/'})
@@ -41,13 +43,16 @@ class GUI(xbmcgui.WindowXML):
self.wsj = wsj_scraper.WSJ()
def onInit(self):
- self.getControl(102).setLabel(getLS(32001)) #fixme
+ self.showInfo = 'true'
+ self.getControl(102).setLabel(getLS(32001)) # fixme
self.showAlbums()
def onFocus(self, controlId):
pass
def onAction(self, action):
+ if action in self.ACTION_ANYKEY:
+ self.toggleHelp('false')
if action in self.ACTION_SHOW_INFO:
self.toggleInfo()
elif action in self.ACTION_CONTEXT_MENU:
@@ -90,26 +95,35 @@ class GUI(xbmcgui.WindowXML):
if self.getProperty('showInfo') == 'false':
for i in range(selectedControl.size()):
selectedControl.getListItem(i).setProperty('showInfo', 'true')
- self.getControl(self.CONTROL_USAGE_TEXT).setVisible(True)
+ self.showInfo = 'true'
else:
for i in range(selectedControl.size()):
selectedControl.getListItem(i).setProperty('showInfo', 'false')
- self.getControl(self.CONTROL_USAGE_TEXT).setVisible(False)
+ self.showInfo = 'false'
+
+ def toggleHelp(self, show):
+ selectedControl = self.getControl(self.CONTROL_USAGE_TEXT)
+ if show == 'false':
+ self.getControl(self.CONTROL_USAGE_TEXT).setVisible(False)
+ self.getControl(self.CONTROL_USAGE_BG).setVisible(False)
+ elif show == 'true':
+ self.getControl(self.CONTROL_USAGE_TEXT).setVisible(True)
+ self.getControl(self.CONTROL_USAGE_BG).setVisible(True)
def download(self):
- #get writable directory
+ # get writable directory
downloadPath = xbmcgui.Dialog().browse(3, ' '.join([getLS(32020),
getLS(32022)]), 'pictures')
if downloadPath:
if self.getProperty('type') == 'photo':
- photos = [{'pic':self.getProperty('pic'), 'title': ''}] #url
needs to be passed as a dict in a list.
- imageDownloader.Download(photos, downloadPath)
+ photos = [{'pic':self.getProperty('pic'), 'title': ''}] # url
needs to be passed as a dict in a list.
+ imageDownloader.Download(photos, downloadPath)
elif self.getProperty('type') == 'album':
- pDialog = xbmcgui.DialogProgress() #show useless dialog so
user knows something is happening.
+ pDialog = xbmcgui.DialogProgress() # show useless dialog so
user knows something is happening.
pDialog.create(self.SOURCES[self.ACTIVESOURCE]['name'])
link = self.getProperty('link')
pDialog.update(50)
if self.SOURCES[self.ACTIVESOURCE]['object'] == 'tbp':
- self.tbp.getPhotos(link) # Get a list of photos from the
link.
+ self.tbp.getPhotos(link) # Get a list of photos from the
link.
photos = self.tbp.photos
elif self.SOURCES[self.ACTIVESOURCE]['object'] == 'sbb':
self.sbb.getPhotos(link)
@@ -123,12 +137,13 @@ class GUI(xbmcgui.WindowXML):
pDialog.close()
imageDownloader.Download(photos, downloadPath)
- def showPhotos(self): #the order is significant!
+ def showPhotos(self): # the order is significant!
+ self.toggleHelp('true')
self.getControl(self.CONTROL_USAGE_TEXT).setText('\n'.join([getLS(32030),
getLS(32031), getLS(32032)]))
link = self.getProperty('link')
- self.getControl(self.CONTROL_MAIN_IMAGE).reset() #Clear the old list
of albums.
+ self.getControl(self.CONTROL_MAIN_IMAGE).reset() # Clear the old list
of albums.
if self.SOURCES[self.ACTIVESOURCE]['object'] == 'tbp':
- self.tbp.getPhotos(link) # Get a list of photos from the link.
+ self.tbp.getPhotos(link) # Get a list of photos from the link.
photos = self.tbp.photos
elif self.SOURCES[self.ACTIVESOURCE]['object'] == 'sbb':
self.sbb.getPhotos(link)
@@ -141,8 +156,9 @@ class GUI(xbmcgui.WindowXML):
self.showItems(photos, 'photo')
def showAlbums(self):
+ self.toggleHelp('true')
self.getControl(self.CONTROL_USAGE_TEXT).setText('\n'.join([getLS(32040),
getLS(32041), getLS(32042)]))
- self.getControl(self.CONTROL_MAIN_IMAGE).reset() #This is necessary
when returning from photos.
+ self.getControl(self.CONTROL_MAIN_IMAGE).reset() # This is necessary
when returning from photos.
if self.SOURCES[self.ACTIVESOURCE]['object'] == 'tbp':
self.tbp.getAlbums(self.SOURCES[self.ACTIVESOURCE]['url'])
albums = self.tbp.albums
@@ -159,13 +175,18 @@ class GUI(xbmcgui.WindowXML):
def showItems(self, itemSet, type):
total = len(itemSet)
for i, item in enumerate(itemSet):
- item['showInfo'] = 'true'
+ item['showInfo'] = self.showInfo
item['type'] = type
- item['title'] = self.SOURCES[self.ACTIVESOURCE]['name'] + '\n' +
item['title'] + ' (%s/%s)' % (i+1, total)
+ # album = Name of the actual Source: "Boston.com: The Big Picture"
+ item['album'] = self.SOURCES[self.ACTIVESOURCE]['name']
+ # title = Title of this Album or Picture: "Best Pictures of the
Week"
+ item['title'] = item['title']
+ # duration = act-element/len-elements: "1/12"
+ item['duration'] = '%s/%s' % (i + 1, total) # fixme: find
something better then this
self.addListItem(self.CONTROL_MAIN_IMAGE, item)
def addListItem(self, controlId, properties):
- #print properties
+ # print properties
li = xbmcgui.ListItem(label=properties['title'],
label2=properties['description'], iconImage=properties['pic'])
for p in properties.keys():
li.setProperty(p, properties[p])
diff --git a/script.image.bigpictures/resources/lib/imageDownloader.py
b/script.image.bigpictures/resources/lib/imageDownloader.py
index 42e4201..a6fcbe6 100644
--- a/script.image.bigpictures/resources/lib/imageDownloader.py
+++ b/script.image.bigpictures/resources/lib/imageDownloader.py
@@ -12,6 +12,7 @@ getLS = Addon.getLocalizedString
scriptName = sys.modules['__main__'].__scriptname__
+
class Download:
def __init__(self, photos, downloadPath):
@@ -22,18 +23,18 @@ class Download:
for i, photo in enumerate(photos):
self.url = photo['pic']
- self.index = str(i+1)
+ self.index = str(i + 1)
#unicode causes problems here, convert to standard str
self.filename = '_'.join([str(i), str(self.url.split('/')[-1])])
- foldername = re.sub('[^\w\s-]', '', str(photo['title'])) #
download folder should be named like the album
+ foldername = re.sub('[^\w\s-]', '', str(photo['title'])) #
download folder should be named like the album
self.fullDownloadPath = os.path.join(downloadPath, foldername,
self.filename)
#print '[SCRIPT][%s] %s : Attempting to download %s of %s' %
(scriptName, __name__, i+1, len(photos))
- print '[SCRIPT][%s] %s --> %s\n' % (scriptName, self.url,
self.fullDownloadPath)
+ print '[SCRIPT][%s] %s --> %s\n' % (scriptName, self.url,
self.fullDownloadPath)
if self.checkPath(downloadPath, foldername, self.filename):
try:
- dl = urllib.urlretrieve(self.url, self.fullDownloadPath,
reporthook = self.showdlProgress)
- print '[SCRIPT][%s] Download Success!' % (scriptName)
+ dl = urllib.urlretrieve(self.url, self.fullDownloadPath,
reporthook=self.showdlProgress)
+ print '[SCRIPT][%s] Download Success!' % scriptName
except IOError, e:
print e
self.pDialog.close()
@@ -47,20 +48,20 @@ class Download:
self.pDialog.close()
def showdlProgress(self, count, blockSize, totalSize):
- percent = int(count*blockSize*100/totalSize)
+ percent = int(count * blockSize * 100 / totalSize)
enum = '%s %s %s' % (self.index, getLS(32025), self.len)
fromPath = '%s %s' % (getLS(32023), self.url)
toPath = '%s %s' % (getLS(32024), self.fullDownloadPath)
self.pDialog.update(percent, enum, fromPath, toPath)
-
+
def checkPath(self, path, folder, filename):
if os.path.isdir(path):
if os.path.isdir(os.path.join(path, folder)):
if os.path.isfile(os.path.join(path, folder, filename)):
- if not os.path.getsize(os.path.join(path, folder,
filename))>0:
- return True #overwrite empty files, #skip others.
+ if not os.path.getsize(os.path.join(path, folder,
filename)) > 0:
+ return True # overwrite empty files, #skip others.
else:
return True
else:
os.mkdir(os.path.join(path, folder))
- self.checkPath(path, folder, filename) #check again after
creating directory
+ self.checkPath(path, folder, filename) # check again after
creating directory
diff --git a/script.image.bigpictures/resources/lib/sbb_scraper.py
b/script.image.bigpictures/resources/lib/sbb_scraper.py
index 736e1eb..8309e0c 100644
--- a/script.image.bigpictures/resources/lib/sbb_scraper.py
+++ b/script.image.bigpictures/resources/lib/sbb_scraper.py
@@ -8,12 +8,12 @@ scriptName = sys.modules['__main__'].__scriptname__
class SBB:
- def getHTML(self, url, headers = [('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
+ def getHTML(self, url, headers=[('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
"""Returns HTML from a given URL"""
opener = urllib2.build_opener()
opener.addheaders = headers
try:
- print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
+ # print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
usock = opener.open(url)
response = usock.read()
usock.close()
@@ -37,9 +37,9 @@ class SBB:
for ns in s:
tmp.append(str(ns))
s = ''.join(tmp)
- s = re.sub('\s+', ' ', s) #remove extra spaces
- s = re.sub('<.+?>|Image:.+?\r|\r', '', s) #remove htmltags, image
captions, & newlines
- s = s.replace(''', '\'') #replace html-encoded double-quotes
+ s = re.sub('\s+', ' ', s) # remove extra spaces
+ s = re.sub('<.+?>|Image:.+?\r|\r', '', s) # remove htmltags, image
captions, & newlines
+ s = s.replace(''', '\'') # replace html-encoded double-quotes
s = s.strip()
return s
diff --git a/script.image.bigpictures/resources/lib/tbp_scraper.py
b/script.image.bigpictures/resources/lib/tbp_scraper.py
index 6be8e27..452af96 100644
--- a/script.image.bigpictures/resources/lib/tbp_scraper.py
+++ b/script.image.bigpictures/resources/lib/tbp_scraper.py
@@ -8,12 +8,12 @@ scriptName = sys.modules['__main__'].__scriptname__
class TBP:
- def getHTML(self, url, headers = [('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
+ def getHTML(self, url, headers=[('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
"""Returns HTML from a given URL"""
opener = urllib2.build_opener()
opener.addheaders = headers
try:
- print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
+ # print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
usock = opener.open(url)
response = usock.read()
usock.close()
@@ -37,10 +37,10 @@ class TBP:
for ns in s:
tmp.append(str(ns))
s = ''.join(tmp)
- s = re.sub('\s+', ' ', s) #remove extra spaces
- s = re.sub('<.+?>|Image:.+?\r|\r', '', s) #remove htmltags, image
captions, & newlines
- s = s.replace(''', '\'') #replace html-encoded double-quotes
- s = re.sub('#$', '', s) #remove hash at the end
+ s = re.sub('\s+', ' ', s) # remove extra spaces
+ s = re.sub('<.+?>|Image:.+?\r|\r', '', s) # remove htmltags, image
captions, & newlines
+ s = s.replace(''', '\'') # replace html-encoded double-quotes
+ s = re.sub('#$', '', s) # remove hash at the end
s = s.strip()
return s
@@ -50,7 +50,7 @@ class TBP:
tree = BeautifulSoup(self.getHTML(url))
self.months = list()
self.categories = list()
- optionNodes = tree.findAll('option', value = re.compile('.+?'))
+ optionNodes = tree.findAll('option', value=re.compile('.+?'))
for node in optionNodes:
if node.parent.option.contents[0] == 'Select a month':
self.months.append([node.string, node['value']])
diff --git a/script.image.bigpictures/resources/lib/wsj_scraper.py
b/script.image.bigpictures/resources/lib/wsj_scraper.py
index 0c08647..7bbb67a 100644
--- a/script.image.bigpictures/resources/lib/wsj_scraper.py
+++ b/script.image.bigpictures/resources/lib/wsj_scraper.py
@@ -8,12 +8,12 @@ scriptName = sys.modules['__main__'].__scriptname__
class WSJ:
- def getHTML(self, url, headers = [('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
+ def getHTML(self, url, headers=[('User-Agent', 'Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')]):
"""Returns HTML from a given URL"""
opener = urllib2.build_opener()
opener.addheaders = headers
try:
- print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
+ # print '[SCRIPT][%s] %s attempting to open %s' % (scriptName,
__name__, url)
usock = opener.open(url)
response = usock.read()
usock.close()
@@ -37,11 +37,11 @@ class WSJ:
for ns in s:
tmp.append(str(ns))
s = ''.join(tmp)
- s = re.sub('\s+', ' ', s) #remove extra spaces
- s = re.sub('<.+?>|Image:.+?\r|\r', '', s) #remove htmltags, image
captions, & newlines
- s = s.replace(''', '\'') #replace html-encoded double-quotes
- s = s.replace('’', '\'') #replace html-encoded single-quotes
- s = s.replace('”', '"') #replace html-encoded double-quotes
+ s = re.sub('\s+', ' ', s) # remove extra spaces
+ s = re.sub('<.+?>|Image:.+?\r|\r', '', s) # remove htmltags, image
captions, & newlines
+ s = s.replace(''', '\'') # replace html-encoded double-quotes
+ s = s.replace('’', '\'') # replace html-encoded single-quotes
+ s = s.replace('”', '"') # replace html-encoded double-quotes
s = s.strip()
return s
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 6e446e9..851760d 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
@@ -4,6 +4,7 @@
<controls>
<control type="group">
<control type="image">
+ <description>Black Background</description>
<posx>0</posx>
<posy>0</posy>
<width>1280</width>
@@ -11,23 +12,15 @@
<texture>black.png</texture>
</control>
<control type="image">
- <posx>574</posx>
- <posy>294</posy>
+ <description>The spinning animation in the
background</description>
+ <posx>607</posx>
+ <posy>327</posy>
<width>66</width>
<height>66</height>
<texture>loader.gif</texture>
</control>
- <control type="label" id="101">
- <posx>20</posx>
- <posy>35</posy>
- <width>1200</width>
- <height>100</height>
- <align>left</align>
- <aligny>top</aligny>
- <label></label>
- <textcolor>FFAAAAAA</textcolor>
- </control>
<control type="label" id="102">
+ <description>"Image Loading may take a while"</description>
<posx>20</posx>
<posy>60</posy>
<width>1200</width>
@@ -39,17 +32,17 @@
<font>font13</font>
</control>
<control type="list" id="100">
- <!--Main List of Images-->
+ <description>Main list of Images</description>
<posx>0</posx>
<posy>0</posy>
<width>1280</width>
<height>720</height>
<scrolltime>200</scrolltime>
<orientation>horizontal</orientation>
- <preloaditems>5</preloaditems>
+ <preloaditems>10</preloaditems>
<itemlayout width="1280" height="720">
- <control type="image">
- <!--The Picture-->
+ <control type="largeimage">
+ <description>The Picture</description>
<posx>0</posx>
<posy>0</posy>
<width>1280</width>
@@ -58,33 +51,49 @@
<texture
background="true">$INFO[ListItem.Icon]</texture>
<aspectratio>scale</aspectratio>
</control>
- <control type="image">
- <!--background for title-->
- <posx>0</posx>
- <posy>0</posy>
- <width>1280</width>
- <height>100</height>
- <texture>black.png</texture>
- <colordiffuse>CCFFFFFF</colordiffuse>
- <visible>$INFO[ListItem.Property(showInfo)]</visible>
- </control>
<control type="label">
- <!--label for title-->
+ <description>Label for the Source title</description>
<posx>20</posx>
<posy>10</posy>
- <width>1200</width>
- <height>100</height>
+ <width>320</width>
+ <height>20</height>
<align>left</align>
- <aligny>top</aligny>
+ <aligny>center</aligny>
+ <label>$INFO[ListItem.Property(Album)]</label>
+ <textcolor>FFDDDDDD</textcolor>
+ <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <font>font13</font>
+ </control>
+ <control type="label">
+ <description>Label for Album or Picture
title</description>
+ <posx>640</posx>
+ <posy>10</posy>
+ <width>640</width>
+ <height>20</height>
+ <align>center</align>
+ <aligny>center</aligny>
<label>$INFO[ListItem.Label]</label>
<textcolor>FFDDDDDD</textcolor>
<visible>$INFO[ListItem.Property(showInfo)]</visible>
<font>font13</font>
</control>
+ <control type="label">
+ <description>Label (x/y)</description>
+ <posx>1260</posx>
+ <posy>10</posy>
+ <width>320</width>
+ <height>20</height>
+ <align>right</align>
+ <aligny>center</aligny>
+ <label>($INFO[ListItem.Property(duration)])</label>
+ <textcolor>FFDDDDDD</textcolor>
+ <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <font>font13</font>
+ </control>
</itemlayout>
<focusedlayout width="1280" height="720">
- <control type="image">
- <!--the picture-->
+ <control type="largeimage">
+ <description>The Picture</description>
<posx>0</posx>
<posy>0</posy>
<width>1280</width>
@@ -94,77 +103,108 @@
<aspectratio>scale</aspectratio>
</control>
<control type="image">
- <!--background for title-->
+ <description>Background for the Headline</description>
<posx>0</posx>
<posy>0</posy>
<width>1280</width>
- <height>100</height>
- <texture>black.png</texture>
- <colordiffuse>CCFFFFFF</colordiffuse>
+ <height>64</height>
+ <texture border="0,0,20,0">HeaderBack.png</texture>
+ <colordiffuse>AAFFFFFF</colordiffuse>
<visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="label">
- <!--label for title-->
+ <description>Label for the Source title</description>
<posx>20</posx>
<posy>10</posy>
- <width>1200</width>
- <height>100</height>
- <font>font48b</font>
+ <width>480</width>
+ <height>20</height>
<align>left</align>
- <aligny>top</aligny>
+ <aligny>center</aligny>
+ <label>$INFO[ListItem.Property(Album)]</label>
+ <textcolor>FFDDDDDD</textcolor>
+ <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <font>font13</font>
+ <animation effect="fade"
time="200">VisibleChange</animation>
+ </control>
+ <control type="label">
+ <description>Label for Album or Picture
title</description>
+ <posx>640</posx>
+ <posy>10</posy>
+ <width>640</width>
+ <height>20</height>
+ <align>center</align>
+ <aligny>center</aligny>
<label>$INFO[ListItem.Label]</label>
<textcolor>FFDDDDDD</textcolor>
<visible>$INFO[ListItem.Property(showInfo)]</visible>
<font>font13</font>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
- <!--<control type="image">
+ <control type="label">
+ <description>Label (x/y)</description>
+ <posx>1260</posx>
+ <posy>10</posy>
+ <width>320</width>
+ <height>20</height>
+ <align>right</align>
+ <aligny>center</aligny>
+ <label>($INFO[ListItem.Property(duration)])</label>
+ <textcolor>FFDDDDDD</textcolor>
+ <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <font>font13</font>
+ <animation effect="fade"
time="200">VisibleChange</animation>
+ </control>
+ <control type="image">
+ <description>Arrow left</description>
<animation type="Focus">
- <effect type="fade" start="70" end="100"
time="100" delay="500"/>
+ <effect type="slide" start="-50,0" end="0"
time="100" delay="2000"/>
+ <effect type="fade" start="0" end="100" time="100"
delay="2000"/>
</animation>
- <posx>600</posx>
- <posy>320</posy>
- <width>80</width>
- <height>80</height>
- <texture>play_.png</texture>
- </control>-->
- <control type="image">
<posx>10</posx>
<posy>320</posy>
<width>80</width>
<height>80</height>
<texture>left.png</texture>
- <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <visible>$INFO[ListItem.Property(showInfo)] +
Container(100).HasPrevious</visible>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="image">
+ <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"/>
+ </animation>
<posx>1190</posx>
<posy>320</posy>
<width>80</width>
<height>80</height>
<texture>right.png</texture>
- <visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <visible>$INFO[ListItem.Property(showInfo)] +
Container(100).HasNext</visible>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="image">
- <!--background for description-->
+ <description>Background for description</description>
<animation type="Focus">
- <effect type="slide" start="0,215" end="0,0"
time="100" delay="200"/>
+ <effect type="fade" start="0" end="100" time="100"
delay="2000"/>
</animation>
<posx>0</posx>
- <posy>500</posy>
+ <posy>450</posy>
<width>1280</width>
- <height>220</height>
- <texture>black.png</texture>
- <colordiffuse>CCFFFFFF</colordiffuse>
+ <height>270</height>
+ <texture>DescriptionBack.png</texture>
<visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
<control type="textbox">
- <!--text of description-->
+ <description>Description Text</description>
<animation type="Focus">
- <effect type="slide" start="0,215" end="0,0"
time="100" delay="200"/>
+ <effect type="fade" start="0" end="100" time="100"
delay="2000"/>
</animation>
<posx>20</posx>
- <posy>505</posy>
+ <posy>560</posy>
<width>1240</width>
- <height>215</height>
+ <height>150</height>
<font>font28</font>
<align>left</align>
<aligny>top</aligny>
@@ -173,19 +213,31 @@
<label>$INFO[ListItem.Label2]</label>
<textcolor>white</textcolor>
<visible>$INFO[ListItem.Property(showInfo)]</visible>
+ <animation effect="fade"
time="200">VisibleChange</animation>
</control>
</focusedlayout>
</control>
+ <control type="image" id="104">
+ <description>Background for Usage Instructions</description>
+ <posx>450</posx>
+ <posy>232</posy>
+ <width>380</width>
+ <height>150</height>
+ <texture border="20">UsageBack.png</texture>
+ <colordiffuse>CCFFFFFF</colordiffuse>
+ <visible>true</visible>
+ </control>
<control type="textbox" id="103">
- <!--usage instructions-->
- <posx>20</posx>
- <posy>10</posy>
- <width>1200</width>
- <height>120</height>
- <align>right</align>
+ <description>Usage Instructions</description>
+ <posx>490</posx>
+ <posy>260</posy>
+ <width>300</width>
+ <height>100</height>
+ <align>center</align>
<aligny>top</aligny>
- <textcolor>FFAAAAAA</textcolor>
+ <textcolor>FFFFFFFF</textcolor>
<font>font13</font>
+ <visible>true</visible>
</control>
</control>
</controls>
diff --git a/script.image.bigpictures/runscript.py
b/script.image.bigpictures/runscript.py
index cae517d..018104f 100644
--- a/script.image.bigpictures/runscript.py
+++ b/script.image.bigpictures/runscript.py
@@ -4,7 +4,7 @@ import xbmcaddon
Addon = xbmcaddon.Addon('script.image.bigpictures')
# Script constants
-__scriptname__ = Addon.getAddonInfo('name')
+__scriptname__ = Addon.getAddonInfo('name')
__id__ = Addon.getAddonInfo('id')
__author__ = Addon.getAddonInfo('author')
__version__ = Addon.getAddonInfo('version')
@@ -14,7 +14,11 @@ print '[SCRIPT][%s] version %s initialized!' %
(__scriptname__, __version__)
if (__name__ == '__main__'):
import resources.lib.gui as gui
- ui = gui.GUI( 'script-' + __scriptname__ + '-main.xml', __path__,
'default' )
+ ui = gui.GUI('script-%s-main.xml' % __scriptname__,
+ __path__,
+ 'default')
ui.doModal()
+ print '[SCRIPT][%s] version %s exited!' % (__scriptname__, __version__)
del ui
sys.modules.clear()
+
-----------------------------------------------------------------------
Summary of changes:
script.image.bigpictures/addon.xml | 6 +-
script.image.bigpictures/changelog.txt | 10 +
.../resources/language/French/strings.xml | 21 +++
script.image.bigpictures/resources/lib/gui.py | 59 ++++--
.../resources/lib/imageDownloader.py | 21 ++-
.../resources/lib/sbb_scraper.py | 10 +-
.../resources/lib/tbp_scraper.py | 14 +-
.../resources/lib/wsj_scraper.py | 14 +-
.../default/720p/script-The Big Picture-main.xml | 190 +++++++++++++-------
.../skins/default/media/DescriptionBack.png | Bin 2872 -> 2886 bytes
.../resources/skins/default/media/HeaderBack.png | Bin 0 -> 16533 bytes
.../resources/skins/default/media/UsageBack.png | Bin 0 -> 7807 bytes
.../resources/skins/default/media/down.png | Bin 2496 -> 0 bytes
.../resources/skins/default/media/up.png | Bin 2453 -> 0 bytes
script.image.bigpictures/runscript.py | 8 +-
15 files changed, 232 insertions(+), 121 deletions(-)
create mode 100644
script.image.bigpictures/resources/language/French/strings.xml
copy
script.module.dialogaddonscan/resources/skins/default/media/ProgressBack.png =>
script.image.bigpictures/resources/skins/default/media/DescriptionBack.png (93%)
create mode 100644
script.image.bigpictures/resources/skins/default/media/HeaderBack.png
create mode 100644
script.image.bigpictures/resources/skins/default/media/UsageBack.png
delete mode 100644
script.image.bigpictures/resources/skins/default/media/down.png
delete mode 100644
script.image.bigpictures/resources/skins/default/media/up.png
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons