Only show number of tracks, and duration, in playqueue status - consistent with other players.
This commit is contained in:
committed by
craig.p.drummond
parent
f1294686a3
commit
bdb679fec3
@@ -663,8 +663,6 @@ void PlayQueueModel::update(const QList<Song> &songList)
|
||||
ids=newIds;
|
||||
endResetModel();
|
||||
} else {
|
||||
QSet<QString> artists;
|
||||
QSet<QString> albums;
|
||||
quint32 time = 0;
|
||||
|
||||
QSet<qint32> removed=ids-newIds;
|
||||
@@ -704,30 +702,24 @@ void PlayQueueModel::update(const QList<Song> &songList)
|
||||
}
|
||||
}
|
||||
|
||||
artists.insert(s.artist);
|
||||
albums.insert(s.album);
|
||||
time += s.time;
|
||||
}
|
||||
|
||||
ids=newIds;
|
||||
emit statsUpdated(artists.size(), albums.size(), songs.size(), time);
|
||||
emit statsUpdated(songs.size(), time);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayQueueModel::stats()
|
||||
{
|
||||
QSet<QString> artists;
|
||||
QSet<QString> albums;
|
||||
quint32 time = 0;
|
||||
|
||||
//Loop over all songs
|
||||
foreach(const Song &song, songs) {
|
||||
artists.insert(song.artist);
|
||||
albums.insert(song.album);
|
||||
time += song.time;
|
||||
}
|
||||
|
||||
emit statsUpdated(artists.size(), albums.size(), songs.size(), time);
|
||||
emit statsUpdated(songs.size(), time);
|
||||
}
|
||||
|
||||
QSet<qint32> PlayQueueModel::getSongIdSet()
|
||||
|
||||
@@ -105,7 +105,7 @@ public Q_SLOTS:
|
||||
Q_SIGNALS:
|
||||
void filesAdded(const QStringList filenames, const quint32 row, const quint32 size, bool replace, quint8 priority);
|
||||
void move(const QList<quint32> &items, const quint32 row, const quint32 size);
|
||||
void statsUpdated(int artists, int albums, int songs, quint32 time);
|
||||
void statsUpdated(int songs, quint32 time);
|
||||
|
||||
private:
|
||||
QList<Song> songs;
|
||||
|
||||
Reference in New Issue
Block a user