diff --git a/core/library.cpp b/core/library.cpp index 1c14ddd5..e3202890 100644 --- a/core/library.cpp +++ b/core/library.cpp @@ -96,7 +96,7 @@ static void tag_track(Library *library, const std::string &filepath) audio = ref.audioProperties(); track = tags :: add_track( - tags :: get_album(tag->album().stripWhiteSpace().to8Bit(true), tag->year()), + album_find(tag->album().stripWhiteSpace().to8Bit(true), tag->year()), tags :: get_artist(tag->artist().stripWhiteSpace().to8Bit(true)), tags :: get_genre(tag->genre().stripWhiteSpace().to8Bit(true)), library, filepath, diff --git a/core/tags/album.cpp b/core/tags/album.cpp index 63261041..ba9c18b6 100644 --- a/core/tags/album.cpp +++ b/core/tags/album.cpp @@ -69,7 +69,7 @@ void tags :: init_album_db() db_load(&album_db); } -struct album *tags :: get_album(const std::string &name, unsigned int year) +struct album *album_find(const std::string &name, unsigned int year) { return db_find(&album_db, make_key(name, year).c_str()); } diff --git a/include/core/tags/album.h b/include/core/tags/album.h index 20daaf85..7ea8db98 100644 --- a/include/core/tags/album.h +++ b/include/core/tags/album.h @@ -68,20 +68,12 @@ namespace tags /** Called to read the album_db from disk. */ void init_album_db(); - /** - * Called to look up an Album tag by name and year. If no - * existing tag is found a new one will be created and - * returned to the caller. - * - * @param name The name of the album. - * @param year The year of the album. - * @return A matching Album tag. - */ - struct album *get_album(const std::string &, unsigned int); - } /* Namespace: tags */ +/* Called to find an album tag by name and year. */ +struct album *album_find(const std::string &, unsigned int); + /* Called to get an album tag with a specific index. */ struct album *album_get(const unsigned int); diff --git a/tests/core/tags/album.cpp b/tests/core/tags/album.cpp index 175db94f..b6c44b7b 100644 --- a/tests/core/tags/album.cpp +++ b/tests/core/tags/album.cpp @@ -66,11 +66,11 @@ static void test_album_db() struct album *album; tags :: init_album_db(); - album = tags :: get_album("Hyrule Symphony", 1998); + album = album_find("Hyrule Symphony", 1998); test_verify_hyrule(album); - test_equal(tags :: get_album("Hyrule Symphony", 1998), album); + test_equal(album_find("Hyrule Symphony", 1998), album); test_equal(album_get(0), album); test_equal(album_get(1), (struct album *)NULL); diff --git a/tests/core/tags/track.cpp b/tests/core/tags/track.cpp index 94aff6aa..b48a8e2b 100644 --- a/tests/core/tags/track.cpp +++ b/tests/core/tags/track.cpp @@ -65,7 +65,7 @@ static void test_track_tag_constructor() filter_init(); tags :: init(); - album = tags :: get_album("Hyrule Symphony", 1998); + album = album_find("Hyrule Symphony", 1998); artist = tags :: get_artist("Koji Kondo"); genre = tags :: get_genre("Video Game Music"); library = tags :: get_library(MUSIC_DIR);