When we recieve an updated signal frmo MPD, refresh library view.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
changed. (Previously the whole model was replaced).
|
||||
3. When changing name of playlist, show the original name in the line-edit.
|
||||
4. Fix adding songs with spaces in their filenames to stored playlists
|
||||
5. When we recieve an updated signal frmo MPD, refresh library view.
|
||||
|
||||
0.2.1
|
||||
-----
|
||||
|
||||
@@ -70,6 +70,7 @@ LibraryPage::LibraryPage(MainWindow *p)
|
||||
MusicLibraryModel::self(), SLOT(updateMusicLibrary(MusicLibraryItemRoot *, QDateTime)));
|
||||
connect(MPDConnection::self(), SIGNAL(updatingLibrary()), view, SLOT(showSpinner()));
|
||||
connect(MPDConnection::self(), SIGNAL(updatedLibrary()), view, SLOT(hideSpinner()));
|
||||
connect(MPDConnection::self(), SIGNAL(databaseUpdated()), this, SLOT(databaseUpdated()));
|
||||
connect(MusicLibraryModel::self(), SIGNAL(updateGenres(const QStringList &)), this, SLOT(updateGenres(const QStringList &)));
|
||||
connect(this, SIGNAL(listAllInfo(const QDateTime &)), MPDConnection::self(), SLOT(listAllInfo(const QDateTime &)));
|
||||
connect(view, SIGNAL(itemsSelected(bool)), addToPlaylist, SLOT(setEnabled(bool)));
|
||||
@@ -103,6 +104,11 @@ void LibraryPage::refresh(Refresh type)
|
||||
}
|
||||
}
|
||||
|
||||
void LibraryPage::databaseUpdated()
|
||||
{
|
||||
refresh(RefreshFromCache);
|
||||
}
|
||||
|
||||
void LibraryPage::clear()
|
||||
{
|
||||
MusicLibraryModel::self()->clear();
|
||||
|
||||
@@ -65,6 +65,7 @@ public Q_SLOTS:
|
||||
void updateGenres(const QStringList &genres);
|
||||
void itemDoubleClicked(const QModelIndex &);
|
||||
void searchItems();
|
||||
void databaseUpdated();
|
||||
|
||||
private:
|
||||
MusicLibraryProxyModel proxy;
|
||||
|
||||
Reference in New Issue
Block a user