From 456e57cf20f855008bac8630f68f5e8f354aed8f Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Tue, 24 May 2011 08:08:50 -0400 Subject: [PATCH] If no artist or description or song is specified, default to song-radio. This makes a bunch of stations/playlists with mood/style only work --- .../playlist/dynamic/echonest/EchonestGenerator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libtomahawk/playlist/dynamic/echonest/EchonestGenerator.cpp b/src/libtomahawk/playlist/dynamic/echonest/EchonestGenerator.cpp index 49dcf1856..ee55ae3a0 100644 --- a/src/libtomahawk/playlist/dynamic/echonest/EchonestGenerator.cpp +++ b/src/libtomahawk/playlist/dynamic/echonest/EchonestGenerator.cpp @@ -226,6 +226,12 @@ EchonestGenerator::getParams() throw( std::runtime_error ) connect( r, SIGNAL( finished() ), this, SLOT( songLookupFinished() ) ); } } + + if( m_waiting.isEmpty() ) { + m_storedParams.clear(); + emit paramsGenerated( params ); + } + } else { emit paramsGenerated( params ); } @@ -376,6 +382,8 @@ EchonestGenerator::appendRadioType( Echonest::DynamicPlaylist::PlaylistParams& p params.append( Echonest::DynamicPlaylist::PlaylistParamData( Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::ArtistRadioType ) ); else if( onlyThisArtistType( Echonest::DynamicPlaylist::SongRadioType ) ) params.append( Echonest::DynamicPlaylist::PlaylistParamData( Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::SongRadioType ) ); + else // no artist or song or description types. default to song-radio + params.append( Echonest::DynamicPlaylist::PlaylistParamData( Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::SongRadioType ) ); return static_cast< Echonest::DynamicPlaylist::ArtistTypeEnum >( params.last().second.toInt() ); }