Commit d5fca087 authored by Michael Pyne's avatar Michael Pyne

Fix bug 95446 (Refreshing removed songs leaves blank entries) in HEAD.

CCBUG:95446

svn path=/trunk/kdemultimedia/juk/; revision=374560
parent 3cd46534
......@@ -154,7 +154,13 @@ void CollectionList::slotRefreshItems(const KFileItemList &items)
if(item) {
item->refreshFromDisk();
item->repaint();
// If the item is no longer on disk, remove it from the collection.
if(item->file().fileInfo().exists())
item->repaint();
else
delete item;
}
}
......
......@@ -699,7 +699,7 @@ void Playlist::slotRefresh()
for(PlaylistItemList::Iterator it = l.begin(); it != l.end(); ++it) {
(*it)->refreshFromDisk();
if(!(*it)->file().tag()) {
if(!(*it)->file().tag() || !(*it)->file().fileInfo().exists()) {
kdDebug(65432) << "Error while trying to refresh the tag. "
<< "This file has probably been removed."
<< endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment