Kodi Community Forum

Full Version: Artist Slideshow addon (with skin and addon integration)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2012-08-19, 16:21)pkscuot Wrote: [ -> ]I used some of my google-fu and found something that might fix this and the problem with extended characters in a username. I don't have a good way to test it on my system, but it at least didn't break anything. For folks with these problems, please download and try this branch:
I created a new user on my system with user name Øystein, then testet both v 1.41 and 1.4.2.2, it didn't change anything. As far as i can see from the log, the char set is not using a extended ascii table, only the first 128 chars. Where ex. Ø = 216.

v1.4.2.2 log:
Code:
18:11:37 T:2828  NOTICE: -->Python Interpreter Initialized<--
18:11:37 T:2828   ERROR: Error Type: <type 'exceptions.UnicodeEncodeError'>
18:11:37 T:2828   ERROR: Error Contents: 'ascii' codec can't encode character u'\xd8' in position 44: ordinal not in range(128)
18:11:37 T:2828   ERROR: Traceback (most recent call last):
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\pkscout-script.artistslideshow-820e522\default.py", line 742, in <module>
                                                slideshow = Main()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\pkscout-script.artistslideshow-820e522\default.py", line 134, in __init__
                                                self._use_correct_artwork()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\pkscout-script.artistslideshow-820e522\default.py", line 185, in _use_correct_artwork
                                                self._start_download()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\pkscout-script.artistslideshow-820e522\default.py", line 312, in _start_download
                                                log('cachedir = %s' % self.CacheDir)
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\pkscout-script.artistslideshow-820e522\default.py", line 78, in log
                                                xbmc.log(msg=message, level=xbmc.LOGDEBUG)
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\xd8' in position 44: ordinal not in range(128)

Log from v1.4.2 version, tested before i installed v1.4.2.2
Code:
18:04:14 T:2988  NOTICE: -->Python Interpreter Initialized<--
18:04:14 T:2988   ERROR: C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py:118: SyntaxWarning: name '__last_time__' is used prior to global declaration
                                              global __last_time__
18:04:21 T:2972  NOTICE: -->Python Interpreter Initialized<--
18:04:21 T:2972   ERROR: C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py:118: SyntaxWarning: name '__last_time__' is used prior to global declaration
                                              global __last_time__
18:04:21 T:2972   ERROR: Error Type: <type 'exceptions.WindowsError'>
18:04:21 T:2972   ERROR: Error Contents: (3, 'The system cannot find the path specified', 'C:\\Users\\\xc3\x98ystein\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.artistslideshow\\ArtistSlideshow\\eddc6007\\*.*')
18:04:22 T:2972   ERROR: Traceback (most recent call last):
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 749, in <module>
                                                slideshow = Main()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 141, in __init__
                                                self._use_correct_artwork()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 192, in _use_correct_artwork
                                                self._start_download()
                                              File "C:\Users\ٹstein\AppData\Roaming\XBMC\addons\script.artistslideshow\default.py", line 321, in _start_download
                                                files = os.listdir(self.CacheDir)
                                            WindowsError: (3, 'The system cannot find the path specified', 'C:\\Users\\\xc3\x98ystein\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.artistslideshow\\ArtistSlideshow\\eddc6007\\*.*')

(2012-08-20, 11:40)karmark Wrote: [ -> ]Hi

Is there a way to clear the cach?
I want to get rid of the non 16:9 images that the plugin downloaded before i change the setting "only 16:9 images"

Yes. If you go to your XBMC userdata folder (on OSX for instance that is ~/Library/Application Support/XBMC/), it'll be in:

userdata/addon_data/script.artistslideshow/ArtistSlideshow

If you delete all the folders in that directory that will completely clear the cache.

(2012-08-20, 17:52)dreamkp Wrote: [ -> ]thanks for getting on that so fast.
the new branch script throws an error when playing an artist with special chars and it still doesn't save anything.

Well at least I broke it more than before. That's a change anyway. Big Grin

Quote:
(2012-08-19, 16:21)pkscuot Wrote: [ -> ]I don't have a good way to test it on my system, but it at least didn't break anything.
that should be easy if you just need some test material
create a new artist folder in your collection, name it Björk, copy any mp3 in there and adjust artist tag with Björk, scrape it into your library and run artist slideshow over it.
example of a file name: "Björk - Homogenic - 01 - Hunter.mp3"

