diff options
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r-- | apps/tagtree.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index f006baa581..97e0c67b62 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -2018,18 +2018,9 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue } } - if (position == PLAYLIST_INSERT_FIRST) - { - from = c->filesindir - 1; - to = -1; - direction = -1; - } - else - { - from = 0; - to = c->filesindir; - direction = 1; - } + from = 0; + to = c->filesindir; + direction = 1; for (i = from; i != to; i += direction) { @@ -2049,6 +2040,11 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue break; } yield(); + + if (position == PLAYLIST_INSERT_FIRST) + { + position = PLAYLIST_INSERT; + } } playlist_sync(NULL); tagcache_search_finish(&tcs); |