diff --git a/src/services/CMakeLists.txt b/src/services/CMakeLists.txt --- a/src/services/CMakeLists.txt +++ b/src/services/CMakeLists.txt @@ -17,7 +17,7 @@ endif() if( LIBLASTFM_FOUND ) -# add_subdirectory( lastfm ) // Needs more work + add_subdirectory( lastfm ) endif() add_subdirectory( opmldirectory ) diff --git a/src/services/lastfm/AvatarDownloader.cpp b/src/services/lastfm/AvatarDownloader.cpp --- a/src/services/lastfm/AvatarDownloader.cpp +++ b/src/services/lastfm/AvatarDownloader.cpp @@ -38,7 +38,8 @@ m_userAvatarUrls.insert( url, username ); The::networkAccessManager()->getData( url, this, - SLOT(downloaded(QUrl,QByteArray,NetworkAccessManagerProxy::Error)) ); + &AvatarDownloader::downloaded); + } void diff --git a/src/services/lastfm/LastFmConfigWidget.ui b/src/services/lastfm/LastFmConfigWidget.ui --- a/src/services/lastfm/LastFmConfigWidget.ui +++ b/src/services/lastfm/LastFmConfigWidget.ui @@ -7,7 +7,7 @@ 0 0 450 - 460 + 416 @@ -17,9 +17,31 @@ - + 0 + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 0 + 0 + + + + @@ -91,26 +113,6 @@ - - - - Why not join the <a href="http://www.last.fm:80/group/Amarok+Users">Amarok Last.fm group</a> and share your musical tastes with other Amarok users? - - - true - - - true - - - - - - - Qt::Vertical - - - @@ -200,6 +202,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -210,13 +218,6 @@ - - - QLineEdit - QLineEdit -
qlineedit.h
-
-
kcfg_ScrobblerUsername kcfg_ScrobblerPassword diff --git a/src/services/lastfm/LastFmService.cpp b/src/services/lastfm/LastFmService.cpp --- a/src/services/lastfm/LastFmService.cpp +++ b/src/services/lastfm/LastFmService.cpp @@ -54,12 +54,6 @@ #include -QString md5( const QByteArray& src ) -{ - QByteArray const digest = QCryptographicHash::hash( src, QCryptographicHash::Md5 ); - return QString::fromLatin1( digest.toHex() ).rightJustified( 32, '0' ); -} - LastFmServiceFactory::LastFmServiceFactory() : ServiceFactory() {} @@ -105,7 +99,7 @@ DEBUG_BLOCK setShortDescription( i18n( "Last.fm: The social music revolution" ) ); setIcon( QIcon::fromTheme( "view-services-lastfm-amarok" ) ); - setLongDescription( i18n( "Last.fm is a popular online service that provides personal radio stations and music recommendations. A personal listening station is tailored based on your listening habits and provides you with recommendations for new music. It is also possible to play stations with music that is similar to a particular artist as well as listen to streams from people you have added as friends or that Last.fm considers your musical \"neighbors\"" ) ); + setLongDescription( i18n( "Last.fm is a popular online service that provides personal radio stations and music recommendations. A personal listening station is tailored based on your listening habits and provides you with recommendations for new music. It is also possible to play stations with music that is similar to a particular artist as well as listen to streams from people you have added as friends" ) ); setImagePath( QStandardPaths::locate( QStandardPaths::GenericDataLocation, "amarok/images/hover_info_lastfm.png" ) ); //We have no use for searching currently.. @@ -115,6 +109,9 @@ lastfm::ws::ApiKey = Amarok::lastfmApiKey(); lastfm::ws::SharedSecret = Amarok::lastfmApiSharedSecret(); + // HTTPS is the only scheme supported by Auth + lastfm::ws::setScheme(lastfm::ws::Https); + // set the nam TWICE. Yes. It prevents liblastfm from deleting it, see their code lastfm::setNetworkAccessManager( The::networkAccessManager() ); lastfm::setNetworkAccessManager( The::networkAccessManager() ); @@ -161,7 +158,7 @@ StatSyncing::Controller *controller = Amarok::Components::statSyncingController(); if( m_scrobbler && controller ) - controller->unregisterScrobblingService( StatSyncing::ScrobblingServicePtr( m_scrobbler.data() ) ); + controller->unregisterScrobblingService( m_scrobbler.staticCast() ); if( m_synchronizationAdapter && controller ) controller->unregisterProvider( m_synchronizationAdapter ); } @@ -207,12 +204,10 @@ m_authenticateReply = 0; } - const QString authToken = md5( QString( "%1%2" ).arg( m_config->username(), - md5( m_config->password().toUtf8() ) ).toUtf8() ); QMap query; query[ "method" ] = "auth.getMobileSession"; + query[ "password" ] = m_config->password(); query[ "username" ] = m_config->username(); - query[ "authToken" ] = authToken; m_authenticateReply = lastfm::ws::post( query ); connect( m_authenticateReply, &QNetworkReply::finished, this, &LastFmService::onAuthenticated ); // calls continueReconfiguring() } @@ -236,14 +231,14 @@ if( m_scrobbler && (!authenticated || !m_config->scrobble()) ) { debug() << __PRETTY_FUNCTION__ << "unregistering and destroying ScrobblerAdapter"; - controller->unregisterScrobblingService( StatSyncing::ScrobblingServicePtr( m_scrobbler.data() ) ); + controller->unregisterScrobblingService( m_scrobbler.staticCast() ); m_scrobbler.clear(); } else if( !m_scrobbler && authenticated && m_config->scrobble() ) { debug() << __PRETTY_FUNCTION__ << "creating and registering ScrobblerAdapter"; m_scrobbler = QSharedPointer( new ScrobblerAdapter( "Amarok", m_config ) ); - controller->registerScrobblingService( StatSyncing::ScrobblingServicePtr( m_scrobbler.data() ) ); + controller->registerScrobblingService( m_scrobbler.staticCast() ); } if( m_synchronizationAdapter && !authenticated ) diff --git a/src/services/lastfm/LastFmServiceCollection.h b/src/services/lastfm/LastFmServiceCollection.h --- a/src/services/lastfm/LastFmServiceCollection.h +++ b/src/services/lastfm/LastFmServiceCollection.h @@ -45,15 +45,11 @@ virtual QueryMaker* queryMaker(); private Q_SLOTS: - void slotAddNeighboursLoved(); - void slotAddNeighboursPersonal(); void slotAddFriendsLoved(); void slotAddFriendsPersonal(); private: QMap< QString, QNetworkReply* > m_jobs; - Meta::ServiceGenre *m_neighborsLoved; - Meta::ServiceGenre *m_neighborsPersonal; Meta::ServiceGenre *m_friendsLoved; Meta::ServiceGenre *m_friendsPersonal; }; diff --git a/src/services/lastfm/LastFmServiceCollection.cpp b/src/services/lastfm/LastFmServiceCollection.cpp --- a/src/services/lastfm/LastFmServiceCollection.cpp +++ b/src/services/lastfm/LastFmServiceCollection.cpp @@ -37,14 +37,6 @@ Meta::GenrePtr globalTagsPtr( globalTags ); addGenre( globalTagsPtr ); - m_neighborsLoved = new Meta::ServiceGenre( i18n( "Neighbors' Loved Radio" ) ); - Meta::GenrePtr neighborsLovedPtr( m_neighborsLoved ); - addGenre( neighborsLovedPtr ); - - m_neighborsPersonal = new Meta::ServiceGenre( i18n( "Neighbors' Personal Radio" ) ); - Meta::GenrePtr neighborsPersonalPtr( m_neighborsPersonal ); - addGenre( neighborsPersonalPtr ); - m_friendsLoved = new Meta::ServiceGenre( i18n( "Friends' Loved Radio" ) ); Meta::GenrePtr friendsLovedPtr( m_friendsLoved ); addGenre( friendsLovedPtr ); @@ -55,7 +47,7 @@ // Only show these if the user is a subscriber. QStringList lastfmPersonal; - lastfmPersonal << "personal" << "recommended" << "loved" << "neighbours"; + lastfmPersonal << "personal" << "recommended" << "loved"; foreach( const QString &station, lastfmPersonal ) { @@ -81,15 +73,8 @@ } QMap< QString, QString > params; - params[ "method" ] = "user.getNeighbours"; - params[ "user" ] = userName; - m_jobs[ "user.getNeighbours" ] = lastfm::ws::post( params ); - - connect( m_jobs[ "user.getNeighbours" ], &QNetworkReply::finished, this, &LastFmServiceCollection::slotAddNeighboursLoved ); - //connect( m_jobs[ "user.getNeighbours" ], &QNetworkReply::finished, this, &LastFmServiceCollection::slotAddNeighboursPersonal ); - // TODO TMP HACK why do i get exceptions there...!? - params[ "method" ] = "user.getFriends"; + params[ "user" ] = userName; m_jobs[ "user.getFriends" ] = lastfm::ws::post( params ); connect( m_jobs[ "user.getFriends" ], &QNetworkReply::finished, this, &LastFmServiceCollection::slotAddFriendsLoved ); @@ -130,101 +115,6 @@ return i18n( "Last.fm" ); } -void LastFmServiceCollection::slotAddNeighboursLoved() -{ - DEBUG_BLOCK - if( !m_jobs[ "user.getNeighbours" ] ) - { - debug() << "BAD! got no result object"; - return; - } - switch (m_jobs[ "user.getNeighbours" ]->error()) - { - case QNetworkReply::NoError: - { - // iterate through each neighbour - lastfm::XmlQuery lfm; - if( lfm.parse( m_jobs[ "user.getNeighbours" ]->readAll() ) ) - { - foreach( const lastfm::XmlQuery &e, lfm[ "neighbours" ].children( "user" ) ) - { - const QString name = e[ "name" ].text(); - //debug() << "got neighbour!!! - " << name; - LastFm::Track *track = new LastFm::Track( "lastfm://user/" + name + "/loved" ); - Meta::TrackPtr trackPtr( track ); - m_neighborsLoved->addTrack( trackPtr ); - addTrack( trackPtr ); - } - - } - else - { - debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message(); - } - break; - } - - case QNetworkReply::AuthenticationRequiredError: - debug() << "Last.fm: errorMessage: Sorry, we don't recognise that username, or you typed the password incorrectly."; - break; - - default: - debug() << "Last.fm: errorMessage: There was a problem communicating with the Last.fm services. Please try again later."; - break; - } - - m_jobs[ "user.getNeighbours" ]->deleteLater(); -} - -void LastFmServiceCollection::slotAddNeighboursPersonal() -{ - DEBUG_BLOCK - switch (m_jobs[ "user.getNeighbours" ]->error()) - { - case QNetworkReply::NoError: - { - // iterate through each neighbour - if( !m_jobs[ "user.getNeighbours" ] ) - { - debug() << "BAD! got no result object"; - return; - } - lastfm::XmlQuery lfm; - if( lfm.parse( m_jobs[ "user.getNeighbours" ]->readAll() ) ) - { - // iterate through each neighbour - foreach( const lastfm::XmlQuery &e, lfm[ "neighbours" ].children( "user" ) ) - { - const QString name = e[ "name" ].text(); - debug() << "got neighbour!!! - " << name; - LastFm::Track *track = new LastFm::Track( "lastfm://user/" + name + "/personal" ); - Meta::TrackPtr trackPtr( track ); - m_neighborsPersonal->addTrack( trackPtr ); - addTrack( trackPtr ); - } - - - // should be safe, as both slots SHOULD get called before we return to the event loop... - m_jobs[ "user.getNeighbours" ]->deleteLater(); - } - else - { - debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message(); - } - break; - } - - case QNetworkReply::AuthenticationRequiredError: - debug() << "Last.fm: errorMessage: Sorry, we don't recognise that username, or you typed the password incorrectly."; - break; - - default: - debug() << "Last.fm: errorMessage: There was a problem communicating with the Last.fm services. Please try again later."; - break; - } - -} - void LastFmServiceCollection::slotAddFriendsLoved() { DEBUG_BLOCK diff --git a/src/services/lastfm/LastFmServiceConfig.h b/src/services/lastfm/LastFmServiceConfig.h --- a/src/services/lastfm/LastFmServiceConfig.h +++ b/src/services/lastfm/LastFmServiceConfig.h @@ -18,7 +18,7 @@ #ifndef LASTFMSERVICECONFIG_H #define LASTFMSERVICECONFIG_H -#include "services/lastfm/amarok_lastfm_shared_export.h" +#include "services/lastfm/amarok_service_lastfm_config_export.h" #include #include @@ -36,7 +36,7 @@ * connect to the updated() signal and listen to changes, especially ones to username, * password or sessionKey. */ -class AMAROK_LASTFM_SHARED_EXPORT LastFmServiceConfig : public QObject +class AMAROK_SERVICE_LASTFM_CONFIG_EXPORT LastFmServiceConfig : public QObject { Q_OBJECT public: diff --git a/src/services/lastfm/LastFmServiceSettings.h b/src/services/lastfm/LastFmServiceSettings.h --- a/src/services/lastfm/LastFmServiceSettings.h +++ b/src/services/lastfm/LastFmServiceSettings.h @@ -25,6 +25,8 @@ #include +#include + namespace Ui { class LastFmConfigWidget; } class LastFmServiceSettings : public KCModule diff --git a/src/services/lastfm/LastFmServiceSettings.cpp b/src/services/lastfm/LastFmServiceSettings.cpp --- a/src/services/lastfm/LastFmServiceSettings.cpp +++ b/src/services/lastfm/LastFmServiceSettings.cpp @@ -37,13 +37,6 @@ K_PLUGIN_FACTORY_WITH_JSON( LastFmServiceSettingsFactory, "amarok_service_lastfm_config.json", registerPlugin(); ) -QString md5( const QByteArray& src ) -{ - QByteArray const digest = QCryptographicHash::hash( src, QCryptographicHash::Md5 ); - return QString::fromLatin1( digest.toHex() ).rightJustified( 32, '0' ); -} - - LastFmServiceSettings::LastFmServiceSettings( QWidget *parent, const QVariantList &args ) : KCModule( parent, args ) , m_config( LastFmServiceConfig::instance() ) @@ -110,20 +103,17 @@ // set the global static Lastfm::Ws stuff lastfm::ws::ApiKey = Amarok::lastfmApiKey(); lastfm::ws::SharedSecret = Amarok::lastfmApiSharedSecret(); - lastfm::ws::Username = m_configDialog->kcfg_ScrobblerUsername->text(); + lastfm::ws::setScheme(lastfm::ws::Https); if( lastfm::nam() != The::networkAccessManager() ) lastfm::setNetworkAccessManager( The::networkAccessManager() ); - debug() << "username:" << QString( QUrl::toPercentEncoding( lastfm::ws::Username ) ); - - const QString authToken = md5( QString( "%1%2" ).arg( m_configDialog->kcfg_ScrobblerUsername->text() ) - .arg( md5( m_configDialog->kcfg_ScrobblerPassword->text().toUtf8() ) ).toUtf8() ); + debug() << "username:" << QString( QUrl::toPercentEncoding( m_configDialog->kcfg_ScrobblerUsername->text().toUtf8() ) ); - // now authenticate w/ last.fm and get our session key QMap query; + query[ "method" ] = "auth.getMobileSession"; - query[ "username" ] = m_configDialog->kcfg_ScrobblerUsername->text(); - query[ "authToken" ] = authToken; + query[ "password" ] = m_configDialog->kcfg_ScrobblerPassword->text().toUtf8(); + query[ "username" ] = m_configDialog->kcfg_ScrobblerUsername->text().toUtf8(); m_authQuery = lastfm::ws::post( query ); connect( m_authQuery, &QNetworkReply::finished, this, &LastFmServiceSettings::onAuthenticated ); diff --git a/src/services/lastfm/LastFmTreeModel.h b/src/services/lastfm/LastFmTreeModel.h --- a/src/services/lastfm/LastFmTreeModel.h +++ b/src/services/lastfm/LastFmTreeModel.h @@ -37,31 +37,18 @@ MyRecommendations, PersonalRadio, MixRadio, - NeighborhoodRadio, - // RecentlyPlayed, - // RecentlyLoved, - // RecentlyBanned, TopArtists, MyTags, Friends, - Neighbors, - - // History, - RowCount, - MyTagsChild, FriendsChild, - NeighborsChild, ArtistsChild, RecentlyBannedTrack, RecentlyPlayedTrack, RecentlyLovedTrack, HistoryStation, - UserChildPersonal, - UserChildNeighborhood, - TypeUnknown }; @@ -109,7 +96,6 @@ private Q_SLOTS: void onAvatarDownloaded( const QString& username, QPixmap ); - void slotAddNeighbors(); void slotAddFriends(); void slotAddTags(); void slotAddTopArtists(); @@ -127,7 +113,6 @@ LastFmTreeItem *m_rootItem; LastFmTreeItem *m_myTags; LastFmTreeItem *m_myFriends; - LastFmTreeItem *m_myNeighbors; LastFmTreeItem *m_myTopArtists; QHash m_avatars; }; diff --git a/src/services/lastfm/LastFmTreeModel.cpp b/src/services/lastfm/LastFmTreeModel.cpp --- a/src/services/lastfm/LastFmTreeModel.cpp +++ b/src/services/lastfm/LastFmTreeModel.cpp @@ -41,8 +41,6 @@ setupModelData( m_rootItem ); QNetworkReply *reply; - reply = m_user.getNeighbours(); - connect(reply, &QNetworkReply::finished, this, &LastFmTreeModel::slotAddNeighbors ); reply = m_user.getFriends(); connect( reply, &QNetworkReply::finished, this, &LastFmTreeModel::slotAddFriends ); @@ -59,49 +57,6 @@ delete m_rootItem; } -void -LastFmTreeModel::slotAddNeighbors() -{ - QNetworkReply *reply = qobject_cast( sender() ); - if( !reply ) - { - debug() << __PRETTY_FUNCTION__ << "null reply!"; - return; - } - reply->deleteLater(); - - lastfm::XmlQuery lfm; - if( lfm.parse( reply->readAll() ) ) - { - QList children = lfm[ "neighbours" ].children( "user" ); - int start = m_myNeighbors->childCount(); - QModelIndex parent = index( m_myNeighbors->row(), 0 ); - beginInsertRows( parent, start, start + children.size() ); - - foreach( const lastfm::XmlQuery &e, children ) - { - const QString name = e[ "name" ].text(); - - LastFmTreeItem* neighbor = new LastFmTreeItem( mapTypeToUrl(LastFm::NeighborsChild, name), - LastFm::NeighborsChild, name, m_myNeighbors ); - QUrl avatarUrl( e[ QLatin1String("image size=small") ].text() ); - if( !avatarUrl.isEmpty() ) - neighbor->setAvatarUrl( avatarUrl ); - - m_myNeighbors->appendChild( neighbor ); - appendUserStations( neighbor, name ); - } - - endInsertRows(); - emit dataChanged( parent, parent ); - } - else - { - debug() << "Got exception in parsing from last.fm:" << lfm.parseError().message(); - return; - } -} - void LastFmTreeModel::slotAddFriends() { @@ -239,10 +194,7 @@ // beginInsertRows(). LastFmTreeItem* personal = new LastFmTreeItem( mapTypeToUrl( LastFm::UserChildPersonal, user ), LastFm::UserChildPersonal, i18n( "Personal Radio" ), item ); - LastFmTreeItem* neigh = new LastFmTreeItem( mapTypeToUrl( LastFm::UserChildNeighborhood, user ), - LastFm::UserChildNeighborhood, i18n( "Neighborhood" ), item ); item->appendChild( personal ); - item->appendChild( neigh ); } void @@ -288,7 +240,7 @@ // these 2 categories have a chance to be updated: QList categories; - categories << m_myFriends << m_myNeighbors; + categories << m_myFriends; // now go through all children of the categories and notify view as appropriate foreach( LastFmTreeItem *category, categories ) @@ -359,30 +311,15 @@ return i18n( "My Radio Station" ); case MixRadio: return i18n( "My Mix Radio" ); - case NeighborhoodRadio: - return i18n( "My Neighborhood" ); - // case RecentlyPlayed: return tr("Recently Played"); - // case RecentlyLoved: return tr("Recently Loved"); - // case RecentlyBanned: return tr("Recently Banned"); case TopArtists: return i18n( "My Top Artists" ); case MyTags: return i18n( "My Tags" ); case Friends: return i18n( "Friends" ); - case Neighbors: - return i18n( "Neighbors" ); - // case History: return tr("History"); - - // case RecentlyPlayedTrack: return m_played.value( index.row() ); - // case RecentlyLovedTrack: return m_loved.value( index.row() ); - // case RecentlyBannedTrack: return m_banned.value( index.row() ); -// case MyTagsChild: return m_tags.value( index.row() ); case FriendsChild: case ArtistsChild: - case NeighborsChild: case UserChildPersonal: - case UserChildNeighborhood: case MyTagsChild: return i->data(); default: @@ -400,17 +337,10 @@ return QIcon::fromTheme( "lastfm-personal-radio-amarok" ); case MixRadio: return QIcon::fromTheme( "lastfm-mix-radio-amarok" ); - case NeighborhoodRadio: - return QIcon::fromTheme( "lastfm-neighbour-radio-amarok" ); - // case RecentlyPlayed: return QIcon::fromTheme( "lastfm-recent-tracks-amarok" ); - // case RecentlyLoved: return QIcon::fromTheme( "lastfm-recently-loved-amarok" ); - // case RecentlyBanned: return QIcon::fromTheme( "lastfm-recently-banned-amarok" ); case MyTags: return QIcon::fromTheme( "lastfm-my-tags-amarok" ); case Friends: return QIcon::fromTheme( "lastfm-my-friends-amarok" ); - case Neighbors: - return QIcon::fromTheme( "lastfm-my-neighbours-amarok" ); case RecentlyPlayedTrack: Q_FALLTHROUGH(); @@ -425,11 +355,6 @@ return avatar( i->data().toString(), i->avatarUrl() ); case UserChildPersonal: return QIcon::fromTheme( "lastfm-personal-radio-amarok" ); - case UserChildNeighborhood: - return QIcon::fromTheme( "lastfm-neighbour-radio-amarok" ); - - case NeighborsChild: - return avatar( i->data().toString(), i->avatarUrl() ); case HistoryStation: return QIcon::fromTheme( "icon_radio" ); @@ -446,13 +371,10 @@ case LastFm::MyRecommendations: case LastFm::PersonalRadio: case LastFm::MixRadio: - case LastFm::NeighborhoodRadio: case LastFm::FriendsChild: - case LastFm::NeighborsChild: case LastFm::MyTagsChild: case LastFm::ArtistsChild: case LastFm::UserChildPersonal: - case LastFm::UserChildNeighborhood: return QVariant::fromValue( i->track() ); default: break; @@ -477,17 +399,14 @@ case MyRecommendations: case PersonalRadio: case MixRadio: - case NeighborhoodRadio: case RecentlyPlayedTrack: case RecentlyLovedTrack: case RecentlyBannedTrack: case MyTagsChild: case FriendsChild: case ArtistsChild: - case NeighborsChild: case HistoryStation: case UserChildPersonal: - case UserChildNeighborhood: flags |= Qt::ItemIsSelectable; break; @@ -498,13 +417,11 @@ switch( i->type() ) { case UserChildPersonal: - case UserChildNeighborhood: case MyTagsChild: case ArtistsChild: case MyRecommendations: case PersonalRadio: case MixRadio: - case NeighborhoodRadio: flags |= Qt::ItemIsDragEnabled; default: @@ -572,7 +489,6 @@ parent->appendChild( new LastFmTreeItem( mapTypeToUrl( LastFm::MyRecommendations ), LastFm::MyRecommendations, parent ) ); parent->appendChild( new LastFmTreeItem( mapTypeToUrl( LastFm::PersonalRadio ), LastFm::PersonalRadio, parent ) ); parent->appendChild( new LastFmTreeItem( mapTypeToUrl( LastFm::MixRadio ), LastFm::MixRadio, parent ) ); - parent->appendChild( new LastFmTreeItem( mapTypeToUrl( LastFm::NeighborhoodRadio ), LastFm::NeighborhoodRadio, parent ) ); m_myTopArtists = new LastFmTreeItem( LastFm::TopArtists, parent ); parent->appendChild( m_myTopArtists ); @@ -583,8 +499,6 @@ m_myFriends = new LastFmTreeItem( LastFm::Friends, parent ); parent->appendChild( m_myFriends ); - m_myNeighbors = new LastFmTreeItem( LastFm::Neighbors, parent ); - parent->appendChild( m_myNeighbors ); } QString @@ -599,20 +513,14 @@ return "lastfm://user/" + encoded_username + "/personal"; case MixRadio: return "lastfm://user/" + encoded_username + "/mix"; - case NeighborhoodRadio: - return "lastfm://user/" + encoded_username + "/neighbours"; case MyTagsChild: return "lastfm://usertags/" + encoded_username + "/" + QUrl::toPercentEncoding( key ); case FriendsChild: return "lastfm://user/" + QUrl::toPercentEncoding( key ) + "/personal"; case ArtistsChild: return "lastfm://artist/" + QUrl::toPercentEncoding( key ) + "/similarartists"; - case NeighborsChild: - return "lastfm://user/" + QUrl::toPercentEncoding( key ) + "/personal"; case UserChildPersonal: return "lastfm://user/" + QUrl::toPercentEncoding( key ) + "/personal"; - case UserChildNeighborhood: - return "lastfm://user/" + QUrl::toPercentEncoding( key ) + "/neighbours"; default: return ""; } diff --git a/src/services/lastfm/LastFmTreeView.cpp b/src/services/lastfm/LastFmTreeView.cpp --- a/src/services/lastfm/LastFmTreeView.cpp +++ b/src/services/lastfm/LastFmTreeView.cpp @@ -85,13 +85,10 @@ case LastFm::MyRecommendations: case LastFm::PersonalRadio: case LastFm::MixRadio: - case LastFm::NeighborhoodRadio: case LastFm::FriendsChild: - case LastFm::NeighborsChild: case LastFm::MyTagsChild: case LastFm::ArtistsChild: case LastFm::UserChildPersonal: - case LastFm::UserChildNeighborhood: { if ( m_appendAction == 0 ) { diff --git a/src/services/lastfm/meta/LastFmMultiPlayableCapability.h b/src/services/lastfm/meta/LastFmMultiPlayableCapability.h --- a/src/services/lastfm/meta/LastFmMultiPlayableCapability.h +++ b/src/services/lastfm/meta/LastFmMultiPlayableCapability.h @@ -19,6 +19,7 @@ #include "core/support/Components.h" #include "core/support/Debug.h" +#include "core/logger/Logger.h" #include "MainWindow.h" #include "LastFmMeta.h" #include "core/meta/forward_declarations.h"