about summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-12-14 04:35:19 +0000
committerEric Wong <e@80x24.org>2015-12-14 06:58:23 +0000
commitf13f841d0c078ff31c632221fee043915ab86621 (patch)
tree2124767948587039e2ed076d5a3a16509bdc3faf
parent27905f4209b24252859a93f5c276bcd5155acbb0 (diff)
downloaddtas-f13f841d0c078ff31c632221fee043915ab86621.tar.gz
We need to add new songs in reverse order of what's in
the file to preserve ordering when they're added after
an existing ID.  This way we don't have to remember the
track we just added, either.
-rwxr-xr-xbin/dtas-tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/dtas-tl b/bin/dtas-tl
index fd5ced9..b682e2b 100755
--- a/bin/dtas-tl
+++ b/bin/dtas-tl
@@ -86,7 +86,7 @@ def do_edit(c)
   orig.each do |track_id|
     edit_idx[track_id] or c.req("tl remove #{track_id}")
   end
-  add.each do |path, after_id|
+  add.reverse_each do |path, after_id|
     cmd = %W(tl add #{path})
     cmd << after_id.to_s if after_id
     c.req(cmd)