diff --git a/core/library.cpp b/core/library.cpp index 754224c4..45c54722 100644 --- a/core/library.cpp +++ b/core/library.cpp @@ -192,7 +192,7 @@ void collection :: remove(struct library *library) { if (library) { set_enabled(library, false); - tags :: remove_library_tracks(library); + track_remove_all(library); library_remove(library); } } diff --git a/core/tags/track.cpp b/core/tags/track.cpp index 14075561..3c8ebe38 100644 --- a/core/tags/track.cpp +++ b/core/tags/track.cpp @@ -169,7 +169,7 @@ void track_remove(struct track *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; diff --git a/include/core/tags/track.h b/include/core/tags/track.h index abb4b335..40728a78 100644 --- a/include/core/tags/track.h +++ b/include/core/tags/track.h @@ -120,13 +120,6 @@ namespace tags /** Called to read the track_db from disk. */ 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, * including NULL rows. @@ -148,6 +141,9 @@ struct track *track_add(struct album *, struct artist *, struct genre *, /* Called to remove a specific track tag. */ 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. */ struct track *track_get(const unsigned int); diff --git a/tests/core/tags/track.cpp b/tests/core/tags/track.cpp index 86783972..df2e3151 100644 --- a/tests/core/tags/track.cpp +++ b/tests/core/tags/track.cpp @@ -167,7 +167,7 @@ static void test_track_tag_lookup() verify_track_tag(a, 2); test_equal(tags :: track_size(), a->index() + 1); - tags :: remove_library_tracks(library); + track_remove_all(library); test_track_tag_load_db(0); test_equal(library->li_size, (unsigned)0); }