inLimbo
TUI Music Player that keeps you in Limbo.
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
PlayingState Struct Reference

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
 

Detailed Description

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.

Member Function Documentation

◆ copyMetadata()

void PlayingState::copyMetadata ( const Metadata & metadata)
inline

Copies the metadata from a given Metadata object.

This method copies the metadata fields from the provided Metadata structure into the PlayingState structure.

Parameters
metadataThe Metadata object to copy from.

◆ formatLyrics()

auto PlayingState::formatLyrics ( ) -> vector<string>
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.

Returns
A vector of formatted lyrics lines.

◆ HasComments()

auto PlayingState::HasComments ( ) -> bool
inline

Checks if the song has comments.

This method returns whether the song has any comments.

Returns
True if the song has comments, false otherwise.

◆ HasLyrics()

auto PlayingState::HasLyrics ( ) -> bool
inline

Checks if the song has lyrics.

This method returns whether the song has lyrics available.

Returns
True if the song has lyrics, false otherwise.

Member Data Documentation

◆ additionalProperties

std::unordered_map<std::string, std::string> PlayingState::additionalProperties

Any additional properties of the song

◆ album

std::string PlayingState::album

The album of the currently playing song

◆ artist

std::string PlayingState::artist

The artist of the currently playing song

◆ bitrate

int PlayingState::bitrate

The bitrate of the song

◆ comment

std::string PlayingState::comment

The comment for the song

◆ discNumber

unsigned int PlayingState::discNumber

The disc number the song is on

◆ duration

int PlayingState::duration

The duration of the song in seconds

◆ filePath

std::string PlayingState::filePath

The file path of the song

◆ genre

std::string PlayingState::genre

The genre of the currently playing song

◆ has_comment

bool PlayingState::has_comment

Whether the song has a comment

◆ has_lyrics

bool PlayingState::has_lyrics

Whether the song has lyrics

◆ lyrics

std::string PlayingState::lyrics

The lyrics of the song

◆ title

std::string PlayingState::title

The title of the currently playing song

◆ track

unsigned int PlayingState::track

The track number of the song

◆ year

unsigned int PlayingState::year

The year of release for the song


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