Allow scrobbling songs without album

Fixes #309
This commit is contained in:
Jonas Kvinge
2019-11-20 21:30:41 +01:00
parent 7795b9edaf
commit 8e226302ab
5 changed files with 49 additions and 22 deletions

View File

@@ -28,6 +28,8 @@
#include <QObject>
#include <QString>
#include "core/song.h"
class ScrobblerCacheItem : public QObject {
Q_OBJECT
@@ -35,7 +37,7 @@ class ScrobblerCacheItem : public QObject {
explicit ScrobblerCacheItem(const QString &artist, const QString &album, const QString &song, const QString &albumartist, const int track, const qint64 duration, const quint64 &timestamp);
~ScrobblerCacheItem();
QString effective_albumartist() const { return albumartist_.isEmpty() ? artist_ : albumartist_; }
QString effective_albumartist() const { return albumartist_.isEmpty() || albumartist_.toLower() == Song::kVariousArtists ? artist_ : albumartist_; }
public:
QString artist_;