diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index 9a0e2cd01..e43c45961 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -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(); diff --git a/src/TagFile.cxx b/src/TagFile.cxx index 3ecef36b8..aee2af629 100644 --- a/src/TagFile.cxx +++ b/src/TagFile.cxx @@ -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()) diff --git a/src/TagFile.hxx b/src/TagFile.hxx index 427c29c28..7f10d31ed 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -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 diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx index 744db8619..c6b54cee8 100644 --- a/src/command/FileCommands.cxx +++ b/src/command/FileCommands.cxx @@ -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; } diff --git a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx index 63ebe911e..00f4007fd 100644 --- a/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx +++ b/src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx @@ -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);