core/playlists/system: Drop support for looking up the "Banned" playlist

This playlist has been the same as the hidden playlist for several
releases now.  Let's make the change official!

Implements #28: Save hidden playlist as "hidden" instead of "banned"
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-09-16 11:19:21 -04:00
parent afbf9e0b1a
commit 419d31d4c3
2 changed files with 5 additions and 4 deletions

View File

@ -384,9 +384,6 @@ static struct sys_playlist * __sys_pl_lookup(const gchar *name)
if (string_match(name, sys_playlists[i]->spl_playlist.pl_name))
return sys_playlists[i];
}
if (string_match(name, "Banned"))
return &sys_hidden;
return NULL;
}
@ -457,6 +454,10 @@ static bool __sys_pl_load()
file_readf(&sys_file, "%u\n", &n);
for (i = 0; i < n; i++) {
file_readf(&sys_file, "%*u %m[^\n]\n", &name);
if (string_match(name, "Banned")) {
g_free(name);
name = g_strdup("Hidden");
}
plist = __sys_pl_lookup(name);
if (plist)

View File

@ -147,7 +147,7 @@ static void test_hidden()
struct queue *queue = playlist_get_queue(PL_SYSTEM, "Hidden");
g_assert_nonnull(queue);
g_assert(playlist_get_queue(PL_SYSTEM, "Banned") == queue);
g_assert_null(playlist_get_queue(PL_SYSTEM, "Banned"));
g_assert_false(queue_has_flag(queue, Q_ADD_FRONT));
g_assert_true(queue_has_flag(queue, Q_REPEAT));