Skip to content

Commit

Permalink
Merge pull request #4712 from Chocobozzz/skyfm
Browse files Browse the repository at this point in the history
Change sky.fm to radiotunes.com
  • Loading branch information
hatstand committed Jan 15, 2015
2 parents 7f52793 + 5e5738f commit c96502e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion data/data.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@
<file>providers/radiogfm.png</file>
<file>providers/rockradio.png</file>
<file>providers/skydrive.png</file>
<file>providers/skyfm.png</file>
<file>providers/somafm.png</file>
<file>providers/songkick.png</file>
<file>providers/soundcloud.png</file>
Expand Down Expand Up @@ -426,5 +425,6 @@
<file>vk/link.png</file>
<file>providers/seafile.png</file>
<file>icons/32x32/internet-services.png</file>
<file>providers/radiotunes.png</file>
</qresource>
</RCC>
Binary file added data/providers/radiotunes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/providers/skyfm.png
Binary file not shown.
3 changes: 1 addition & 2 deletions src/globalsearch/digitallyimportedsearchprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ DigitallyImportedSearchProvider::DigitallyImportedSearchProvider(
Init(service_->name(), service->api_service_name(), service_->icon(),
ArtIsInSongMetadata | CanGiveSuggestions | CanShowConfig);

set_safe_words(QStringList() << "sky.fm"
<< "skyfm"
set_safe_words(QStringList() << "radiotunes"
<< "di.fm"
<< "difm"
<< "digitallyimported");
Expand Down
4 changes: 2 additions & 2 deletions src/internet/core/internetmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ InternetModel::InternetModel(Application* app, QObject* parent)
AddService(new RadioGFMService(app, this));
AddService(new RockRadioService(app, this));
AddService(new SavedRadio(app, this));
AddService(new SkyFmService(app, this));
AddService(new RadioTunesService(app, this));
AddService(new SomaFMService(app, this));
AddService(new SoundCloudService(app, this));
AddService(new SpotifyService(app, this));
Expand Down Expand Up @@ -371,7 +371,7 @@ int InternetModel::FindItemPosition(const QString& text) {
int a = 0;
int b = invisibleRootItem()->rowCount() - 1;
while (a <= b) {
int mid = a + (b - a)/2;
int mid = a + (b - a) / 2;
if (invisibleRootItem()->child(mid, 0)->text() < text) {
a = mid + 1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/internet/digitally/digitallyimportedclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "core/network.h"

// The API used here is undocumented - it was reverse engineered by watching
// calls made by the sky.fm android app:
// calls made by the sky.fm (now RadioTunes) android app:
// https://market.android.com/details?id=com.audioaddict.sky

const char* DigitallyImportedClient::kApiUsername = "ephemeron";
Expand Down
11 changes: 6 additions & 5 deletions src/internet/digitally/digitallyimportedservicebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,12 @@ DigitallyImportedService::DigitallyImportedService(Application* app,
QIcon(":/providers/digitallyimported.png"),
"di", app, model, true, parent) {}

SkyFmService::SkyFmService(Application* app, InternetModel* model,
QObject* parent)
: DigitallyImportedServiceBase(
"SKY.fm", "SKY.fm", QUrl("http://www.sky.fm"),
QIcon(":/providers/skyfm.png"), "sky", app, model, true, parent) {}
RadioTunesService::RadioTunesService(Application* app, InternetModel* model,
QObject* parent)
: DigitallyImportedServiceBase("RadioTunes", "RadioTunes.com",
QUrl("http://www.radiotunes.com/"),
QIcon(":/providers/radiotunes.png"),
"radiotunes", app, model, true, parent) {}

JazzRadioService::JazzRadioService(Application* app, InternetModel* model,
QObject* parent)
Expand Down
8 changes: 4 additions & 4 deletions src/internet/digitally/digitallyimportedservicebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class DigitallyImportedServiceBase : public InternetService {
public slots:
void ShowSettingsDialog();

signals:
signals:
void StreamsChanged();

private slots:
Expand Down Expand Up @@ -117,10 +117,10 @@ class DigitallyImportedService : public DigitallyImportedServiceBase {
QObject* parent = nullptr);
};

class SkyFmService : public DigitallyImportedServiceBase {
class RadioTunesService : public DigitallyImportedServiceBase {
public:
SkyFmService(Application* app, InternetModel* model,
QObject* parent = nullptr);
RadioTunesService(Application* app, InternetModel* model,
QObject* parent = nullptr);
};

class JazzRadioService : public DigitallyImportedServiceBase {
Expand Down
4 changes: 2 additions & 2 deletions src/internet/digitally/digitallyimportedurlhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ QString DigitallyImportedUrlHandler::scheme() const {
QIcon DigitallyImportedUrlHandler::icon() const {
if (scheme() == "di") {
return QIcon(":providers/digitallyimported.png");
} else if (scheme() == "sky") {
return QIcon(":providers/skyfm.png");
} else if (scheme() == "radiotunes") {
return QIcon(":providers/radiotunes.png");
} else if (scheme() == "jazzradio") {
return QIcon(":providers/jazzradio.png");
} else if (scheme() == "rockradio") {
Expand Down

0 comments on commit c96502e

Please sign in to comment.