Commit 03b57df6 authored by Max Kellermann's avatar Max Kellermann

Queue: ModifyAtOrder() does not increment version

Leave that to the caller, allowing it to modify multiple items at a time.
parent 4de3b6dc
...@@ -48,6 +48,7 @@ playlist::TagModified(Song &&song) ...@@ -48,6 +48,7 @@ playlist::TagModified(Song &&song)
current_song.ReplaceTag(std::move(*song.tag)); current_song.ReplaceTag(std::move(*song.tag));
queue.ModifyAtOrder(current); queue.ModifyAtOrder(current);
queue.IncrementVersion();
idle_add(IDLE_PLAYLIST); idle_add(IDLE_PLAYLIST);
} }
......
...@@ -83,8 +83,6 @@ queue::ModifyAtOrder(unsigned _order) ...@@ -83,8 +83,6 @@ queue::ModifyAtOrder(unsigned _order)
unsigned position = order[_order]; unsigned position = order[_order];
items[position].version = version; items[position].version = version;
IncrementVersion();
} }
void void
......
...@@ -241,7 +241,8 @@ struct queue { ...@@ -241,7 +241,8 @@ struct queue {
void IncrementVersion(); void IncrementVersion();
/** /**
* Marks the specified song as "modified" and increments the version * Marks the specified song as "modified". Call
* IncrementVersion() after all modifications have been made.
* number. * number.
*/ */
void ModifyAtOrder(unsigned order); void ModifyAtOrder(unsigned order);
......
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