From f09ba5ffd53bf7d28e0dc516c00a8f69ca7efae9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 28 Sep 2023 08:29:55 +1000 Subject: Use bindey for databinding instead of hand rolling ui updates --- src/audio/fatfs_audio_input.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/audio/fatfs_audio_input.cpp') diff --git a/src/audio/fatfs_audio_input.cpp b/src/audio/fatfs_audio_input.cpp index f71f0463..6039ff9d 100644 --- a/src/audio/fatfs_audio_input.cpp +++ b/src/audio/fatfs_audio_input.cpp @@ -34,6 +34,7 @@ #include "future_fetcher.hpp" #include "tag_parser.hpp" #include "tasks.hpp" +#include "track.hpp" #include "types.hpp" static const char* kTag = "SRC"; @@ -118,13 +119,13 @@ auto FatfsAudioInput::NextStream() -> std::shared_ptr { auto FatfsAudioInput::OpenFile(const std::pmr::string& path) -> bool { ESP_LOGI(kTag, "opening file %s", path.c_str()); - database::TrackTags tags; - if (!tag_parser_.ReadAndParseTags(path, &tags)) { + auto tags = tag_parser_.ReadAndParseTags(path); + if (!tags) { ESP_LOGE(kTag, "failed to read tags"); return false; } - auto stream_type = ContainerToStreamType(tags.encoding()); + auto stream_type = ContainerToStreamType(tags->encoding()); if (!stream_type.has_value()) { ESP_LOGE(kTag, "couldn't match container to stream"); return false; -- cgit v1.2.3