The branch, frodo has been updated
via 4a99e6d7241ede04a9cf2c8e303a114e948287f5 (commit)
from f7af8aea509640f4b90cb338af5bd2ceafe78657 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=4a99e6d7241ede04a9cf2c8e303a114e948287f5
commit 4a99e6d7241ede04a9cf2c8e303a114e948287f5
Author: Martijn Kaijser <[email protected]>
Date: Thu Nov 7 05:16:39 2013 +0100
[script.artistslideshow] 1.5.7
diff --git a/script.artistslideshow/README.txt
b/script.artistslideshow/README.txt
index 499f7d7..50000ec 100644
--- a/script.artistslideshow/README.txt
+++ b/script.artistslideshow/README.txt
@@ -4,8 +4,8 @@ update Confluence skin using the instructions below)
option to have artist images downloaded and/or use a local directory of
artist images
option for a fallback slideshow if no local or remote images are found
option to have a single slideshow displayed regardless of artist playing
-downloads artwork from fanart.tv, theaudiodb.com, and last.fm to display as
background
-for music visualization
+downloads artwork from fanart.tv, theaudiodb.com, and htbackdrops.org to
display as
+background for music visualization
option to download artist bio and other additional information (skin must
support
display of this information)
option to limit size of download cache
diff --git a/script.artistslideshow/addon.xml b/script.artistslideshow/addon.xml
index c8a0c72..a1914e8 100644
--- a/script.artistslideshow/addon.xml
+++ b/script.artistslideshow/addon.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.artistslideshow" name="Artist Slideshow" version="1.5.6"
provider-name="ronie|pkscuot">
+<addon id="script.artistslideshow" name="Artist Slideshow" version="1.5.7"
provider-name="ronie|pkscuot">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
- <import addon="script.module.elementtree" version="1.2.7"/>
+ <import addon="xbmc.addon" version="12.0.0"/>
</requires>
<extension point="xbmc.python.script" library="default.py">
<provides>executable</provides>
@@ -35,7 +35,7 @@
<summary lang="sk">StiahnuÅ¥ obrázky a dodatoÄné informácie
o práve hrajúcich interpretoch</summary>
<summary lang="sv">Ladda ner bilder och ytterligare information
om den nu spelande artisten</summary>
<summary lang="zh">ä¸è½½å½åææ¾èºäººçå¾çåéå
ä¿¡æ¯</summary>
- <description lang="en">Addon to download images and additional
information from Last.FM, fanart.tv and theaudiodb.com of the currently playing
artist. The images, along with local artists' images, and info can be used by
the skin to create a slideshow for the artist being listened to.</description>
+ <description lang="en">Addon to download images and additional
information from fanart.tv, theaudiodb.com, and htbackdrops.org of the
currently playing artist. The images, along with local artists' images, and
info can be used by the skin to create a slideshow for the artist being
listened to.</description>
<platform>all</platform>
</extension>
</addon>
diff --git a/script.artistslideshow/changelog.txt
b/script.artistslideshow/changelog.txt
index 641bd52..7411fec 100644
--- a/script.artistslideshow/changelog.txt
+++ b/script.artistslideshow/changelog.txt
@@ -1,3 +1,8 @@
+v.1.5.7
+- removed image support for last.fm (API call removed by last.fm)
+- changed to using built in ElementTree
+- added xbmc.gui and xbmc.addon as required dependency and set version for
Frodo
+
v.1.5.6
- adjusted artist bio cleanup to better handle HTML code (thx to scott967)
- fix for SpotiMC stuttering when using Artist Slideshow (thx to McMuzz4)
diff --git a/script.artistslideshow/default.py
b/script.artistslideshow/default.py
index 012827b..019ed45 100644
--- a/script.artistslideshow/default.py
+++ b/script.artistslideshow/default.py
@@ -19,9 +19,10 @@
-import xbmc, xbmcaddon, os, xbmcgui, xbmcvfs
-import codecs, itertools, ntpath, random, re, sys, time, unicodedata, urllib,
urllib2, urlparse, socket, shutil
-from elementtree import ElementTree as xmltree
+import xbmc, xbmcaddon, xbmcgui, xbmcvfs
+import codecs, itertools, ntpath, os, random, re, shutil, socket, sys, time
+import unicodedata, urllib, urllib2, urlparse
+import xml.etree.ElementTree as xmltree
if sys.version_info >= (2, 7):
import json
else:
@@ -347,24 +348,6 @@ class Main:
def _get_settings( self ):
- self.LASTFM = __addon__.getSetting( "lastfm" )
- try:
- self.minwidth = int(__addon__.getSetting( "minwidth" ))
- except ValueError:
- self.minwidth = 0
- except Exception, e:
- log( 'unexpected error while parsing last.fm width setting' )
- log( e )
- self.minwidth = 0
- try:
- self.minheight = int(__addon__.getSetting( "minheight" ))
- except ValueError:
- self.minheight = 0
- except Exception, e:
- log( 'unexpected error while parsing last.fm height setting' )
- log( e )
- self.minheight = 0
- self.HDASPECTONLY = __addon__.getSetting( "hd_aspect_only" )
self.FANARTTV = __addon__.getSetting( "fanarttv" )
self.THEAUDIODB = __addon__.getSetting( "theaudiodb" )
self.HTBACKDROPS = __addon__.getSetting( "htbackdrops" )
@@ -556,7 +539,7 @@ class Main:
else:
self.LASTARTISTREFRESH = 0
if self.ARTISTNUM == 1:
- for cache_file in ['fanarttvartistimages.nfo',
'theaudiodbartistbio.nfo', 'lastfmartistimages.nfo',
'htbackdropsartistimages.nfo']:
+ for cache_file in ['fanarttvartistimages.nfo',
'theaudiodbartistbio.nfo', 'htbackdropsartistimages.nfo']:
filename = os.path.join( self.InfoDir,
cache_file.decode('utf-8') )
if xbmcvfs.exists( filename ):
if time.time() - os.path.getmtime(filename) < 1209600:
@@ -578,7 +561,6 @@ class Main:
else:
self._set_property("ArtistSlideshow", self.InitDir)
sourcelist = []
- sourcelist.append( ['lastfm', self.LASTFM] )
sourcelist.append( ['fanarttv', self.FANARTTV] )
sourcelist.append( ['theaudiodb', self.THEAUDIODB] )
sourcelist.append( ['htbackdrops', self.HTBACKDROPS] )
@@ -877,10 +859,7 @@ class Main:
def _get_images( self, site ):
- if site == "lastfm":
- self.url = self.LastfmURL + '&method=artist.getImages&artist=' +
urllib.quote_plus( smartUTF8(self.NAME) )
- log( 'asking for images from: %s' %self.url )
- elif site == 'fanarttv':
+ if site == 'fanarttv':
if self.MBID:
self.url = self.fanarttvURL + self.MBID + self.fanarttvOPTIONS
log( 'asking for images from: %s' %self.url )
@@ -1180,9 +1159,7 @@ class Main:
data = []
ForceUpdate = True
if item == "images":
- if site == "lastfm":
- filename = os.path.join( self.InfoDir,
'lastfmartistimages.nfo')
- elif site == "fanarttv":
+ if site == "fanarttv":
filename = os.path.join( self.InfoDir,
'fanarttvartistimages.nfo')
elif site == "theaudiodb":
filename = os.path.join( self.InfoDir,
'theaudiodbartistbio.nfo')
@@ -1243,21 +1220,7 @@ class Main:
xbmcvfs.delete(filename)
return data
if item == "images":
- if site == "lastfm":
- for element in xmldata.getiterator():
- if element.tag == "size":
- if element.attrib.get('name') == "original":
- width = element.attrib.get('width')
- height = element.attrib.get('height')
- if ( int(width) >= self.minwidth ) and (
int(height) >= self.minheight ):
- if(self.HDASPECTONLY == 'true'):
- aspect_ratio = float(width)/float(height)
- if(aspect_ratio > 1.76 and aspect_ratio <
1.79):
- log( 'aspect ration is %s. Close
enough to 16:9, downloading this image' % str(aspect_ratio) )
- data.append(element.text)
- else:
- data.append(element.text)
- elif site == "fanarttv":
+ if site == "fanarttv":
for element in xmldata.getiterator():
if element.tag == "url":
data.append(element.text)
diff --git a/script.artistslideshow/resources/settings.xml
b/script.artistslideshow/resources/settings.xml
index 4f08ec5..7d8cf20 100644
--- a/script.artistslideshow/resources/settings.xml
+++ b/script.artistslideshow/resources/settings.xml
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="32000">
- <setting id="lastfm" type="bool" label="32001" default="true" />
- <setting id="hd_aspect_only" type="bool" label="32007" default="false"
visible="eq(-1,true)" enable="eq(-1,true)" />
- <setting id="minwidth" type="text" label="32003" default="0"
visible="eq(-2,true)" enable="eq(-2,true)" />
- <setting id="minheight" type="text" label="32004" default="0"
visible="eq(-3,true)" enable="eq(-3,true)" />
- <setting id="fanarttv" type="bool" label="32008" default="false" />
+ <setting id="fanarttv" type="bool" label="32008" default="true" />
<setting id="theaudiodb" type="bool" label="32009" default="false" />
<setting id="htbackdrops" type="bool" label="32002" default="false" />
<setting id="artistinfo" type="bool" label="32005" default="false" />
-----------------------------------------------------------------------
Summary of changes:
script.artistslideshow/README.txt | 4 +-
script.artistslideshow/addon.xml | 6 +-
script.artistslideshow/changelog.txt | 5 ++
script.artistslideshow/default.py | 53 ++++---------------------
script.artistslideshow/resources/settings.xml | 6 +--
5 files changed, 19 insertions(+), 55 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons