Stuff
This commit is contained in:
parent
529536199e
commit
41a66fd32f
1 changed files with 25 additions and 5 deletions
|
@ -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 {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue