read/parse file tags
import audiofiles
This commit is contained in:
+2
-1
@@ -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
@@ -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
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user