summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-08 11:52:46 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-06 12:13:43 -0500
commitf8db8f14b52c14f27f3c294cd05f81367b7742df (patch)
tree771d3345ffaa420748d7c5a63e8f9ccdc2167dc1 /src
parent2b2e3baf0d7831dc0fb0f851dd13c71d5b163f40 (diff)
when running apm update adds, loop infinitely until all adds are processed
previously this would stop processing after appending a single album, likely not what is desired
Diffstat (limited to 'src')
-rw-r--r--src/modules/auto_playlist_manager.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/auto_playlist_manager.c b/src/modules/auto_playlist_manager.c
index 65732a8..4c10587 100644
--- a/src/modules/auto_playlist_manager.c
+++ b/src/modules/auto_playlist_manager.c
@@ -202,10 +202,10 @@ static void
202run_adds(void) 202run_adds(void)
203{ 203{
204 char *file; 204 char *file;
205 Eina_List *l, *ll; 205 Eina_List *l;
206 206
207 last_queue_length = empd_queue_length; 207 last_queue_length = empd_queue_length;
208 EINA_LIST_FOREACH_SAFE(adds, l, ll, file) 208 while (adds)
209 { 209 {
210 const char *a, *b = NULL; 210 const char *a, *b = NULL;
211 Eina_Iterator *it; 211 Eina_Iterator *it;
@@ -213,6 +213,8 @@ run_adds(void)
213 Elm_Object_Item *item; 213 Elm_Object_Item *item;
214 Eina_Bool done = EINA_FALSE; 214 Eina_Bool done = EINA_FALSE;
215 215
216 l = eina_list_data_get(adds);
217 file = eina_list_data_get(l);
216 a = strrchr(file, '/'); 218 a = strrchr(file, '/');
217 if (a) 219 if (a)
218 b = strchr(file, '/'); 220 b = strchr(file, '/');
@@ -283,6 +285,7 @@ run_adds(void)
283 { 285 {
284 char *f2; 286 char *f2;
285 287
288 /* sequentially append all songs from matching directory structure */
286 empd_empdd_add_list_call(empd_proxy, file); 289 empd_empdd_add_list_call(empd_proxy, file);
287 post_add(0, file); 290 post_add(0, file);
288 while (eina_list_next(l)) 291 while (eina_list_next(l))
@@ -297,7 +300,6 @@ run_adds(void)
297 } 300 }
298 adds = eina_list_remove_list(adds, l); 301 adds = eina_list_remove_list(adds, l);
299 free(file); 302 free(file);
300 break;
301 } 303 }
302} 304}
303 305