The branch, frodo has been updated
via baa14d47b199c6de772a3f84025a623013165ede (commit)
via 1edbf18cf8e66530e7b5197f4662b64f64537132 (commit)
via 9798b55f9765a50f0df81ff573ac652b2f4f1790 (commit)
via e536645edb8fe04e699350c64f41686de346e063 (commit)
via f990a721f71c7cf56de9a37f217232fa4d61f287 (commit)
via 6621537a64f3861ffa695b3def284aa0d720848f (commit)
from 3bef9c45e8f0ffb99d5aba7819e51e022cf18908 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=baa14d47b199c6de772a3f84025a623013165ede
commit baa14d47b199c6de772a3f84025a623013165ede
Author: ronie <[email protected]>
Date: Tue Mar 19 22:47:06 2013 +0100
[screensaver.xbmc.slideshow] -v0.1.1
diff --git a/screensaver.xbmc.slideshow/addon.xml
b/screensaver.xbmc.slideshow/addon.xml
index 2a84c62..9732574 100644
--- a/screensaver.xbmc.slideshow/addon.xml
+++ b/screensaver.xbmc.slideshow/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="screensaver.xbmc.slideshow" name="Slideshow" version="0.0.9"
provider-name="Team XBMC">
+<addon id="screensaver.xbmc.slideshow" name="Slideshow" version="0.1.1"
provider-name="Team XBMC">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
@@ -92,5 +92,7 @@
<description
lang="zh">å¹»ç¯çå±ä¿å°ä½¿ç¨åç§è¿æ¸¡ææä»¥å¹»ç¯ç形弿¾ç¤ºæ¨çå¾çãä½
å¯ä»¥è®¾ç½®å®æ¾ç¤ºé³ä¹æè§é¢èµæåºå人ç»ï¼ææä¸ªæä»¶å¤¹ä¸çå¾çã</description>
<description
lang="zh_TW">å¹»ççå±å¹ä¿è·ç¨åºå¯ä»¥é¡¯ç¤ºä½¿ç¨å種éå
´ææçå¹»ççææ¾ãå®å¯ä»¥è¢«é
ç½®çºé¡¯ç¤ºæ¨ç忏餍鳿¨æ¨¡å¼æè¦é
»ååº«ï¼æèªè¡å®ç¾©çæä»¶å¤¾ä¸çååã</description>
<platform>all</platform>
+ <forum>http://forum.xbmc.org/showthread.php?tid=154032</forum>
+ <source>https://code.google.com/p/ronie/source/</source>
</extension>
</addon>
diff --git a/screensaver.xbmc.slideshow/changelog.txt
b/screensaver.xbmc.slideshow/changelog.txt
index 89fb7a7..db02c41 100644
--- a/screensaver.xbmc.slideshow/changelog.txt
+++ b/screensaver.xbmc.slideshow/changelog.txt
@@ -1,3 +1,11 @@
+v0.1.1
+- fix potential issues due to missing module imports
+
+v0.1.0
+- added option to disable the randomizing of images
+- added display name for fanart
+- added cache option
+
v0.0.9
- silence iptc warnings
- update code for xbmc 12.1
diff --git a/screensaver.xbmc.slideshow/default.py
b/screensaver.xbmc.slideshow/default.py
index f1bd911..02aca05 100644
--- a/screensaver.xbmc.slideshow/default.py
+++ b/screensaver.xbmc.slideshow/default.py
@@ -1,16 +1,42 @@
-import sys, os
-import xbmcaddon
+import os, sys
+import xbmc, xbmcaddon
__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path').decode("utf-8")
+__language__ = __addon__.getLocalizedString
__resource__ = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib'
).encode("utf-8") ).decode("utf-8")
sys.path.append(__resource__)
+from utils import *
+
+def _parse_argv():
+ try:
+ params = dict( arg.split( "=" ) for arg in sys.argv[ 1 ].split( "&" ) )
+ except:
+ params = {}
+ cache = params.get( "cache", "" )
+ return cache
+
if __name__ == '__main__':
- import gui
- screensaver_gui = gui.Screensaver('script-python-slideshow.xml', __cwd__,
'default')
- screensaver_gui.doModal()
- del screensaver_gui
- sys.modules.clear()
+ opts = _parse_argv()
+ if opts:
+ xbmc.executebuiltin('Notification(%s,%s,%i)' % (__addonid__,
__language__(30019), 5000))
+ path = __addon__.getSetting('path')
+ images = walk(path)
+ if not xbmcvfs.exists(CACHEFOLDER):
+ xbmcvfs.mkdir(CACHEFOLDER)
+ try:
+ cache = xbmcvfs.File(CACHEFILE, "w")
+ cache.write(str(images))
+ cache.close()
+ except:
+ log('failed to save cachefile')
+ xbmc.executebuiltin('Notification(%s,%s,%i)' % (__addonid__,
__language__(30020), 5000))
+ else:
+ import gui
+ screensaver_gui = gui.Screensaver('script-python-slideshow.xml',
__cwd__, 'default')
+ screensaver_gui.doModal()
+ del screensaver_gui
+ sys.modules.clear()
diff --git a/screensaver.xbmc.slideshow/resources/language/English/strings.po
b/screensaver.xbmc.slideshow/resources/language/English/strings.po
index 92a4cbe..af9216b 100644
--- a/screensaver.xbmc.slideshow/resources/language/English/strings.po
+++ b/screensaver.xbmc.slideshow/resources/language/English/strings.po
@@ -80,7 +80,25 @@ msgctxt "#30015"
msgid "Use foldername"
msgstr ""
-#empty strings from id 30016 to 30020
+msgctxt "#30016"
+msgid "Display images in random order"
+msgstr ""
+
+msgctxt "#30017"
+msgid "Enable image cache"
+msgstr ""
+
+msgctxt "#30018"
+msgid "Create cache"
+msgstr ""
+
+msgctxt "#30019"
+msgid "Creating cache"
+msgstr ""
+
+msgctxt "#30020"
+msgid "Cache created"
+msgstr ""
msgctxt "#30021"
msgid "Display picture date"
@@ -101,3 +119,7 @@ msgstr ""
msgctxt "#30025"
msgid "Additional"
msgstr ""
+
+msgctxt "#30026"
+msgid "Advanced"
+msgstr ""
diff --git a/screensaver.xbmc.slideshow/resources/lib/gui.py
b/screensaver.xbmc.slideshow/resources/lib/gui.py
index 04968c1..029e24c 100644
--- a/screensaver.xbmc.slideshow/resources/lib/gui.py
+++ b/screensaver.xbmc.slideshow/resources/lib/gui.py
@@ -13,11 +13,12 @@
# * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# * http://www.gnu.org/copyleft/gpl.html
-import os, sys, random, urllib
-import xbmc, xbmcgui, xbmcaddon, xbmcvfs
+import random
+import xbmcgui, xbmcaddon
import EXIFvfs
from iptcinfovfs import IPTCInfo
from xml.dom.minidom import parse
+from utils import *
if sys.version_info < (2, 7):
import simplejson
else:
@@ -30,9 +31,6 @@ __skindir__ = xbmc.getSkinDir().decode('utf-8')
__skinhome__ = xbmc.translatePath( os.path.join( 'special://home/addons/',
__skindir__, 'addon.xml' ).encode('utf-8') ).decode('utf-8')
__skinxbmc__ = xbmc.translatePath( os.path.join( 'special://xbmc/addons/',
__skindir__, 'addon.xml' ).encode('utf-8') ).decode('utf-8')
-# supported image types by the screensaver
-IMAGE_TYPES = ('.jpg', '.jpeg', '.png', '.tif', '.tiff', '.gif', '.pcx',
'.bmp', '.tga', '.ico')
-
# images types that can contain exif/iptc data
EXIF_TYPES = ('.jpg', '.jpeg', '.tif', '.tiff')
@@ -61,12 +59,6 @@ else:
# get local dateformat to localize the exif date tag
DATEFORMAT = xbmc.getRegion('dateshort')
-def log(txt):
- if isinstance (txt,str):
- txt = txt.decode('utf-8')
- message = u'%s: %s' % (__addonid__, txt)
- xbmc.log(msg=message.encode('utf-8'), level=xbmc.LOGDEBUG)
-
class Screensaver(xbmcgui.WindowXMLDialog):
def __init__( self, *args, **kwargs ):
pass
@@ -108,11 +100,13 @@ class Screensaver(xbmcgui.WindowXMLDialog):
self.slideshow_time = int(__addon__.getSetting('time'))
# convert float to hex value usable by the skin
self.slideshow_dim = hex(int('%.0f' %
(float(__addon__.getSetting('level')) * 2.55)))[2:] + 'ffffff'
+ self.slideshow_random = __addon__.getSetting('random')
self.slideshow_scale = __addon__.getSetting('scale')
self.slideshow_name = __addon__.getSetting('label')
self.slideshow_date = __addon__.getSetting('date')
self.slideshow_iptc = __addon__.getSetting('iptc')
- self.slideshow_music = __addon__.getSetting('music')
+ self.slideshow_music = __addon__.getSetting('music')
+ self.slideshow_cache = __addon__.getSetting('cache')
# select which image controls from the xml we are going to use
if self.slideshow_scale == 'false':
self.image1 = self.getControl(1)
@@ -145,7 +139,7 @@ class Screensaver(xbmcgui.WindowXMLDialog):
# iterate through all the images
for img in items:
# add image to gui
- cur_img.setImage(img)
+ cur_img.setImage(img[0])
# give xbmc some time to load the image
if not self.startup:
xbmc.sleep(1000)
@@ -158,8 +152,8 @@ class Screensaver(xbmcgui.WindowXMLDialog):
keywords = ''
exif = False
iptc = False
- if ((self.slideshow_date == 'true') or (self.slideshow_iptc ==
'true')) and (os.path.splitext(img)[1].lower() in EXIF_TYPES):
- imgfile = xbmcvfs.File(img)
+ if ((self.slideshow_date == 'true') or (self.slideshow_iptc ==
'true')) and (os.path.splitext(img[0])[1].lower() in EXIF_TYPES):
+ imgfile = xbmcvfs.File(img[0])
# get exif date
if self.slideshow_date == 'true':
try:
@@ -215,9 +209,12 @@ class Screensaver(xbmcgui.WindowXMLDialog):
# get the file or foldername if enabled in settings
if self.slideshow_name != '0':
if self.slideshow_name == '1':
- NAME, EXT = os.path.splitext(os.path.basename(img))
+ if self.slideshow_type == "2":
+ NAME, EXT =
os.path.splitext(os.path.basename(img[0]))
+ else:
+ NAME = img[1]
elif self.slideshow_name == '2':
- ROOT, NAME = os.path.split(os.path.dirname(img))
+ ROOT, NAME = os.path.split(os.path.dirname(img[0]))
self.namelabel.setLabel('[B]' + NAME + '[/B]')
# set animations
if self.slideshow_effect == "0":
@@ -252,7 +249,10 @@ class Screensaver(xbmcgui.WindowXMLDialog):
def _get_items(self):
# check if we have an image folder, else fallback to video fanart
if self.slideshow_type == "2":
- items = self._walk(self.slideshow_path)
+ if self.slideshow_cache == 'true' and xbmcvfs.exists(CACHEFILE):
+ items = self._read_cache()
+ else:
+ items = walk(self.slideshow_path)
if not items:
self.slideshow_type = "0"
# video fanart
@@ -271,33 +271,20 @@ class Screensaver(xbmcgui.WindowXMLDialog):
if json_response.has_key('result') and json_response['result']
!= None and json_response['result'].has_key(method[1]):
for item in json_response['result'][method[1]]:
if item['fanart']:
- items.append(item['fanart'])
+ items.append([item['fanart'], item['label']])
# randomize
- random.shuffle(items, random.random)
+ if self.slideshow_random == 'true':
+ random.shuffle(items, random.random)
return items
- def _walk(self, path):
- images = []
- folders = []
- # multipath support
- if path.startswith('multipath://'):
- # get all paths from the multipath
- paths = path[12:-1].split('/')
- for item in paths:
- folders.append(urllib.unquote_plus(item))
- else:
- folders.append(path)
- for folder in folders:
- if xbmcvfs.exists(xbmc.translatePath(folder)):
- # get all files and subfolders
- dirs,files = xbmcvfs.listdir(folder)
- for item in files:
- # filter out all images
- if os.path.splitext(item)[1].lower() in IMAGE_TYPES:
- images.append(os.path.join(folder,item))
- for item in dirs:
- # recursively scan all subfolders
- images += self._walk(os.path.join(folder,item))
+ def _read_cache(self):
+ images = ''
+ try:
+ cache = xbmcvfs.File(CACHEFILE)
+ images = eval(cache.read())
+ cache.close()
+ except:
+ pass
return images
def _anim(self, cur_img):
diff --git a/screensaver.xbmc.slideshow/resources/settings.xml
b/screensaver.xbmc.slideshow/resources/settings.xml
index a849657..7ae2eee 100644
--- a/screensaver.xbmc.slideshow/resources/settings.xml
+++ b/screensaver.xbmc.slideshow/resources/settings.xml
@@ -8,6 +8,7 @@
<setting label="30006" type="enum" id="effect" default="2"
lvalues="30007|30008|30009"/>
</category>
<category label="30025">
+ <setting label="30016" type="bool" id="random" default="true"/>
<setting label="30011" type="bool" id="scale" default="false"/>
<setting type="sep"/>
<setting label="30012" type="enum" id="label" default="0"
lvalues="30013|30014|30015"/>
@@ -16,4 +17,8 @@
<setting type="sep"/>
<setting label="30023" type="bool" id="music" default="false"/>
</category>
+ <category label="30026">
+ <setting label="30017" type="bool" id="cache" default="true"/>
+ <setting label="30018" type="action" id="create"
enable="eq(-1,true)" action="RunScript(screensaver.xbmc.slideshow,cache=true)"/>
+ </category>
</settings>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=1edbf18cf8e66530e7b5197f4662b64f64537132
commit 1edbf18cf8e66530e7b5197f4662b64f64537132
Author: ronie <[email protected]>
Date: Tue Mar 19 22:43:45 2013 +0100
[script.tvtunes] -v3.0.5
diff --git a/script.tvtunes/addon.xml b/script.tvtunes/addon.xml
index e3917fe..00762e4 100644
--- a/script.tvtunes/addon.xml
+++ b/script.tvtunes/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.tvtunes" name="TvTunes" version="3.0.4" provider-name="Ppic,
Frost, ronie">
+<addon id="script.tvtunes" name="TvTunes" version="3.0.5"
provider-name="Ppic|Frost|ronie">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
@@ -22,5 +22,8 @@
<disclaimer lang="es">Skinners, por favor, revisad
changelog.txt para saber como integrarlo en vuestras skins</disclaimer>
<disclaimer lang="fr">Skinneurs, lisez le changelog.txt pour
obtenir les infos pour l'intégrer à votre skin</disclaimer>
<disclaimer lang="pt">Skinners, favor ver o changelog.txt para
saber como integrar TVTunes em sua skin.</disclaimer>
+ <platform>all</platform>
+ <forum>http://forum.xbmc.org/showthread.php?tid=83925</forum>
+ <source>https://code.google.com/p/ronie/source/</source>
</extension>
</addon>
diff --git a/script.tvtunes/changelog.txt b/script.tvtunes/changelog.txt
index f16ac6f..d00951f 100644
--- a/script.tvtunes/changelog.txt
+++ b/script.tvtunes/changelog.txt
@@ -1,3 +1,6 @@
+v3.0.5
+- if exact match is disabled don't auto download if there's only one result
+
v3.0.4
- changed don't replay tune when navigating with a tv show folder
diff --git a/script.tvtunes/resources/tvtunes_scraper.py
b/script.tvtunes/resources/tvtunes_scraper.py
index ea3aa11..aaf5ddf 100644
--- a/script.tvtunes/resources/tvtunes_scraper.py
+++ b/script.tvtunes/resources/tvtunes_scraper.py
@@ -103,14 +103,14 @@ class TvTunes:
if not self.ERASE and
xbmcvfs.exists(os.path.join(show[1],"theme.mp3")):
log( "### %s already exists, ERASE is set to %s" % (
os.path.join(show[1],"theme.mp3"), [False,True][self.ERASE] ) )
else:
- self.DIALOG_PROGRESS.update( (count*100)/total ,
__language__(32107) + ' ' + show[0] , "")
+ self.DIALOG_PROGRESS.update( (count*100)/total ,
__language__(32107) + ' ' + show[0] , ' ')
if self.DIALOG_PROGRESS.iscanceled():
self.DIALOG_PROGRESS.close()
xbmcgui.Dialog().ok(__language__(32108),__language__(32109))
break
theme_list = self.search_theme_list( show[0])
#log( theme_list )
- if len(theme_list) == 1:
+ if (len(theme_list) == 1) and (exact_match == 'true'):
theme_url = self.download_url %
theme_list[0]["url"].replace("http://www.televisiontunes.com/",
"").replace(".html" , "")
else:
theme_url = self.get_user_choice( theme_list , show[0] )
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=9798b55f9765a50f0df81ff573ac652b2f4f1790
commit 9798b55f9765a50f0df81ff573ac652b2f4f1790
Author: ronie <[email protected]>
Date: Tue Mar 19 22:43:10 2013 +0100
[script.tv.show.next.aired] -v5.0.6
diff --git a/script.tv.show.next.aired/README.txt
b/script.tv.show.next.aired/README.txt
index ef7c83c..5bccdcc 100644
--- a/script.tv.show.next.aired/README.txt
+++ b/script.tv.show.next.aired/README.txt
@@ -39,8 +39,6 @@ LatestEpisodeNumber (episode number of the last episode)
LatestSeasonNumber (season number of the last episode)
AirDay (day of the week the show is aired, eg 'Tuesday')
ShortTime (time the show is aired, eg. '08:00 pm')
-
-New art properties for XBMC 12.0 'Frodo':
Art(poster) (tv show poster)
Art(banner) (tv show banner)
Art(fanart) (tv show fanart)
@@ -60,6 +58,8 @@ Status ids:
7 - On Hiatus
8 - Pilot Ordered
9 - Pilot Rejected
+10 - Cancelled
+11 - Ended
-1 - Undefined
---
diff --git a/script.tv.show.next.aired/addon.xml
b/script.tv.show.next.aired/addon.xml
index 9dde238..276d0a9 100644
--- a/script.tv.show.next.aired/addon.xml
+++ b/script.tv.show.next.aired/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.tv.show.next.aired" name="TV Show - Next Aired"
version="5.0.5" provider-name="Ppic, Frost, ronie, `Black">
+<addon id="script.tv.show.next.aired" name="TV Show - Next Aired"
version="5.0.6" provider-name="Ppic|Frost|ronie|`Black|phil65">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
@@ -16,5 +16,8 @@
<description lang="de">TV Show Next Aired liefert
Termin-Informationen über die anstehenden Episoden der Serien aus der
Datenbank. Dazu gibt es eine Wochenansicht mit allen in der nächsten Woche
laufenden Episoden sowie (bei vorhandenem Skin Support) die direkte Integration
der Informationen in die Ansichten des jeweiligen Skins. Sie werden nie wieder
eine Folge verpassen.</description>
<description lang="en">Get info for TV Shows Next Aired. You'll
never miss one again.</description>
<description lang="fr">Ce script interroge votre médiathèque
puis vas récupérer les infos sur les prochaines diffusions de vos séries.
vous n'en manquerez plus aucune.</description>
+ <platform>all</platform>
+ <forum>http://forum.xbmc.org/showthread.php?tid=79493</forum>
+ <source>https://code.google.com/p/ronie/source/</source>
</extension>
</addon>
diff --git a/script.tv.show.next.aired/changelog.txt
b/script.tv.show.next.aired/changelog.txt
index 8be0033..c550cfa 100644
--- a/script.tv.show.next.aired/changelog.txt
+++ b/script.tv.show.next.aired/changelog.txt
@@ -1,3 +1,7 @@
+v5.0.6
+- add seperate entries for canceled and ended
+- added script option to set properties for all tvshows, not only today´s
ones.
+
v5.0.5
- added characterart property
diff --git a/script.tv.show.next.aired/default.py
b/script.tv.show.next.aired/default.py
index 40c7184..638b9d8 100644
--- a/script.tv.show.next.aired/default.py
+++ b/script.tv.show.next.aired/default.py
@@ -37,6 +37,8 @@ STATUS = { 'Returning Series' : __language__(32201),
'On Hiatus' : __language__(32208),
'Pilot Ordered' : __language__(32209),
'Pilot Rejected' : __language__(32210),
+ 'Canceled' : __language__(32211),
+ 'Ended' : __language__(32212),
'' : ''}
STATUS_ID = { 'Returning Series' : '0',
@@ -49,6 +51,8 @@ STATUS_ID = { 'Returning Series' : '0',
'On Hiatus' : '7',
'Pilot Ordered' : '8',
'Pilot Rejected' : '9',
+ 'Canceled' : '10',
+ 'Ended' : '11',
'' : '-1'}
# Get localized date format
@@ -143,6 +147,7 @@ class NextAired:
current_hour = '%.2i' % current_time.tm_hour
current_minute = '%.2i' % current_time.tm_min
while (current_hour == self.update_hour) and
(current_minute == self.update_minute) and (not xbmc.abortRequested):
+ # don't run update multiple times within the same
minute
xbmc.sleep(1000)
current_time = localtime()
current_hour = '%.2i' % current_time.tm_hour
@@ -237,7 +242,7 @@ class NextAired:
self.get_show_info( current_show )
self.localize_show_datetime( current_show )
log( "### %s" % current_show )
- if current_show.get("Status") == "Canceled/Ended":
+ if (current_show.get("Status") == "Canceled/Ended") or
(current_show.get("Status") == "Canceled") or (current_show.get("Status") ==
"Ended"):
self.canceled.append(current_show)
else:
self.current_show_data.append(current_show)
@@ -399,9 +404,43 @@ class NextAired:
self.WINDOW.setProperty("NextAired.TodayShow" ,
str(self.todaylist).strip("[]"))
for count in range( len(self.nextlist) ):
self.WINDOW.clearProperty("NextAired.%d.Label" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Thumb" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.AirTime" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Path" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Library" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Status" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.StatusID" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Network" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Started" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Classification" % ( count
+ 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Genre" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Premiered" % ( count + 1,
))
+ self.WINDOW.clearProperty("NextAired.%d.Country" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Runtime" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Fanart" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(fanart)" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(poster)" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(landscape)" % ( count
+ 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(banner)" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(clearlogo)" % ( count
+ 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(characterart)" % (
count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Art(clearart)" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Today" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.NextDate" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.NextTitle" % ( count + 1,
))
+ self.WINDOW.clearProperty("NextAired.%d.NextNumber" % ( count + 1,
))
+ self.WINDOW.clearProperty("NextAired.%d.NextEpisodeNumber" % (
count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.NextSeasonNumber" % (
count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.LatestDate" % ( count + 1,
))
+ self.WINDOW.clearProperty("NextAired.%d.LatestTitle" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.LatestNumber" % ( count +
1, ))
+ self.WINDOW.clearProperty("NextAired.%d.LatestEpisodeNumber" % (
count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.LatestSeasonNumber" % (
count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.Airday" % ( count + 1, ))
+ self.WINDOW.clearProperty("NextAired.%d.ShortTime" % ( count + 1,
))
self.count = 0
for current_show in self.nextlist:
- if current_show.get("RFC3339" , "" )[:10] == self.datestr:
+ if ((current_show.get("RFC3339" , "" )[:10] == self.datestr) or
(__addon__.getSetting( "ShowAllTVShowsOnHome" ) == 'true')):
self.count += 1
self.set_labels('windowpropertytoday', current_show)
@@ -446,6 +485,10 @@ class NextAired:
prefix = 'NextAired.'
else:
prefix = 'NextAired.' + str(self.count) + '.'
+ if __addon__.getSetting( "ShowAllTVShowsOnHome" ) == 'true':
+ label.setProperty('NextAired.' + "ShowAllTVShows", "true")
+ else:
+ label.setProperty('NextAired.' + "ShowAllTVShows", "false")
label.setProperty(prefix + "Label", item.get("localname", ""))
label.setProperty(prefix + "Thumb", item.get("thumbnail", ""))
else:
diff --git a/script.tv.show.next.aired/resources/language/English/strings.xml
b/script.tv.show.next.aired/resources/language/English/strings.xml
index 5382d7b..406eb4e 100644
--- a/script.tv.show.next.aired/resources/language/English/strings.xml
+++ b/script.tv.show.next.aired/resources/language/English/strings.xml
@@ -12,6 +12,7 @@
<string id="32008">Download next aired info every day at:</string>
<string id="32009">Hour</string>
<string id="32010">Minute</string>
+ <string id="32011">Download posters (Artwork Downloader
required)</string>
<string id="32101">TV Show - Next Aired</string>
<string id="32102">Getting information...</string>
<string id="32103">CANCELLED</string>
@@ -26,6 +27,8 @@
<string id="32208">On Hiatus</string>
<string id="32209">Pilot Ordered</string>
<string id="32210">Pilot Rejected</string>
- <string id="32011">Download posters (Artwork Downloader
required)</string>
+ <string id="32211">Cancelled</string>
+ <string id="32212">Ended</string>
+ <string id="32013">Show All TV Shows for home screen (needs skin
Support)</string>
</strings>
diff --git a/script.tv.show.next.aired/resources/language/Portuguese
(Brazil)/strings.xml b/script.tv.show.next.aired/resources/language/Portuguese
(Brazil)/strings.xml
index b4e668e..c196db5 100644
--- a/script.tv.show.next.aired/resources/language/Portuguese
(Brazil)/strings.xml
+++ b/script.tv.show.next.aired/resources/language/Portuguese
(Brazil)/strings.xml
@@ -9,8 +9,20 @@
<string id="32005">Ligar visualização de miniaturas 16:9</string>
<string id="32006">Download visualização de miniaturas 16:9 (Requer
Artwork Downloader)</string>
<string id="32007">Reescanear os dados do guia de tv</string>
+ <string id="32008">Download info next aired todo dia à s:</string>
+ <string id="32009">Hora</string>
+ <string id="32010">Minuto</string>
+ <string id="32011">Download posters (Artwork Downloader
requerido)</string>
<string id="32101">TV Show - Next Aired</string>
<string id="32102">Pegando Informação...</string>
<string id="32103">CANCELADO</string>
<string id="32104">Operação cancelada pelo Usuário.</string>
+ <string id="32205">Novos Seriados</string>
+ <string id="32206">Inédito</string>
+ <string id="32207">Temporada Final</string>
+ <string id="32208">Em Hiato</string>
+ <string id="32209">Piloto Encomendado</string>
+ <string id="32210">Piloto Rejeitado</string>
+ <string id="32211">Cancelado</string>
+ <string id="32212">Finalizado</string>
</strings>
diff --git a/script.tv.show.next.aired/resources/settings.xml
b/script.tv.show.next.aired/resources/settings.xml
index 84b7ed8..c8c105e 100644
--- a/script.tv.show.next.aired/resources/settings.xml
+++ b/script.tv.show.next.aired/resources/settings.xml
@@ -9,6 +9,7 @@
<setting id="BackgroundFanart" type="bool" label="32004"
default="False"/>
<setting id="PreviewThumbs" type="bool" label="32005" default="False"/>
<setting id="DownloadPreviewThumbs" type="action" subsetting="true"
label="32006"
action="RunScript(script.artwork.downloader,mediatype=tvshow,mode=custom,tvthumb)"
visible="eq(-1,true)"/>
+ <setting id="ShowAllTVShowsOnHome" type="bool" label="32013"
default="False"/>
<setting type="lsep" label="32008"/>
<setting id="update_hour" type="labelenum" label="32009"
subsetting="true"
values="00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23"
default="00"/>
<setting id="update_minute" type="labelenum" label="32010"
subsetting="true" values="00|05|10|15|20|25|30|35|40|45|50|55" default="00"/>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=e536645edb8fe04e699350c64f41686de346e063
commit e536645edb8fe04e699350c64f41686de346e063
Author: ronie <[email protected]>
Date: Tue Mar 19 22:42:05 2013 +0100
[script.artworkorganizer] -v1.2.0
diff --git a/script.artworkorganizer/addon.xml
b/script.artworkorganizer/addon.xml
index 9172cd6..2153bed 100644
--- a/script.artworkorganizer/addon.xml
+++ b/script.artworkorganizer/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.artworkorganizer" name="Artwork Organizer" version="1.1.1"
provider-name="ronie">
+<addon id="script.artworkorganizer" name="Artwork Organizer" version="1.2.0"
provider-name="ronie">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
@@ -12,5 +12,7 @@
<summary>Copies your fanart and thumbs into a separate
directories</summary>
<description>This script can be used to copy your movie,
tvshow, artist and album fanart and thumbs into a separate
directories.</description>
<platform>all</platform>
+ <forum>http://forum.xbmc.org/showthread.php?tid=109304</forum>
+ <source>https://code.google.com/p/ronie/source/</source>
</extension>
</addon>
diff --git a/script.artworkorganizer/changelog.txt
b/script.artworkorganizer/changelog.txt
index 1dfa5e5..70146f2 100644
--- a/script.artworkorganizer/changelog.txt
+++ b/script.artworkorganizer/changelog.txt
@@ -1,3 +1,9 @@
+v1.2.0
+- added option to specify custom source
+
+v1.1.2
+- fixed copy banner/poster label no showing
+
v1.1.1
- python version bump
diff --git a/script.artworkorganizer/default.py
b/script.artworkorganizer/default.py
index 5e203b1..1b5a182 100644
--- a/script.artworkorganizer/default.py
+++ b/script.artworkorganizer/default.py
@@ -45,6 +45,11 @@ class Main:
self.musicvideothumbs = __addon__.getSetting( "musicvideothumbs" )
self.artistthumbs = __addon__.getSetting( "artistthumbs" )
self.albumthumbs = __addon__.getSetting( "albumthumbs" )
+ self.source = __addon__.getSetting( "source" )
+ if self.source == 'true':
+ self.path = __addon__.getSetting( "path" ).decode("utf-8")
+ else:
+ self.path = ''
self.directory = __addon__.getSetting( "directory" ).decode("utf-8")
def _init_variables( self ):
@@ -64,6 +69,9 @@ class Main:
self.dialog = xbmcgui.DialogProgress()
if self.directory == '':
self.directory = os.path.join( xbmc.translatePath(
"special://profile/addon_data/" ).decode("utf-8"), __addonid__ )
+ if self.path != '':
+ path = os.path.split( os.path.dirname( self.path ) )[1]
+ self.directory = os.path.join( self.directory, path )
self.artworklist = []
if self.moviefanart == 'true':
self.moviefanartpath = os.path.join( self.directory,
self.moviefanartdir )
@@ -139,7 +147,7 @@ class Main:
if self.musicvideofanart == 'true':
self._copy_musicvideofanart()
if not self.dialog.iscanceled():
- if self.artistfanart == 'true':
+ if (self.artistfanart == 'true') and (self.path == ''):
self._copy_artistfanart()
if not self.dialog.iscanceled():
if self.moviethumbs == 'true':
@@ -160,17 +168,17 @@ class Main:
if self.musicvideothumbs == 'true':
self._copy_musicvideothumbs()
if not self.dialog.iscanceled():
- if self.artistthumbs == 'true':
+ if (self.artistthumbs == 'true') and (self.path == ''):
self._copy_artistthumbs()
if not self.dialog.iscanceled():
- if self.albumthumbs == 'true':
+ if (self.albumthumbs == 'true') and (self.path == ''):
self._copy_albumthumbs()
self.dialog.close()
def _copy_moviefanart( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"properties": ["title", "fanart",
"year"]}, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"properties": ["file", "title", "fanart",
"year"], "filter": {"field": "path", "operator": "contains", "value": "%s"}},
"id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('movies')):
@@ -191,14 +199,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.moviefanartpath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy moviefanart' )
log( 'moviefanart copied: %s' % count )
def _copy_tvshowfanart( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "fanart"]}, "id":
1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "fanart"],
"filter": {"field": "path", "operator": "contains", "value": "%s"}}, "id": 1}'
% self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('tvshows')):
@@ -218,14 +225,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.tvshowfanartpath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy tvshowfanart' )
log( 'tvshowfanart copied: %s' % count )
def _copy_musicvideofanart( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "fanart",
"artist"]}, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "fanart",
"artist"], "filter": {"field": "path", "operator": "contains", "value": "%s"}},
"id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('musicvideos')):
@@ -246,7 +252,6 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.musicvideofanartpath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy musicvideofanart' )
log( 'musicvideofanart copied: %s' % count )
@@ -273,14 +278,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.artistfanartpath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy artistfanart' )
log( 'artistfanart copied: %s' % count )
def _copy_moviethumbs( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"properties": ["title", "thumbnail",
"year"]}, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"properties": ["title", "thumbnail",
"year"], "filter": {"field": "path", "operator": "contains", "value": "%s"}},
"id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('movies')):
@@ -301,14 +305,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.moviethumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy moviethumb' )
log( 'moviethumbs copied: %s' % count )
def _copy_tvshowbanners( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "art"]}, "id":
1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "art"], "filter":
{"field": "path", "operator": "contains", "value": "%s"}}, "id": 1}' %
self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('tvshows')):
@@ -318,7 +321,7 @@ class Main:
log('script cancelled')
return
processeditems = processeditems + 1
- self.dialog.update( int( float( processeditems ) / float(
totalitems ) * 100), __language__(32006) + ': ' + str( count + 1 ) )
+ self.dialog.update( int( float( processeditems ) / float(
totalitems ) * 100), __language__(32013) + ': ' + str( count + 1 ) )
name = item['title']
artwork = item['art'].get('banner')
tmp_filename = name + '.jpg'
@@ -328,14 +331,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.tvshowbannerspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy tvshowbanner' )
log( 'tvshowbanners copied: %s' % count )
def _copy_tvshowposters( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "art"]}, "id":
1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "art"], "filter":
{"field": "path", "operator": "contains", "value": "%s"}}, "id": 1}' %
self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('tvshows')):
@@ -345,7 +347,7 @@ class Main:
log('script cancelled')
return
processeditems = processeditems + 1
- self.dialog.update( int( float( processeditems ) / float(
totalitems ) * 100), __language__(32006) + ': ' + str( count + 1 ) )
+ self.dialog.update( int( float( processeditems ) / float(
totalitems ) * 100), __language__(32014) + ': ' + str( count + 1 ) )
name = item['title']
artwork = item['art'].get('poster')
tmp_filename = name + '.jpg'
@@ -355,14 +357,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.tvshowposterspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy tvshowposter' )
log( 'tvshowposters copied: %s' % count )
def _copy_seasonthumbs( self ):
count = 0
tvshowids = []
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"filter": {"field": "path", "operator":
"contains", "value": "%s"}}, "id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('tvshows')):
@@ -395,14 +396,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.seasonthumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy seasonthumb' )
log( 'seasonthumbs copied: %s' % count )
def _copy_episodethumbs( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": {"properties": ["title", "thumbnail",
"season", "episode", "showtitle"]}, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": {"properties": ["title", "thumbnail",
"season", "episode", "showtitle"], "filter": {"field": "path", "operator":
"contains", "value": "%s"}}, "id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('episodes')):
@@ -426,14 +426,13 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.episodethumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy episodethumb' )
log( 'episodethumbs copied: %s' % count )
def _copy_musicvideothumbs( self ):
count = 0
processeditems = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "thumbnail",
"artist"]}, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "thumbnail",
"artist"], "filter": {"field": "path", "operator": "contains", "value": "%s"}},
"id": 1}' % self.path)
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('musicvideos')):
@@ -454,7 +453,6 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.musicvideothumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy musicvideothumb' )
log( 'musicvideothumbs copied: %s' % count )
@@ -481,7 +479,6 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.artistthumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy artistthumb' )
log( 'artistthumbs copied: %s' % count )
@@ -509,7 +506,6 @@ class Main:
xbmcvfs.copy( xbmc.translatePath( artwork ),
os.path.join( self.albumthumbspath, filename ) )
count += 1
except:
- count -= 1
log( 'failed to copy albumthumb' )
log( 'albumthumbs copied: %s' % count )
diff --git a/script.artworkorganizer/resources/language/English/strings.xml
b/script.artworkorganizer/resources/language/English/strings.xml
index 32dc4de..c4b11a3 100644
--- a/script.artworkorganizer/resources/language/English/strings.xml
+++ b/script.artworkorganizer/resources/language/English/strings.xml
@@ -13,4 +13,6 @@
<string id="32012">Destination directory</string>
<string id="32013">Copy TV Show Banners</string>
<string id="32014">Copy TV Show Posters</string>
+ <string id="32015">Custom source</string>
+ <string id="32016">Path</string>
</strings>
diff --git a/script.artworkorganizer/resources/settings.xml
b/script.artworkorganizer/resources/settings.xml
index 5b48b6f..7edbfba 100644
--- a/script.artworkorganizer/resources/settings.xml
+++ b/script.artworkorganizer/resources/settings.xml
@@ -13,6 +13,8 @@
<setting id="musicvideothumbs" type="bool" label="32009"
default="true"/>
<setting id="artistthumbs" type="bool" label="32010"
default="true"/>
<setting id="albumthumbs" type="bool" label="32011"
default="true"/>
+ <setting id="source" type="bool" label="32015" default="false"/>
+ <setting id="path" type="folder" label="32016"
subsetting="true" enable="eq(-1,true)"/>
<setting id="directory" type="folder" label="32012"/>
</category>
</settings>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=f990a721f71c7cf56de9a37f217232fa4d61f287
commit f990a721f71c7cf56de9a37f217232fa4d61f287
Author: ronie <[email protected]>
Date: Tue Mar 19 22:41:26 2013 +0100
[script.playlists] -v1.0.2
diff --git a/script.playlists/addon.xml b/script.playlists/addon.xml
index 0cb402a..830b3f9 100644
--- a/script.playlists/addon.xml
+++ b/script.playlists/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.playlists" name="Playlists Script" version="1.0.1"
provider-name="ronie">
+<addon id="script.playlists" name="Playlists Script" version="1.0.2"
provider-name="ronie">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.elementtree" version="1.2.7"/>
@@ -10,5 +10,7 @@
<summary lang="en">Playlist script</summary>
<description lang="en">Creates a list of available Video or
Music playlists</description>
<platform>all</platform>
+ <forum>http://forum.xbmc.org/showthread.php?tid=112739</forum>
+ <source>https://code.google.com/p/ronie/source/</source>
</extension>
</addon>
diff --git a/script.playlists/changelog.txt b/script.playlists/changelog.txt
index 5f6ea95..d4b1870 100644
--- a/script.playlists/changelog.txt
+++ b/script.playlists/changelog.txt
@@ -1,3 +1,6 @@
+v1.0.2
+- fix encoding issue
+
v1.0.1
- python version bump
diff --git a/script.playlists/default.py b/script.playlists/default.py
index 6563dbc..2fb6220 100644
--- a/script.playlists/default.py
+++ b/script.playlists/default.py
@@ -1,5 +1,5 @@
import os, sys, unicodedata
-import xbmc, xbmcgui, xbmcaddon
+import xbmc, xbmcgui, xbmcaddon, xbmcvfs
from elementtree import ElementTree as xmltree
__addon__ = xbmcaddon.Addon()
@@ -8,9 +8,9 @@ __addonversion__ = __addon__.getAddonInfo('version')
def log(txt):
if isinstance (txt,str):
- txt = txt.decode("utf-8")
+ txt = txt.decode('utf-8')
message = u'%s: %s' % (__addonid__, txt)
- xbmc.log(msg=message.encode("utf-8"), level=xbmc.LOGDEBUG)
+ xbmc.log(msg=message.encode('utf-8'), level=xbmc.LOGDEBUG)
class Main:
def __init__( self ):
@@ -45,7 +45,7 @@ class Main:
else:
return
try:
- dirlist = os.listdir( xbmc.translatePath( path ).decode("utf-8") )
+ dirlist = os.listdir( xbmc.translatePath( path ).decode('utf-8') )
except:
dirlist = []
log('dirlist: %s' % dirlist)
@@ -53,12 +53,14 @@ class Main:
playlist = os.path.join( path, item)
playlistfile = xbmc.translatePath( playlist )
if item.endswith('.xsp'):
- with open(playlistfile, 'r') as contents:
- contents_data = unicodedata.normalize('NFKD',
unicode(unicode(contents.read(), 'utf-8'))).encode('ascii','ignore')
- xmldata = xmltree.fromstring(contents_data)
+ contents = xbmcvfs.File(playlistfile, 'r')
+ contents_data = contents.read().decode('utf-8')
+ xmldata = xmltree.fromstring(contents_data.encode('utf-8'))
for line in xmldata.getiterator():
if line.tag == "name":
name = line.text
+ if not name:
+ name = item[:-4]
self.playlists.append( (name, playlist) )
break
elif item.endswith('.m3u'):
@@ -68,7 +70,7 @@ class Main:
def _set_properties( self ):
for count, item in enumerate( self.playlists ):
- self.WINDOW.setProperty( 'ScriptPlaylist.%d.Name' % (count + 1),
str( item[0] ) )
+ self.WINDOW.setProperty( 'ScriptPlaylist.%d.Name' % (count + 1),
item[0] )
self.WINDOW.setProperty( 'ScriptPlaylist.%d.Path' % (count + 1),
item[1] )
if ( __name__ == "__main__" ):
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=6621537a64f3861ffa695b3def284aa0d720848f
commit 6621537a64f3861ffa695b3def284aa0d720848f
Author: ronie <[email protected]>
Date: Tue Mar 19 22:40:39 2013 +0100
[script.favourites] -v4.0.9
diff --git a/script.favourites/addon.xml b/script.favourites/addon.xml
index dc1f74e..7dc2930 100644
--- a/script.favourites/addon.xml
+++ b/script.favourites/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.favourites" name="Favourites script" version="4.0.8"
provider-name="ronie|`Black">
+<addon id="script.favourites" name="Favourites script" version="4.0.9"
provider-name="ronie|`Black">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
diff --git a/script.favourites/changelog.txt b/script.favourites/changelog.txt
index 0c0dc94..c731857 100644
--- a/script.favourites/changelog.txt
+++ b/script.favourites/changelog.txt
@@ -1,3 +1,6 @@
+v4.0.9
+- fix encoding issue
+
v4.0.8
- added 'no action' item to the end of the list
diff --git a/script.favourites/default.py b/script.favourites/default.py
index 55d1d93..93581d7 100644
--- a/script.favourites/default.py
+++ b/script.favourites/default.py
@@ -142,7 +142,7 @@ class MainGui( xbmcgui.WindowXMLDialog ):
keyboard.doModal()
if ( keyboard.isConfirmed() ):
fav_label = keyboard.getText()
- xbmc.executebuiltin( 'Skin.SetString(%s,%s)' % ( '%s.%s' % (
self.property, "Path", ), fav_path.encode('unicode-escape'), ) )
+ xbmc.executebuiltin( 'Skin.SetString(%s,%s)' % ( '%s.%s' % (
self.property, "Path", ), fav_path.decode('string-escape'), ) )
xbmc.executebuiltin( 'Skin.SetString(%s,%s)' % ( '%s.%s' % (
self.property, "Label", ), fav_label, ) )
fav_icon = self.fav_list.getSelectedItem().getProperty( "Icon"
)
if fav_icon:
-----------------------------------------------------------------------
Summary of changes:
screensaver.xbmc.slideshow/addon.xml | 4 +-
screensaver.xbmc.slideshow/changelog.txt | 8 ++
screensaver.xbmc.slideshow/default.py | 40 +++++++++--
.../resources/language/English/strings.po | 24 ++++++-
screensaver.xbmc.slideshow/resources/lib/gui.py | 71 ++++++++------------
screensaver.xbmc.slideshow/resources/lib/utils.py | 39 +++++++++++
screensaver.xbmc.slideshow/resources/settings.xml | 5 ++
script.artworkorganizer/addon.xml | 4 +-
script.artworkorganizer/changelog.txt | 6 ++
script.artworkorganizer/default.py | 48 ++++++-------
.../resources/language/English/strings.xml | 2 +
script.artworkorganizer/resources/settings.xml | 2 +
script.favourites/addon.xml | 2 +-
script.favourites/changelog.txt | 3 +
script.favourites/default.py | 2 +-
script.playlists/addon.xml | 4 +-
script.playlists/changelog.txt | 3 +
script.playlists/default.py | 18 +++--
script.tv.show.next.aired/README.txt | 4 +-
script.tv.show.next.aired/addon.xml | 5 +-
script.tv.show.next.aired/changelog.txt | 4 +
script.tv.show.next.aired/default.py | 47 ++++++++++++-
.../resources/language/English/strings.xml | 5 +-
.../language/Portuguese (Brazil)/strings.xml | 12 +++
.../resources/language/Romanian/strings.xml | 33 +++++++++
script.tv.show.next.aired/resources/settings.xml | 1 +
script.tvtunes/addon.xml | 5 +-
script.tvtunes/changelog.txt | 3 +
script.tvtunes/resources/tvtunes_scraper.py | 4 +-
29 files changed, 310 insertions(+), 98 deletions(-)
create mode 100644 screensaver.xbmc.slideshow/resources/lib/utils.py
create mode 100644
script.tv.show.next.aired/resources/language/Romanian/strings.xml
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons