This commit is contained in:
Daniel Flanagan 2024-07-07 22:44:39 -05:00
parent 529536199e
commit 41a66fd32f

View file

@ -1,8 +1,8 @@
use super::song::{Plan, Song};
use super::song::{Plan, Song, Verse};
pub struct PlaylistEntry {
pub song: Song,
pub map: Plan,
pub plan_name: String,
}
pub struct PlaylistVerseRef {
@ -12,8 +12,28 @@ pub struct PlaylistVerseRef {
}
pub struct Display {
pub playlist: Vec<(Song, Option<String>)>,
pub current: PlaylistVerseRef,
pub frozen_at: Option<PlaylistVerseRef>,
pub playlist: Vec<PlaylistEntry>,
current: PlaylistVerseRef,
frozen_at: Option<PlaylistVerseRef>,
pub blanked: bool,
}
impl Display {
pub fn verse_ref(&self) -> &PlaylistVerseRef {
self.frozen_at.as_ref().unwrap_or(&self.current)
}
pub fn verse(&self) -> Option<&Verse> {
if self.blanked {
None
} else {
}
}
pub fn entry(&self) -> Option<PlaylistEntry> {
let vref = self.verse_ref();
self.playlist.get(vref.song_index)
}
pub fn plan() -> Plan {}
}