now there are items and a bit of style to the library

This commit is contained in:
Chris Cochrun 2025-01-15 14:31:48 -06:00
parent 929b0a33d1
commit 40580a6e7a
7 changed files with 131 additions and 9 deletions

View file

@ -12,6 +12,8 @@ use tracing::{debug, error};
use crate::{core::slide, Slide, SlideBuilder};
use super::{
content::Content,
kinds::ServiceItemKind,
model::{get_db, LibraryKind, Model},
service_items::ServiceTrait,
slide::{Background, TextAlignment},
@ -34,6 +36,16 @@ pub struct Song {
pub font_size: Option<i32>,
}
impl Content for Song {
fn title(&self) -> String {
self.title.clone()
}
fn kind(&self) -> ServiceItemKind {
ServiceItemKind::Song(self.clone())
}
}
impl ServiceTrait for Song {
fn title(&self) -> String {
self.title.clone()