inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
TagLibParser Class Reference

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, MetadataparseFromInode (ino_t inode, const std::string &directory)
 Parse metadata from files in a directory based on inode.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TagLibParser()

TagLibParser::TagLibParser ( const std::string & debugString)
explicit

Constructor for TagLibParser.

Parameters
debugStringA string to enable or disable debug logs.

Member Function Documentation

◆ parseFile()

bool TagLibParser::parseFile ( const std::string & filePath,
Metadata & metadata )

Parse metadata from an audio file.

Parameters
filePathThe path to the audio file.
metadataA reference to a Metadata object where parsed data will be stored.
Returns
true if parsing was successful, false otherwise.

◆ parseFromInode()

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.

Parameters
inodeThe inode of the file to search for.
directoryThe directory to search in.
Returns
A map of file paths to corresponding metadata.

The documentation for this class was generated from the following file: