Release Artist Slideshow addon (with skin and addon integration)
(2013-09-10, 13:07)McMuzz4 Wrote: Hi pkscuot,

Your statement is very untrue - your information was actually very, very helpful and drove me find motivation to explore to discover a solution and create a patch!! Big Grin

tl;dr: For some reason Spotimc doesn't like the many repeated JSON requests to the API (though i'm not sure why it only stutters beginning from playback of the second song) - I've posted my solution below.

long version:
After studying the debug log I determined that the pausing occurs exactly when the info is logged "CSoftAEStream::GetFrame - Underrun". Each time this occurred was shortly after a JSON query from artist slideshow that you mentioned. After a bit of googling i discovered that audio stutting + JSON queries could be related to a possible bug with Linux and AudioEngine: http://forum.xbmc.org/showthread.php?tid=147822 where large amounts of JSON queries cause stuttering. I'm still at a loss why the stuttering occurs only after the first song finishes - but anyway..

So I perform some testing:

My first test was I edited the Artist Slideshow python script to allow the first song play through then sleep the artist slideshow script when the second song starts for 10 to 40 seconds, just before the JSON request. This didn't result in anything positive it began stuttering/skipping when AS script finished sleeping.

My second test was to detect if a Spotify stream is playing and pause every second before the JSON query. This resulted in a little less stuttering, so i continued to adjusting until i found a sweet spot at 10 seconds to stop the songs stuttering/skipping. But this was frustrating because while it solved the problem it prevented AS from functioning nice and quickly and took a very long time for artist information to populate, sometimes not until a few songs of playback.

My third test which I have put below is my solution - it will detect if a new song is playing that is a Spotify stream, and if so it will perform the JSON call once and store the response value in a variable. It will then use the stored JSON response to query artist information and not won't call the JSON API again until a different song starts playing

My patch consists of the following, I made changes to two functions:

(btw I'm sure it could be done better I've never used python before - also sorry but I've never contributed to code before so apologies if I should be doing this differently)

Hi!
I'm very interested in this, but I couldn't get your patch to work when I tried to add it manually. I might have done something wrong. Any chance you could upload the file with the modification?
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
RE: [RELEASE] Artist Slideshow 1.3.0 addon (with skin and addon integration) - by lr10 - 2013-09-10, 21:33
New 2.0.0 Beta Coming Soon - by pkscout - 2016-05-12, 02:54
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