ronie Wrote:most likely pittfalls:
- what happens if a user doesn't have any playlists at all
- does the script properly handle non-ascii characters in filenames / playlist names
It seams that it's not a problem if you do not have playlists but using non ascii is problematic and causes script to fail. Why do I have a feeling you already new this? :-)
My proposal is - if you are able to solve non ascii characters I would put it in a repo and solve possible problems once they get reported. Reason is simple, I do not believe that a user will download and test the script on it's own as this is an extension of already existing system feature. Opposite case is when you want extended weather info so you download weather+
If you disagree, I'll make the script is available check in the skin and run it conditionally but I would really like to avid it if possible.
Here's a log:
Code:
12:37:44 T:2958716928 DEBUG: Process - Entering source directory /Users/pecinko/Library/Application Support/XBMC/addons/script.playlists
12:37:44 T:2958716928 DEBUG: Instantiating addon using automatically obtained id of "script.playlists" dependent on version 2.0 of the xbmc.python api
12:37:44 T:2958716928 DEBUG: script.artistslideshow: script version 0.0.1 started
12:37:44 T:2958716928 DEBUG: script.artistslideshow: params: {'type': 'video'}
12:37:44 T:2958716928 DEBUG: script.artistslideshow: dirlist: ['ddd.xsp', "e\xcc\x8cs\xcc\x8cc\xcc\x8cr\xcc\x8cz\xcc\x8cy\xcc\x81a\xcc\x81i\xcc\x81e\xcc\x81='+u\xcc\x8a.xsp", 'Movies HD.xsp']
12:37:44 T:2958716928 DEBUG: script.artistslideshow: playlists: [('ddd', 'special://profile/playlists/video/ddd.xsp'), (u'Do\u0159e', "special://profile/playlists/video/e\xcc\x8cs\xcc\x8cc\xcc\x8cr\xcc\x8cz\xcc\x8cy\xcc\x81a\xcc\x81i\xcc\x81e\xcc\x81='+u\xcc\x8a.xsp"), ('Movies HD', 'special://profile/playlists/video/Movies HD.xsp')]
12:37:44 T:2958716928 INFO: -->Python script returned the following error<--
12:37:44 T:2958716928 ERROR: Error Type: <type 'exceptions.UnicodeEncodeError'>
12:37:44 T:2958716928 ERROR: Error Contents: 'ascii' codec can't encode character u'\u0159' in position 2: ordinal not in range(128)
12:37:44 T:2958716928 ERROR: Traceback (most recent call last):
File "/Users/pecinko/Library/Application Support/XBMC/addons/script.playlists/default.py", line 70, in <module>
Main()
File "/Users/pecinko/Library/Application Support/XBMC/addons/script.playlists/default.py", line 19, in __init__
self._set_properties()
File "/Users/pecinko/Library/Application Support/XBMC/addons/script.playlists/default.py", line 65, in _set_properties
self.WINDOW.setProperty( 'ScriptPlaylist.%d.Name' % (count + 1), str( item[0] ) )
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0159' in position 2: ordinal not in range(128)
12:37:44 T:2958716928 INFO: -->End of Python script error report<--
12:37:44 T:2958716928 INFO: Python script stopped
12:37:44 T:2958716928 DEBUG: Thread XBPyThread 2958716928 terminating
12:37:44 T:2896233152 DEBUG: waiting for python thread 13 to stop
12:37:44 T:2896233152 DEBUG: python thread 13 destructed
12:37:44 T:2896233152 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
12:37:44 T:2896233152 DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
12:37:49 T:2896233152 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
12:37:54 T:2896233152 INFO: Python, unloading python shared library because no scripts are running anymore
12:38:14 T:2957651968 DEBUG: Thread Jobworker 2957651968 terminating (autodelete)
12:38:14 T:2957119488 DEBUG: Thread Jobworker 2957119488 terminating (autodelete)
12:38:14 T:2956587008 DEBUG: Thread Jobworker 2956587008 terminating (autodelete)
12:38:14 T:2955980800 DEBUG: Thread Jobworker 2955980800 terminating (autodelete)
12:38:14 T:2896233152 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-x86-osx.so)
12:38:14 T:2896233152 DEBUG: Unloading: ImageLib-x86-osx.so