Remove Grooveshark and Spotify search playlist: we don't use them anymore since we can search on these services through the Internet tab

This commit is contained in:
Arnaud Bienner 2012-07-16 00:27:43 +02:00
parent 20987e140d
commit 16fde37bac
7 changed files with 0 additions and 192 deletions

View File

@ -161,7 +161,6 @@ set(SOURCES
internet/digitallyimportedurlhandler.cpp
internet/geolocator.cpp
internet/groovesharkradio.cpp
internet/groovesharksearchplaylisttype.cpp
internet/groovesharkservice.cpp
internet/groovesharksettingspage.cpp
internet/groovesharkurlhandler.cpp
@ -772,7 +771,6 @@ optional_source(HAVE_SPOTIFY
SOURCES
globalsearch/spotifysearchprovider.cpp
internet/spotifyblobdownloader.cpp
internet/spotifysearchplaylisttype.cpp
internet/spotifyserver.cpp
internet/spotifyservice.cpp
internet/spotifysettingspage.cpp

View File

@ -1,46 +0,0 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "groovesharksearchplaylisttype.h"
#include "groovesharkservice.h"
const char* GroovesharkSearchPlaylistType::kName = "grooveshark-search";
GroovesharkSearchPlaylistType::GroovesharkSearchPlaylistType(GroovesharkService* service)
: service_(service) {
}
QIcon GroovesharkSearchPlaylistType::icon(Playlist* playlist) const {
return QIcon(":providers/grooveshark.png");
}
QString GroovesharkSearchPlaylistType::search_hint_text(Playlist* playlist) const {
return QObject::tr("Search Grooveshark");
}
QString GroovesharkSearchPlaylistType::empty_playlist_text(Playlist* playlist) const {
return QObject::tr("Start typing in the search box above to find music on %1.").arg("Grooveshark");
}
bool GroovesharkSearchPlaylistType::has_special_search_behaviour(Playlist* playlist) const {
return true;
}
void GroovesharkSearchPlaylistType::Search(const QString& text, Playlist* playlist) {
service_->Search(text, playlist);
}

View File

@ -1,43 +0,0 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROOVESHARKSEARCHPLAYLISTTYPE_H
#define GROOVESHARKSEARCHPLAYLISTTYPE_H
#include "playlist/specialplaylisttype.h"
class GroovesharkService;
class GroovesharkSearchPlaylistType : public SpecialPlaylistType {
public:
GroovesharkSearchPlaylistType(GroovesharkService* service);
static const char* kName;
virtual QString name() const { return kName; }
virtual QIcon icon(Playlist* playlist) const;
virtual QString search_hint_text(Playlist* playlist) const;
virtual QString empty_playlist_text(Playlist* playlist) const;
virtual bool has_special_search_behaviour(Playlist* playlist) const;
virtual void Search(const QString& text, Playlist* playlist);
private:
GroovesharkService* service_;
};
#endif // GROOVESHARKSEARCHPLAYLISTTYPE_H

View File

@ -38,7 +38,6 @@
#include "internetmodel.h"
#include "groovesharkradio.h"
#include "groovesharksearchplaylisttype.h"
#include "groovesharkurlhandler.h"
#include "searchboxwidget.h"
@ -114,7 +113,6 @@ GroovesharkService::GroovesharkService(Application* app, InternetModel *parent)
task_search_id_(0) {
app_->player()->RegisterUrlHandler(url_handler_);
app_->playlist_manager()->RegisterSpecialPlaylistType(new GroovesharkSearchPlaylistType(this));
search_delay_->setInterval(kSearchDelayMsec);
search_delay_->setSingleShot(true);

View File

@ -1,51 +0,0 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "spotifysearchplaylisttype.h"
#include "spotifyservice.h"
const char* SpotifySearchPlaylistType::kName = "spotify-search";
SpotifySearchPlaylistType::SpotifySearchPlaylistType(SpotifyService* service)
: service_(service) {
}
QIcon SpotifySearchPlaylistType::icon(Playlist* playlist) const {
return QIcon(":icons/32x32/spotify.png");
}
QString SpotifySearchPlaylistType::search_hint_text(Playlist* playlist) const {
return QObject::tr("Search Spotify");
}
QString SpotifySearchPlaylistType::empty_playlist_text(Playlist* playlist) const {
return QObject::tr("Start typing in the search box above to find music on %1.").arg("Spotify");
}
bool SpotifySearchPlaylistType::has_special_search_behaviour(Playlist* playlist) const {
return true;
}
void SpotifySearchPlaylistType::Search(const QString& text, Playlist* playlist) {
service_->Search(text, playlist);
}
void SpotifySearchPlaylistType::DidYouMeanClicked(const QString& text, Playlist* playlist) {
// TODO Dead-code now: we will probably remove the entire class later, if the
// new search looks pretty enough for everyone
//service_->Search(text, playlist, true);
}

View File

@ -1,44 +0,0 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SPOTIFYSEARCHPLAYLISTTYPE_H
#define SPOTIFYSEARCHPLAYLISTTYPE_H
#include "playlist/specialplaylisttype.h"
class SpotifyService;
class SpotifySearchPlaylistType : public SpecialPlaylistType {
public:
SpotifySearchPlaylistType(SpotifyService* service);
static const char* kName;
virtual QString name() const { return kName; }
virtual QIcon icon(Playlist* playlist) const;
virtual QString search_hint_text(Playlist* playlist) const;
virtual QString empty_playlist_text(Playlist* playlist) const;
virtual bool has_special_search_behaviour(Playlist* playlist) const;
virtual void Search(const QString& text, Playlist* playlist);
virtual void DidYouMeanClicked(const QString& text, Playlist* playlist);
private:
SpotifyService* service_;
};
#endif // SPOTIFYSEARCHPLAYLISTTYPE_H

View File

@ -4,7 +4,6 @@
#include "spotifyblobdownloader.h"
#include "spotifyserver.h"
#include "spotifyservice.h"
#include "spotifysearchplaylisttype.h"
#include "core/application.h"
#include "core/database.h"
#include "core/logging.h"
@ -75,9 +74,6 @@ SpotifyService::SpotifyService(Application* app, InternetModel* parent)
qLog(Debug) << "Spotify system blob path:" << system_blob_path_;
qLog(Debug) << "Spotify local blob path:" << local_blob_path_;
app_->playlist_manager()->RegisterSpecialPlaylistType(
new SpotifySearchPlaylistType(this));
app_->global_search()->AddProvider(new SpotifySearchProvider(app_, this));
search_delay_->setInterval(kSearchDelayMsec);