Add MediaUrl function for playlistitems

This commit is contained in:
Jonas Kvinge 2019-06-15 19:31:43 +02:00
parent 49aa344d8b
commit e59c3c6f70
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ class PlaylistItem : public std::enable_shared_from_this<PlaylistItem> {
void SetTemporaryMetadata(const Song &metadata);
void ClearTemporaryMetadata();
bool HasTemporaryMetadata() const { return temp_metadata_.is_valid(); }
QUrl MediaUrl() const { return HasTemporaryMetadata() && temp_metadata_.is_valid() && temp_metadata_.url().isValid() ? temp_metadata_.url() : QUrl(); }
// Background colors.
void SetBackgroundColor(short priority, const QColor &color);