New context with albums and lyrics +++ much more

* Added new lyrics provider with lyrics from AudD and API Seeds
* New improved context widget with albums and lyrics
* Fixed playing and context widget getting stuck in play mode when there was an error
* Changed icons for artists in collection, tidal and cover manager
* Removed "search" icon from "Search automatically" checkbox (right click) that looked ugly
* Removed some unused widgets from the src/widgets directory
* Fixed initial size of window and side panel
* Fixed saving window size correctly
This commit is contained in:
Jonas Kvinge
2018-08-29 21:42:24 +02:00
parent 3b30e66e87
commit ac6cac8da1
96 changed files with 4361 additions and 3135 deletions

View File

@@ -298,7 +298,7 @@ bool CollectionView::RestoreLevelFocus(const QModelIndex &parent) {
if (!last_selected_song_.url().isEmpty()) {
QModelIndex index = qobject_cast<QSortFilterProxyModel*>(model())->mapToSource(current);
SongList songs = app_->collection_model()->GetChildSongs(index);
for (const Song& song : songs) {
for (const Song &song : songs) {
if (song == last_selected_song_) {
setCurrentIndex(current);
return true;
@@ -338,9 +338,9 @@ void CollectionView::ReloadSettings() {
QSettings settings;
settings.beginGroup(CollectionSettingsPage::kSettingsGroup);
SetAutoOpen(settings.value("auto_open", true).toBool());
SetAutoOpen(settings.value("auto_open", false).toBool());
if (app_ != nullptr) {
if (app_) {
app_->collection_model()->set_pretty_covers(settings.value("pretty_covers", true).toBool());
app_->collection_model()->set_show_dividers(settings.value("show_dividers", true).toBool());
}
@@ -437,7 +437,7 @@ void CollectionView::paintEvent(QPaintEvent *event) {
}
void CollectionView::mouseReleaseEvent(QMouseEvent *e) {
QTreeView::mouseReleaseEvent(e);
if (total_song_count_ == 0) {
@@ -494,7 +494,7 @@ void CollectionView::contextMenuEvent(QContextMenuEvent *e) {
int regular_elements = 0;
int regular_editable = 0;
for (const QModelIndex& index : selected_indexes) {
for (const QModelIndex &index : selected_indexes) {
regular_elements++;
if(app_->collection_model()->data(index, CollectionModel::Role_Editable).toBool()) {
regular_editable++;
@@ -559,8 +559,7 @@ void CollectionView::ShowInVarious(bool on) {
QList<Song> all_of_album = app_->collection_backend()->GetSongsByAlbum(album);
QSet<QString> other_artists;
for (const Song &s : all_of_album) {
if (!albums.contains(album, s.artist()) &&
!other_artists.contains(s.artist())) {
if (!albums.contains(album, s.artist()) && !other_artists.contains(s.artist())) {
other_artists.insert(s.artist());
}
}
@@ -586,7 +585,7 @@ void CollectionView::ShowInVarious(bool on) {
void CollectionView::Load() {
QMimeData *data = model()->mimeData(selectedIndexes());
if (MimeData* mime_data = qobject_cast<MimeData*>(data)) {
if (MimeData *mime_data = qobject_cast<MimeData*>(data)) {
mime_data->clear_first_ = true;
}
emit AddToPlaylistSignal(data);