core/tags/track: Move track_remove() out of the tags namespace
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
83a945d3da
commit
7ffaf91617
|
@ -151,7 +151,7 @@ static void validate_library(struct library *&library)
|
|||
|
||||
if (g_file_test(track->path().c_str(), G_FILE_TEST_EXISTS) == false) {
|
||||
library_q.del(track);
|
||||
tags :: remove_track(track);
|
||||
track_remove(track);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ struct track *track_add(struct album *album, struct artist *artist,
|
|||
path, name, length, track));
|
||||
}
|
||||
|
||||
void tags :: remove_track(struct track *track)
|
||||
void track_remove(struct track *track)
|
||||
{
|
||||
db_remove(&track_db, track);
|
||||
}
|
||||
|
|
|
@ -120,13 +120,6 @@ namespace tags
|
|||
/** Called to read the track_db from disk. */
|
||||
void init_track_db();
|
||||
|
||||
/**
|
||||
* Called to remove a Track tag from the database.
|
||||
*
|
||||
* @param track The Track tag to be removed.
|
||||
*/
|
||||
void remove_track(struct track *);
|
||||
|
||||
/**
|
||||
* Called to remove all tracks associated with a specific Library.
|
||||
*
|
||||
|
@ -152,6 +145,9 @@ struct track *track_add(struct album *, struct artist *, struct genre *,
|
|||
struct library *, const std::string &,
|
||||
const std::string &, unsigned int, unsigned int);
|
||||
|
||||
/* Called to remove a specific track tag. */
|
||||
void track_remove(struct track *);
|
||||
|
||||
/* Called to get a track tag with a specific index. */
|
||||
struct track *track_get(const unsigned int);
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ static void test_track_tag_lookup()
|
|||
|
||||
|
||||
index = a->index();
|
||||
tags :: remove_track(a);
|
||||
track_remove(a);
|
||||
test_equal(track_get(index), (struct track *)NULL);
|
||||
test_track_tag_load_db(2);
|
||||
tags :: commit_track_db();
|
||||
|
|
Loading…
Reference in New Issue