diff --git a/core/playlists/artist.c b/core/playlists/artist.c index 3ba1c303..30a9c239 100644 --- a/core/playlists/artist.c +++ b/core/playlists/artist.c @@ -173,11 +173,13 @@ struct playlist_type pl_artist = { }; -static bool __artist_pl_init(void *data) +void pl_artist_init(struct queue_ops *ops) { struct db_entry *dbe, *next; struct playlist *playlist; + artist_ops = ops; + db_for_each(dbe, next, artist_db_get()) { playlist = __artist_pl_alloc(ARTIST(dbe)->ar_name); ARTIST(dbe)->ar_playlist = playlist; @@ -185,13 +187,6 @@ static bool __artist_pl_init(void *data) idle_schedule(IDLE_SYNC, __artist_pl_add, playlist); } - return true; -} - -void pl_artist_init(struct queue_ops *ops) -{ - artist_ops = ops; - idle_schedule(IDLE_SYNC, __artist_pl_init, NULL); idle_schedule(IDLE_SYNC, __artist_pl_load, NULL); } diff --git a/core/playlists/library.c b/core/playlists/library.c index 515ac4c6..b48dfe41 100644 --- a/core/playlists/library.c +++ b/core/playlists/library.c @@ -295,11 +295,13 @@ struct playlist_type pl_library = { }; -static bool __lib_pl_init(void *data) +void pl_library_init(struct queue_ops *ops) { struct db_entry *dbe, *next; struct playlist *playlist; + lib_ops = ops; + db_for_each(dbe, next, library_db_get()) { playlist = __lib_pl_alloc(LIBRARY(dbe)); LIBRARY(dbe)->li_playlist = playlist; @@ -308,13 +310,6 @@ static bool __lib_pl_init(void *data) pl_library_update(playlist->pl_name); } - return true; -} - -void pl_library_init(struct queue_ops *ops) -{ - lib_ops = ops; - idle_schedule(IDLE_SYNC, __lib_pl_init, NULL); idle_schedule(IDLE_SYNC, __lib_pl_load, NULL); }