Add tidal support

This commit is contained in:
Jonas Kvinge
2018-08-09 18:10:03 +02:00
parent 26062bd07b
commit 820124f9e1
74 changed files with 5420 additions and 273 deletions

View File

@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
#include "config.h"
@@ -39,6 +39,7 @@
#include <QString>
#include <QStringBuilder>
#include <QUrl>
#include <QRegExp>
#include <QIcon>
#include <QPixmap>
#include <QPainter>
@@ -460,6 +461,12 @@ QPixmap SongSourceDelegate::LookupPixmap(const QUrl &url, const QSize &size) con
else if (url.scheme() == "cdda") {
icon = IconLoader::Load("cd");
}
else if (url.scheme() == "http" || url.scheme() == "https") {
if (url.host().contains(QRegExp(".*.tidal.com")))
icon = IconLoader::Load("tidal");
else
icon = IconLoader::Load("download");
}
else {
icon = IconLoader::Load("folder-sound");
}