Add SongData struct

This commit is contained in:
Ethan Girouard 2024-01-01 15:08:13 -05:00
parent ddec845eb0
commit a65c7993d5
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146
2 changed files with 17 additions and 0 deletions

View File

@ -1,4 +1,5 @@
pub mod app; pub mod app;
pub mod songdata;
use cfg_if::cfg_if; use cfg_if::cfg_if;
cfg_if! { cfg_if! {

16
src/songdata.rs Normal file
View File

@ -0,0 +1,16 @@
/// Holds information about a song
#[derive(Debug)]
pub struct SongData {
/// Song name
pub name: String,
/// Song artist
pub artist: String,
/// Song album
pub album: String,
/// Path to song file, relative to the root of the web server.
/// For example, `"/assets/audio/Song.mp3"`
pub song_path: String,
/// Path to song image, relative to the root of the web server.
/// For example, `"/assets/images/Song.jpg"`
pub image_path: String,
}