core/playlists/system: Make sure Favorites and Hidden repeat
Otherwise playing tracks from these playlists will cause the tracks to get removed. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
64ceca84c5
commit
7a79ac26b0
|
@ -615,7 +615,7 @@ void pl_system_init(struct queue_ops *ops)
|
|||
|
||||
for (i = 0; i < SYS_PL_NUM_PLAYLISTS; i++) {
|
||||
sys_pl = sys_playlists[i];
|
||||
sys_pl->spl_init(&sys_pl->spl_playlist, 0, ops);
|
||||
sys_pl->spl_init(&sys_pl->spl_playlist, Q_REPEAT, ops);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ static void test_favorites()
|
|||
|
||||
g_assert_nonnull(queue);
|
||||
g_assert_false(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(queue, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Favorites", SYS_PL_FAVORITES);
|
||||
__test_playlist_noselect("Favorites");
|
||||
|
@ -148,6 +149,7 @@ static void test_hidden()
|
|||
g_assert_nonnull(queue);
|
||||
g_assert(playlist_get_queue(PL_SYSTEM, "Banned") == queue);
|
||||
g_assert_false(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(queue, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Hidden", SYS_PL_HIDDEN);
|
||||
__test_playlist_noselect("Hidden");
|
||||
|
@ -169,6 +171,7 @@ static void test_queued()
|
|||
g_assert_nonnull(queue);
|
||||
g_assert_false(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_false(queue_has_flag(queue, Q_NO_SORT));
|
||||
g_assert_false(queue_has_flag(queue, Q_REPEAT));
|
||||
g_assert_cmpuint(g_slist_length(queue->q_sort), ==, 0);
|
||||
|
||||
__test_playlist_id("Queued Tracks", SYS_PL_QUEUED);
|
||||
|
@ -202,6 +205,7 @@ static void test_collection()
|
|||
|
||||
g_assert_nonnull(queue);
|
||||
g_assert_true(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(queue, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Collection", SYS_PL_COLLECTION);
|
||||
__test_playlist_select("Collection", SYS_PL_COLLECTION);
|
||||
|
@ -223,6 +227,7 @@ static void test_history()
|
|||
g_assert_nonnull(queue);
|
||||
g_assert_true(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(queue, Q_NO_SORT));
|
||||
g_assert_true(queue_has_flag(queue, Q_REPEAT));
|
||||
__test_playlist_id("History", SYS_PL_HISTORY);
|
||||
__test_playlist_noselect("History");
|
||||
|
||||
|
@ -263,6 +268,7 @@ static void test_unplayed()
|
|||
|
||||
g_assert_nonnull(queue);
|
||||
g_assert_true(queue_has_flag(queue, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(queue, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Unplayed", SYS_PL_UNPLAYED);
|
||||
__test_playlist_noselect("Unplayed");
|
||||
|
@ -306,7 +312,8 @@ static void test_most_played()
|
|||
pl_system_init(NULL);
|
||||
|
||||
g_assert_nonnull(most);
|
||||
g_assert_true(queue_has_flag(most, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(most, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(most, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Most Played", SYS_PL_MOST_PLAYED);
|
||||
__test_playlist_noselect("Most Played");
|
||||
|
@ -350,6 +357,7 @@ static void test_least_played()
|
|||
|
||||
g_assert_nonnull(least);
|
||||
g_assert_true(queue_has_flag(least, Q_ADD_FRONT));
|
||||
g_assert_true(queue_has_flag(least, Q_REPEAT));
|
||||
|
||||
__test_playlist_id("Least Played", SYS_PL_LEAST_PLAYED);
|
||||
__test_playlist_noselect("Least Played");
|
||||
|
|
Loading…
Reference in New Issue