A class for parsing metadata from audio files. More...
#include <taglib_parser.h>
Public Member Functions | |
TagLibParser (const std::string &debugString) | |
Constructor for TagLibParser. | |
bool | parseFile (const std::string &filePath, Metadata &metadata) |
Parse metadata from an audio file. | |
std::unordered_map< std::string, Metadata > | parseFromInode (ino_t inode, const std::string &directory) |
Parse metadata from files in a directory based on inode. | |
A class for parsing metadata from audio files.
The TagLibParser
class uses the TagLib library to extract metadata from audio files. It supports parsing tags, including title, artist, album, genre, year, and track information. Additionally, it can parse metadata from files using inode information.
|
explicit |
Constructor for TagLibParser.
debugString | A string to enable or disable debug logs. |
bool TagLibParser::parseFile | ( | const std::string & | filePath, |
Metadata & | metadata ) |
Parse metadata from an audio file.
filePath | The path to the audio file. |
metadata | A reference to a Metadata object where parsed data will be stored. |
true
if parsing was successful, false
otherwise. std::unordered_map< std::string, Metadata > TagLibParser::parseFromInode | ( | ino_t | inode, |
const std::string & | directory ) |
Parse metadata from files in a directory based on inode.
inode | The inode of the file to search for. |
directory | The directory to search in. |