read/parse file tags

import audiofiles
This commit is contained in:
2026-06-16 09:03:57 +02:00
parent 293756cf1f
commit 31d7453a50
11 changed files with 25 additions and 6 deletions
+2 -1
View File
@@ -1,6 +1,5 @@
#pragma once
#include "Metadata.h"
#include <filesystem>
#include <vector>
#include <string>
@@ -19,3 +18,5 @@ class File {
std::string fileName_;
fs::path fp_ = musicFolder_ / fileName_;
};
std::string_view parseFiletype( std::string_view path );
+1 -1
View File
@@ -9,7 +9,7 @@ struct Metadata {
TagLib::String album;
TagLib::String albumArtist;
unsigned int year;
std::string artwork;
TagLib::VariantList artwork;
TagLib::String genre;
unsigned int trackNr;
double length;
+4 -1
View File
@@ -1,8 +1,10 @@
#pragma once
#include "Metadata.h"
#include <memory>
#include <taglib/tstring.h>
#include <taglib/fileref.h>
#include <taglib/tvariant.h>
class Tag {
@@ -10,7 +12,8 @@ class Tag {
void readTag( TagLib::FileName fileName );
Metadata getMetadata() const;
std::string& getFilePath() const;
const std::string& getFilePath() const;
const auto getArtwork() const;
private:
Metadata metadata_;
std::string filePath_;