SVN commit 1281560 by sandsmark: Add last.fm scrobbling support to JuK. No configuration GUI yet, you have to add a [Scrobbling] section to your jukrc, with a Username=foo and Password=bar field to make it work. Doesn't use liblastfm, because liblastfm doesn't support the latest last.fm API. FEATURE: CCBUG:262194 M +1 -0 CMakeLists.txt M +6 -0 playermanager.cpp M +2 -0 playermanager.h A scrobbler.cpp [License: UNKNOWN] A scrobbler.h [License: GPL (v2+)] --- trunk/KDE/kdemultimedia/juk/CMakeLists.txt #1281559:1281560 @@ -75,6 +75,7 @@ playlistitem.cpp playlistsearch.cpp playlistsplitter.cpp + scrobbler.cpp searchplaylist.cpp searchwidget.cpp slideraction.cpp --- trunk/KDE/kdemultimedia/juk/playermanager.cpp #1281559:1281560 @@ -46,6 +46,7 @@ #include "collectionlist.h" #include "coverinfo.h" #include "tag.h" +#include "scrobbler.h" using namespace ActionCollection; @@ -69,6 +70,10 @@ // later, just disable it here. -- mpyne // setup(); new PlayerAdaptor( this ); + + + m_scrobbler = new Scrobbler(this); + connect(this, SIGNAL(signalItemChanged(FileHandle)), m_scrobbler, SLOT(nowPlaying(FileHandle))); } PlayerManager::~PlayerManager() @@ -216,6 +221,7 @@ // The "currently playing" media object. Phonon::MediaObject *mediaObject = m_media[m_curOutputPath]; + connect(mediaObject, SIGNAL(aboutToFinish()), m_scrobbler, SLOT(scrobble())); if(file.isNull()) { if(paused()) --- trunk/KDE/kdemultimedia/juk/playermanager.h #1281559:1281560 @@ -29,6 +29,7 @@ #include #include +class Scrobbler; class KSelectAction; class StatusLabel; class PlaylistInterface; @@ -127,6 +128,7 @@ FileHandle m_file; PlaylistInterface *m_playlistInterface; StatusLabel *m_statusLabel; + Scrobbler *m_scrobbler; bool m_muted; bool m_setup; bool m_crossfadeTracks;