~ubuntu-branches/ubuntu/saucy/clementine/saucy

« back to all changes in this revision

Viewing changes to src/playlist/playlistundocommands.cpp

  • Committer: Package Import Robot
  • Author(s): Thomas PIERSON
  • Date: 2012-01-01 20:43:39 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120101204339-lsb6nndwhfy05sde
Tags: 1.0.1+dfsg-1
New upstream release. (Closes: #653926, #651611, #657391)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
  playlist_->RemoveItemsWithoutUndo(start, items_.count());
48
48
}
49
49
 
 
50
bool InsertItems::UpdateItem(const PlaylistItemPtr& updated_item) {
 
51
  for (int i=0; i<items_.size(); i++) {
 
52
    PlaylistItemPtr item = items_[i];
 
53
    if (item->Metadata().url() == updated_item->Metadata().url()) {
 
54
      items_[i] = updated_item;
 
55
      return true;
 
56
    }
 
57
  }
 
58
  return false;
 
59
}
 
60
 
50
61
 
51
62
RemoveItems::RemoveItems(Playlist *playlist, int pos, int count)
52
63
  : Base(playlist)