I use iTunes for all my music, and when I added a special character to an artist it didn't seem to get into XBMC. I'll probably try creating another music source that is file based and do what you suggest. I'll look at the CDArt Manager stuff. I might even break down and post something in the plugin development forum.
Funny you mention "Björk". I have a few of her albums and she is tagged with that spelling. XBMC and Artist slideshow has been fine with here. Not had an issue at all ever. Works as intended
(2012-08-21, 17:29)Oddsodz Wrote: [ -> ]Funny you mention "Björk". I have a few of her albums and she is tagged with that spelling. XBMC and Artist slideshow has been fine with here. Not had an issue at all ever. Works as intended
Hi Oddsodz,

don't get confused. We are talking about saving of information on the local disk. Bio/Fanart, etc. so it doesn't have to be scraped every time. See here
That's were we have problems with special chars. During playpack even artists with special chars are displayed fine.

Regards,
Maikl
(2012-08-20, 17:52)dreamkp Wrote: [ -> ]thanks for getting on that so fast.
the new branch script throws an error when playing an artist with special chars and it still doesn't save anything.

OK, let's try this again. This code works properly on my OSX and Windows machines with Björk as an artist. I'm hoping this also fixes the Windows username issue, as it turns out one of the problems relates to the fact that you can't write to the XBMC log in UTF-8. So I had to make sure to re-encode any text string before writing it out.

Here's the updated test code for the non-ascii character issue. If we can get this one resolved, I'll merge it into master and do another pull request into the repo (which will also include the notification fixes then).
(2012-08-21, 19:40)pkscuot Wrote: [ -> ]
(2012-08-20, 17:52)dreamkp Wrote: [ -> ]thanks for getting on that so fast.
the new branch script throws an error when playing an artist with special chars and it still doesn't save anything.

OK, let's try this again. This code works properly on my OSX and Windows machines with Björk as an artist. I'm hoping this also fixes the Windows username issue, as it turns out one of the problems relates to the fact that you can't write to the XBMC log in UTF-8. So I had to make sure to re-encode any text string before writing it out.

Here's the updated test code for the non-ascii character issue. If we can get this one resolved, I'll merge it into master and do another pull request into the repo (which will also include the notification fixes then).

Hi pkscout,

it's getting better. Now artistbio.nfo, artistsalbums.nfo and artistsimilar.nfo are written. Then i get a script error and the log below.
Seems only artistimageshtbackdrops.nfo, artistimageslastfm.nfo and the *.tbn are missing now. We're close Wink

-------------------------
20:52:44 T:2672 ERROR: Error Type: <type 'exceptions.UnicodeDecodeError'>
20:52:44 T:2672 ERROR: Error Contents: 'ascii' codec can't decode byte 0xc3 in position 146: ordinal not in range(128)
20:52:44 T:2672 ERROR: Traceback (most recent call last):
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 742, in <module>
slideshow = Main()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 134, in __init__
self._use_correct_artwork()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 182, in _use_correct_artwork
self._start_download()
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 351, in _start_download
lastfmlist = self._get_images('lastfm')
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 562, in _get_images
log( 'asking for images from: %s' %self.url )
File "C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py", line 77, in log
message = 'script.artistslideshow: %s' % txt.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 146: ordinal not in range(128)
-------------------------

Regards,
Maikl
(2012-08-21, 20:57)dreamkp Wrote: [ -> ]it's getting better. Now artistbio.nfo, artistsalbums.nfo and artistsimilar.nfo are written. Then i get a script error and the log below.
Seems only artistimageshtbackdrops.nfo, artistimageslastfm.nfo and the *.tbn are missing now. We're close Wink

I posted another patch. Same link as above.

Two questions:

1- Do you have AS set to use both local and remote artwork? That's the only way I can figure you got the error where you did. I tested this time with that option.

2- Are you running this with debugging enabled when you first test? The error you got this time was another error where AS was trying to log a non-ascii character to the XBMC log. The only time those logs are written is when XBMC is in debug mode (or at least logging debug messages). It needed to get fixed either way, but I just want to make sure I didn't miss something else.
(2012-08-21, 21:33)pkscuot Wrote: [ -> ]
(2012-08-21, 20:57)dreamkp Wrote: [ -> ]it's getting better. Now artistbio.nfo, artistsalbums.nfo and artistsimilar.nfo are written. Then i get a script error and the log below.
Seems only artistimageshtbackdrops.nfo, artistimageslastfm.nfo and the *.tbn are missing now. We're close Wink

