Suggested Songs gets wedged on a single artist

Jer Johnson jer at gweep.net
Sat Sep 22 21:21:12 UTC 2007


On Sat, Sep 22, 2007 at 01:44:06PM +0200, Martin Steigerwald wrote:
> What is the playlist cache used for? I think I read somewhere, that there 
> is a cache that holds 100-200 tracks for dynamic mode in advance to speed 
> up changing to the next track. Is that the playlist cache? Why does it 
> only contain the first artist and why is it used as a source for 
> Suggested Songs? I thought it would be using my complete collection as a 
> source to choose songs from.

this is the cause of the bug.  What's happening is that the Suggested Artists
list grabbed from last.fm is being stored in memory, and that same list
of artists is used from then on.  the code only checks if there's
data in the cache, not what artist the data was generated from.
 
> Whats the exact issue there? Is there a work-around available? I would 
> like to know this for my article as well, cause when there is a good 
> explaination and/or work-around I'd like to include it.

I'd heard from the developer in charge of this bit of code, and he
said he was going to be re-writing it to take the Artist into account.
but that he was on holiday, and wouldn't get to it for a couple months.

http://mail.kde.org/pipermail/amarok/2006-December/002289.html

that was in december '06, when I'd mentioned what I'd found on the
mailing list. the author wants to do it Right, and leave it broken
until then.


I'd included a new chunk of code in that post, from the
source file dynamicmode.cpp line 378 (approximately):

KURL::List DynamicMode::retrieveTracks( const uint trackCount )
{
DEBUG_BLOCK
    KURL::List retrieval;

    if(( m_cachedItemSet.count() <= trackCount ) || (appendType() == SUGGESTION) )
      {
        debug() << "Refreshing cached items" << endl;
        rebuildCachedItemSet();
      }


the only addition I've made is the "  || (appendType() == SUGGESTION) " , 
which re-generates the cached list of Suggested Artists.
this negates the usefulness of the cache, but makes the Suggested Artists
playlist work properly.  as a user, I prefer the latter.

		-jer
-- 
jer at sidehack.gweep.net           Programmer / Sysadmin / Gweep
mpython at gnu.org          -><-    Author of Xtacy, an X11 Graphics Hack
jer_johnson at real.life.edu        http://www.gweep.net/~jer/index.html
AIM: DruelChaos YM!: DruelChaos  IRC.Freenode: UsagiJer



More information about the Amarok mailing list