Add radios
This commit is contained in:
@@ -60,7 +60,7 @@ void InternetServices::RemoveService(InternetService *service) {
|
||||
|
||||
}
|
||||
|
||||
InternetService *InternetServices::ServiceBySource(const Song::Source source) {
|
||||
InternetService *InternetServices::ServiceBySource(const Song::Source source) const {
|
||||
|
||||
if (services_.contains(source)) return services_.value(source);
|
||||
return nullptr;
|
||||
|
||||
@@ -40,7 +40,7 @@ class InternetServices : public QObject {
|
||||
explicit InternetServices(QObject *parent = nullptr);
|
||||
~InternetServices() override;
|
||||
|
||||
InternetService *ServiceBySource(const Song::Source source);
|
||||
InternetService *ServiceBySource(const Song::Source source) const;
|
||||
template <typename T>
|
||||
T *Service() {
|
||||
return static_cast<T*>(this->ServiceBySource(T::kSource));
|
||||
|
||||
Reference in New Issue
Block a user