mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
Add beginning of spotify playlist updater
This commit is contained in:
@@ -78,6 +78,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
|||||||
|
|
||||||
accounts/spotify/SpotifyAccount.cpp
|
accounts/spotify/SpotifyAccount.cpp
|
||||||
accounts/spotify/SpotifyAccountConfig.cpp
|
accounts/spotify/SpotifyAccountConfig.cpp
|
||||||
|
accounts/spotify/SpotifyPlaylistUpdater.cpp
|
||||||
|
|
||||||
tomahawktrayicon.cpp
|
tomahawktrayicon.cpp
|
||||||
audiocontrols.cpp
|
audiocontrols.cpp
|
||||||
|
61
src/accounts/spotify/SpotifyPlaylistUpdater.cpp
Normal file
61
src/accounts/spotify/SpotifyPlaylistUpdater.cpp
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "SpotifyPlaylistUpdater.h"
|
||||||
|
|
||||||
|
SpotifyPlaylistUpdater::SpotifyPlaylistUpdater(const Tomahawk::playlist_ptr& pl): PlaylistUpdaterInterface(pl)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SpotifyPlaylistUpdater::~SpotifyPlaylistUpdater()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyPlaylistUpdater::loadFromSettings( const QString& group )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyPlaylistUpdater::removeFromSettings( const QString& group ) const
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyPlaylistUpdater::saveToSettings( const QString& group ) const
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
SpotifyPlaylistUpdater::type() const
|
||||||
|
{
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyPlaylistUpdater::updateNow()
|
||||||
|
{
|
||||||
|
}
|
61
src/accounts/spotify/SpotifyPlaylistUpdater.h
Normal file
61
src/accounts/spotify/SpotifyPlaylistUpdater.h
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
|
*
|
||||||
|
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
|
||||||
|
*
|
||||||
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Tomahawk is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SPOTIFYPLAYLISTUPDATER_H
|
||||||
|
#define SPOTIFYPLAYLISTUPDATER_H
|
||||||
|
|
||||||
|
#include "playlist/PlaylistUpdaterInterface.h"
|
||||||
|
|
||||||
|
namespace Tomahawk {
|
||||||
|
namespace Accounts {
|
||||||
|
class SpotifyAccount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class SpotifyPlaylistUpdater : public Tomahawk::PlaylistUpdaterInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SpotifyPlaylistUpdater( const Tomahawk::playlist_ptr& pl );
|
||||||
|
|
||||||
|
virtual ~SpotifyPlaylistUpdater();
|
||||||
|
|
||||||
|
virtual QString type() const;
|
||||||
|
virtual void updateNow();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void removeFromSettings(const QString& group) const;
|
||||||
|
virtual void saveToSettings(const QString& group) const;
|
||||||
|
virtual void loadFromSettings(const QString& group);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Tomahawk::Accounts::SpotifyAccount* m_spotify;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class SpotifyUpdaterFactory : public Tomahawk::PlaylistUpdaterFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SpotifyUpdaterFactory() {}
|
||||||
|
|
||||||
|
virtual Tomahawk::PlaylistUpdaterInterface* create( const Tomahawk::playlist_ptr& pl ) { return new SpotifyPlaylistUpdater( pl ); }
|
||||||
|
virtual QString type() const { return "spotify"; }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SPOTIFYPLAYLISTUPDATER_H
|
@@ -62,6 +62,7 @@
|
|||||||
#include "utils/tomahawkutilsgui.h"
|
#include "utils/tomahawkutilsgui.h"
|
||||||
#include "accounts/lastfm/LastFmAccount.h"
|
#include "accounts/lastfm/LastFmAccount.h"
|
||||||
#include "accounts/spotify/SpotifyAccount.h"
|
#include "accounts/spotify/SpotifyAccount.h"
|
||||||
|
#include "accounts/spotify/SpotifyPlaylistUpdater.h"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user