summaryrefslogtreecommitdiff
path: root/apps/onplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/onplay.c')
-rw-r--r--apps/onplay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 4fd9d41056..60a737938f 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -64,7 +64,9 @@
64#endif 64#endif
65#include "playlist_menu.h" 65#include "playlist_menu.h"
66#include "playlist_catalog.h" 66#include "playlist_catalog.h"
67#ifdef HAVE_TAGCACHE
67#include "tagtree.h" 68#include "tagtree.h"
69#endif
68 70
69static int context; 71static int context;
70static char* selected_file = NULL; 72static char* selected_file = NULL;
@@ -181,11 +183,13 @@ static bool add_to_playlist(int position, bool queue)
181 if (position == PLAYLIST_INSERT_SHUFFLED) 183 if (position == PLAYLIST_INSERT_SHUFFLED)
182 srand(current_tick); 184 srand(current_tick);
183 185
186#ifdef HAVE_TAGCACHE
184 if (context == CONTEXT_ID3DB) 187 if (context == CONTEXT_ID3DB)
185 { 188 {
186 tagtree_insert_selection_playlist(position, queue); 189 tagtree_insert_selection_playlist(position, queue);
187 } 190 }
188 else 191 else
192#endif
189 { 193 {
190 if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) 194 if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA)
191 playlist_insert_track(NULL, selected_file, position, queue, true); 195 playlist_insert_track(NULL, selected_file, position, queue, true);
@@ -207,7 +211,7 @@ static bool add_to_playlist(int position, bool queue)
207 else if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U) 211 else if ((selected_file_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U)
208 playlist_insert_playlist(NULL, selected_file, position, queue); 212 playlist_insert_playlist(NULL, selected_file, position, queue);
209 } 213 }
210 214
211 if (new_playlist && (playlist_amount() > 0)) 215 if (new_playlist && (playlist_amount() > 0))
212 { 216 {
213 /* nothing is currently playing so begin playing what we just 217 /* nothing is currently playing so begin playing what we just