Represents the current state of the song being played. More...
#include <state.hpp>
Public Member Functions | |
void | copyMetadata (const Metadata &metadata) |
Copies the metadata from a given Metadata object. | |
auto | HasLyrics () -> bool |
Checks if the song has lyrics. | |
auto | HasComments () -> bool |
Checks if the song has comments. | |
auto | formatLyrics () -> vector< string > |
Formats the lyrics into a vector of strings. | |
Public Attributes | |
std::string | artist |
std::string | title |
std::string | genre |
std::string | album |
bool | has_comment |
bool | has_lyrics |
int | duration |
int | bitrate |
unsigned int | year |
unsigned int | track |
unsigned int | discNumber |
std::string | lyrics |
std::string | comment |
std::unordered_map< std::string, std::string > | additionalProperties |
std::string | filePath |
Represents the current state of the song being played.
This structure holds the metadata for the song currently playing, including the artist, title, album, genre, lyrics, comments, and more.
|
inline |
Copies the metadata from a given Metadata object.
This method copies the metadata fields from the provided Metadata structure into the PlayingState structure.
metadata | The Metadata object to copy from. |
|
inline |
Formats the lyrics into a vector of strings.
This method processes the lyrics, breaking them into lines and handling special characters such as square and curly brackets. The result is a vector of strings representing the formatted lyrics.
|
inline |
Checks if the song has comments.
This method returns whether the song has any comments.
|
inline |
Checks if the song has lyrics.
This method returns whether the song has lyrics available.
std::unordered_map<std::string, std::string> PlayingState::additionalProperties |
Any additional properties of the song
std::string PlayingState::album |
The album of the currently playing song
std::string PlayingState::artist |
The artist of the currently playing song
int PlayingState::bitrate |
The bitrate of the song
std::string PlayingState::comment |
The comment for the song
unsigned int PlayingState::discNumber |
The disc number the song is on
int PlayingState::duration |
The duration of the song in seconds
std::string PlayingState::filePath |
The file path of the song
std::string PlayingState::genre |
The genre of the currently playing song
bool PlayingState::has_comment |
Whether the song has a comment
bool PlayingState::has_lyrics |
Whether the song has lyrics
std::string PlayingState::lyrics |
The lyrics of the song
std::string PlayingState::title |
The title of the currently playing song
unsigned int PlayingState::track |
The track number of the song
unsigned int PlayingState::year |
The year of release for the song