summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-30 21:58:27 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-30 21:58:27 +0100
commite69079b6e96ed04c39f25c02670182c8627397ad (patch)
treea530c5832d4ce5afac3488f1f57699573da7fc20 /playlist.c
parentc76550d5b7d8f4ccc2a3674535f70820fb8163ad (diff)
fixed bug in sort by tracknumber
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/playlist.c b/playlist.c
index be3d8a49..e87b7da8 100644
--- a/playlist.c
+++ b/playlist.c
@@ -1772,10 +1772,10 @@ pl_sort (int iter, int id, const char *format, int ascending) {
snprintf (title2, sizeof (title2), "%03d", atoi (t));
}
}
- pl_format_title (it, title1, sizeof (title1), id, format);
- pl_format_title (next, title2, sizeof (title2), id, format);
-// const char *meta1 = pl_find_meta (it, meta);
-// const char *meta2 = pl_find_meta (next, meta);
+ else {
+ pl_format_title (it, title1, sizeof (title1), id, format);
+ pl_format_title (next, title2, sizeof (title2), id, format);
+ }
int cmp = ascending ? strcmp (title1, title2) < 0 : strcmp (title1, title2) > 0;
if (cmp) {
// printf ("%p %p swapping %s and %s\n", it, next, meta1, meta2);