1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 08:04:25 +02:00

Add beginning of spotify playlist updater

This commit is contained in:
Leo Franchi
2012-03-18 15:45:55 -04:00
parent 6de0656794
commit 1468d3c0dc
4 changed files with 124 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
accounts/spotify/SpotifyAccount.cpp
accounts/spotify/SpotifyAccountConfig.cpp
accounts/spotify/SpotifyPlaylistUpdater.cpp
tomahawktrayicon.cpp
audiocontrols.cpp

View 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()
{
}

View 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

View File

@@ -62,6 +62,7 @@
#include "utils/tomahawkutilsgui.h"
#include "accounts/lastfm/LastFmAccount.h"
#include "accounts/spotify/SpotifyAccount.h"
#include "accounts/spotify/SpotifyPlaylistUpdater.h"
#include "config.h"