summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c20
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
2018 } 2018 }
2019 } 2019 }
2020 2020
2021 if (position == PLAYLIST_INSERT_FIRST) 2021 from = 0;
2022 { 2022 to = c->filesindir;
2023 from = c->filesindir - 1; 2023 direction = 1;
2024 to = -1;
2025 direction = -1;
2026 }
2027 else
2028 {
2029 from = 0;
2030 to = c->filesindir;
2031 direction = 1;
2032 }
2033 2024
2034 for (i = from; i != to; i += direction) 2025 for (i = from; i != to; i += direction)
2035 { 2026 {
@@ -2049,6 +2040,11 @@ static bool insert_all_playlist(struct tree_context *c, int position, bool queue
2049 break; 2040 break;
2050 } 2041 }
2051 yield(); 2042 yield();
2043
2044 if (position == PLAYLIST_INSERT_FIRST)
2045 {
2046 position = PLAYLIST_INSERT;
2047 }
2052 } 2048 }
2053 playlist_sync(NULL); 2049 playlist_sync(NULL);
2054 tagcache_search_finish(&tcs); 2050 tagcache_search_finish(&tcs);