Gregory Petrosyan
2011-03-02 22:54:29 UTC
Ensure that album's date is always equal to the max of dates of tracks. This
makes the order in which tracks are added to the tree irrelevant.
Signed-off-by: Gregory Petrosyan <***@gmail.com>
---
tree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tree.c b/tree.c
index a53b75b..b365b0c 100644
--- a/tree.c
+++ b/tree.c
@@ -714,7 +714,7 @@ void tree_add_track(struct tree_track *track)
album_add_track(album, track);
/* If it makes sense to update album date, do it */
- if (date != -1 && album->date == -1) {
+ if (album->date < date) {
album->date = date;
window_changed(lib_tree_win);
}
makes the order in which tracks are added to the tree irrelevant.
Signed-off-by: Gregory Petrosyan <***@gmail.com>
---
tree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tree.c b/tree.c
index a53b75b..b365b0c 100644
--- a/tree.c
+++ b/tree.c
@@ -714,7 +714,7 @@ void tree_add_track(struct tree_track *track)
album_add_track(album, track);
/* If it makes sense to update album date, do it */
- if (date != -1 && album->date == -1) {
+ if (album->date < date) {
album->date = date;
window_changed(lib_tree_win);
}
--
1.7.1
1.7.1