core/tags/track: Move track_remove_all() out of the tags namespace
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
7ffaf91617
commit
d0ec3e2cac
|
@ -192,7 +192,7 @@ void collection :: remove(struct library *library)
|
||||||
{
|
{
|
||||||
if (library) {
|
if (library) {
|
||||||
set_enabled(library, false);
|
set_enabled(library, false);
|
||||||
tags :: remove_library_tracks(library);
|
track_remove_all(library);
|
||||||
library_remove(library);
|
library_remove(library);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ void track_remove(struct track *track)
|
||||||
db_remove(&track_db, track);
|
db_remove(&track_db, track);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tags :: remove_library_tracks(struct library *library)
|
void track_remove_all(struct library *library)
|
||||||
{
|
{
|
||||||
struct track *it, *next;
|
struct track *it, *next;
|
||||||
|
|
||||||
|
|
|
@ -120,13 +120,6 @@ namespace tags
|
||||||
/** Called to read the track_db from disk. */
|
/** Called to read the track_db from disk. */
|
||||||
void init_track_db();
|
void init_track_db();
|
||||||
|
|
||||||
/**
|
|
||||||
* Called to remove all tracks associated with a specific Library.
|
|
||||||
*
|
|
||||||
* @param library The Library tag that will be matched.
|
|
||||||
*/
|
|
||||||
void remove_library_tracks(struct library *);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to find the number of rows in the track_db,
|
* Called to find the number of rows in the track_db,
|
||||||
* including NULL rows.
|
* including NULL rows.
|
||||||
|
@ -148,6 +141,9 @@ struct track *track_add(struct album *, struct artist *, struct genre *,
|
||||||
/* Called to remove a specific track tag. */
|
/* Called to remove a specific track tag. */
|
||||||
void track_remove(struct track *);
|
void track_remove(struct track *);
|
||||||
|
|
||||||
|
/* Called to remove all tracks associated with a specific library. */
|
||||||
|
void track_remove_all(struct library *);
|
||||||
|
|
||||||
/* Called to get a track tag with a specific index. */
|
/* Called to get a track tag with a specific index. */
|
||||||
struct track *track_get(const unsigned int);
|
struct track *track_get(const unsigned int);
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ static void test_track_tag_lookup()
|
||||||
verify_track_tag(a, 2);
|
verify_track_tag(a, 2);
|
||||||
test_equal(tags :: track_size(), a->index() + 1);
|
test_equal(tags :: track_size(), a->index() + 1);
|
||||||
|
|
||||||
tags :: remove_library_tracks(library);
|
track_remove_all(library);
|
||||||
test_track_tag_load_db(0);
|
test_track_tag_load_db(0);
|
||||||
test_equal(library->li_size, (unsigned)0);
|
test_equal(library->li_size, (unsigned)0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue