Commit 73c95d1f authored by Max Kellermann's avatar Max Kellermann

TagFile: rename exported functions, use CamelCase

And specify whether generic tags are being scanned.
parent 2c30e163
......@@ -85,7 +85,7 @@ Song::UpdateFile(Storage &storage) noexcept
if (!tag_stream_scan(absolute_uri.c_str(), tag_builder))
return false;
} else {
if (!tag_file_scan(path_fs, tag_builder))
if (!ScanFileTagsWithGeneric(path_fs, tag_builder))
return false;
}
......@@ -149,7 +149,7 @@ DetachedSong::LoadFile(Path path) noexcept
return false;
TagBuilder tag_builder;
if (!tag_file_scan(path, tag_builder))
if (!ScanFileTagsWithGeneric(path, tag_builder))
return false;
mtime = fi.GetModificationTime();
......
......@@ -81,7 +81,7 @@ public:
};
bool
tag_file_scan(Path path_fs, TagHandler &handler) noexcept
ScanFileTagsNoGeneric(Path path_fs, TagHandler &handler) noexcept
{
assert(!path_fs.IsNull());
......@@ -100,11 +100,11 @@ tag_file_scan(Path path_fs, TagHandler &handler) noexcept
}
bool
tag_file_scan(Path path, TagBuilder &builder) noexcept
ScanFileTagsWithGeneric(Path path, TagBuilder &builder) noexcept
{
FullTagHandler h(builder);
if (!tag_file_scan(path, h))
if (!ScanFileTagsNoGeneric(path, h))
return false;
if (builder.empty())
......
......@@ -28,13 +28,14 @@ class TagBuilder;
/**
* Scan the tags of a song file. Invokes matching decoder plugins,
* but does not invoke the special "APE" and "ID3" scanners.
* but does not fall back to generic scanners (APE and ID3) if no tags
* were found (but the file was recognized).
*
* @return true if the file was recognized (even if no metadata was
* found)
*/
bool
tag_file_scan(Path path, TagHandler &handler) noexcept;
ScanFileTagsNoGeneric(Path path, TagHandler &handler) noexcept;
/**
* Scan the tags of a song file. Invokes matching decoder plugins,
......@@ -45,6 +46,6 @@ tag_file_scan(Path path, TagHandler &handler) noexcept;
* found)
*/
bool
tag_file_scan(Path path, TagBuilder &builder) noexcept;
ScanFileTagsWithGeneric(Path path, TagBuilder &builder) noexcept;
#endif
......@@ -167,7 +167,7 @@ static CommandResult
read_file_comments(Response &r, const Path path_fs)
{
PrintCommentHandler h(r);
if (!tag_file_scan(path_fs, h)) {
if (!ScanFileTagsNoGeneric(path_fs, h)) {
r.Error(ACK_ERROR_NO_EXIST, "Failed to load file");
return CommandResult::ERROR;
}
......
......@@ -99,7 +99,7 @@ embcue_playlist_open_uri(const char *uri,
const auto path_fs = AllocatedPath::FromUTF8Throw(uri);
ExtractCuesheetTagHandler extract_cuesheet;
tag_file_scan(path_fs, extract_cuesheet);
ScanFileTagsNoGeneric(path_fs, extract_cuesheet);
if (extract_cuesheet.cuesheet.empty())
ScanGenericTags(path_fs, extract_cuesheet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment