about summary refs log tree commit homepage
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 04:40:12 +0000
commit459519080c929211f5cf2997c22d1155c7fd1383 (patch)
tree2124767948587039e2ed076d5a3a16509bdc3faf
parent27905f4209b24252859a93f5c276bcd5155acbb0 (diff)
downloaddtas-459519080c929211f5cf2997c22d1155c7fd1383.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)