I posted another patch. Same link as above.

Two questions:

1- Do you have AS set to use both local and remote artwork? That's the only way I can figure you got the error where you did. I tested this time with that option.

2- Are you running this with debugging enabled when you first test? The error you got this time was another error where AS was trying to log a non-ascii character to the XBMC log. The only time those logs are written is when XBMC is in debug mode (or at least logging debug messages). It needed to get fixed either way, but I just want to make sure I didn't miss something else.

Hi pkscuot,

it works Big Grin

To answer your questions.
1) Yes, i have it set to both local and remote (can't remember why. read the wiki and decided thats the way to go^^) --> my settings.xml
2) xbmc was not set to debugging mode during the previous test runs. but i use it often to iron out errors (advancedsettings.xml is set to <loglevel>0</loglevel> atm)


One error did show up in the log, but it didn't stop the script:
---------
22:47:32 T:1392 ERROR: C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py:457: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if( xbmc.getInfoLabel( self.ARTISTSLIDESHOW ) == self.BlankDir):
---------
Not sure if that can lead to some unknown effects.

Thank you very much for your efforts. You did me a great favour.

Regards,
Maikl

(2012-08-21, 23:03)dreamkp Wrote: [ -> ][quote='pkscuot' pid='1174213' dateline='1345577612']
One error did show up in the log, but it didn't stop the script:
---------
22:47:32 T:1392 ERROR: C:\xbmc_frodo\portable_data\addons\script.artistslideshow\default.py:457: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if( xbmc.getInfoLabel( self.ARTISTSLIDESHOW ) == self.BlankDir):
---------
Not sure if that can lead to some unknown effects.

Yea, that could probably cause some problems in some very specific (and probably not too often used) situations. I believe I've corrected that, and I posted an updated patch in the same place. If you check one more time, that would be great. Then I think I can merge this in and put in another pull request to get the updates into the official repo.
(2012-08-21, 18:16)dreamkp Wrote: [ -> ]That's were we have problems with special chars. During playpack even artists with special chars are displayed fine.

Regards,
Maikl

Ah, that will teach me not to read everything over again. My bad.

Keep up the good work folks. This is a a very VERY good addon. And one that needs to be added to the core of XBMC at some point. It's is just too good not to have on by default.

(2012-08-21, 23:27)pkscuot Wrote: [ -> ]If you check one more time, that would be great. Then I think I can merge this in and put in another pull request to get the updates into the official repo.

Hi pkscuot,
new version is still working and no errors or warnings in the log.

Well done.

Regards,
Maikl
(2012-08-21, 19:40)pkscuot Wrote: [ -> ]Here's the updated test code for the non-ascii character issue.
Did a test and now it works Smile But i had to delete the other (older) versions before it would, in case thats of any importance.



I think this may be more a skin issue, but lately I noticed that I am no longer able to see "just" the fullscreen artist slideshow fanart but there is also the progress bar, song name, artists name etc displayed. This happens on both confluence and quartz. Is there any way to remove this and just have the fanart slideshow displaying?
(2012-08-23, 18:11)Acrobat76 Wrote: [ -> ]I think this may be more a skin issue, but lately I noticed that I am no longer able to see "just" the fullscreen artist slideshow fanart but there is also the progress bar, song name, artists name etc displayed. This happens on both confluence and quartz. Is there any way to remove this and just have the fanart slideshow displaying?

I did create some notifications in the last version, but not like you are describing. The only thing I added was a notification when downloading of images started and then when they are finished. There is a new beta version that turns the notifications off by default, and I'll be pushing those changes into the official repo tomorrow (most likely). So either try the beta now or wait until this weekend and see if the update fixes it. If it doesn't, I'd like to see a few screenshots and a debug log to see if we can figure out what's going on.
Thanks Pkscout. Im pretty sure it isnt due to your add on per se. And its not a bug. I guess I am posting in the wrong thread as I think its related to skin(s) or even xbmc in general. I have no idea how to post screenshots from an atv2, but basically what I mean is that whereas a few weeks ago the fullscreen mode used to just give me a slideshow of the artist pics, now I get an overlay with all the song's info (artist, album, album pic, progress bar etc). Id like to get rid of this extra overlay and just have the fullscreen slideshow. Guess I need to post in the general forums or the skin sub forums....