Release Artist Slideshow addon (with skin and addon integration)
Hi pkscout,

First of all thanks very much for your add-on. I've been a user for a good while and it's excellent.

Anyway I just wanted to bring up an issue that I've recently encountered, to see if it's expected or known, and to share my workaround.

As we know, the audiodb api is currently unavailable, and since I'm using AS with streaming services (specifically I use AS with the Sonos plugin) I don't have the ability to embed musicbrainz artist IDs in my files. This had been no problem up until now, since AS did a lookup for the MBID from audiodb.

Since that's unavailable I started experimenting with adding "musicbrainz.nfo" files, containing the MBID, into the individual artist directories that the plugin creates. This wasn't working so I did some debugging...

What I noticed was that for the artist ID : 4bd95eea-b9f6-4d70-a36c-cfea77431553, the URL being generated was like this.


Code:
19:04:54.011 T:123145309356032   DEBUG: [Artist Slideshow] the url is: http://webservice.fanart.tv/v3/music/4bd95eea-b9f6-4d70-a36c-cfea77431553%0A?api_key=7a93c84fe1c9999e6f0fec206a66b0f5

Notice the %0A being added after the MBID which is the escaped linefeed character. What appears to be happening is that this call at line 534

Code:
rawdata = readFile( filename )

is returning the contents of the file with a "\n" at the end.

So I made an edit to the default.py adding the following at line 536 to strip this away

Code:
rawdata = rawdata.rstrip('\n')

...and bingo everything starts working as expected. So, I'm a happy man, but aware that might just be a hack. Is this something you've come across before? It would appear that readFile() always adds the "\n" at the end in python (I'm a Java programmer by background and don't have much python experience)

Cheers,
Mark
Reply


Messages In This Thread
New Test Version Available - by pkscout - 2012-03-08, 16:26
[No subject] - by mardup - 2012-03-10, 12:26
[No subject] - by pkscout - 2012-03-11, 01:35
RE: - by mardup - 2012-03-12, 17:50
RE: - by pkscout - 2012-03-13, 03:22
New Beta Version for Testing - by pkscout - 2012-07-13, 17:54
New Beta Version for Testing - by pkscout - 2012-07-14, 22:50
Pull Request for v1.4 Submitted - by pkscout - 2012-07-20, 23:01
New Beta Version for Testing - by pkscout - 2012-08-10, 03:18
New Frodo BETA Support Files - by pkscout - 2012-11-21, 06:20
New 2.0.0 Beta Coming Soon - by pkscout - 2016-05-12, 02:54
RE: [RELEASE] Artist Slideshow 1.3.0 addon (with skin and addon integration) - by spiderlane - 2017-01-27, 21:52
Writing tips - by Parkerbup - 2017-02-03, 14:56
Add-on Artist Slideshow - by jo26 - 2014-08-08, 22:58
Logout Mark Read Team Forum Stats Members Help
Artist Slideshow addon (with skin and addon integration)5