artifacts: rewrite the artifacts model to be source agnostic for now
This commit is contained in:
+3
-13
@@ -1,8 +1,7 @@
|
||||
use chrono::{DateTime, Duration, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sqlite::OpenFlags;
|
||||
|
||||
use crate::{artifacts::{Artifact, MixxxDB, MixxxError, MixxxTrack}, prediction::{GeneratedResponses, PossibleResponse}, scene::conversation::ConversationEntry};
|
||||
use crate::{artifacts::{Artifact, MixxxDB, MixxxError}, prediction::{GeneratedResponses, PossibleResponse}, scene::conversation::ConversationEntry};
|
||||
|
||||
pub mod conversation;
|
||||
|
||||
@@ -12,7 +11,6 @@ pub struct StageDirection {
|
||||
#[serde(skip)]
|
||||
pub end_time: DateTime<Utc>,
|
||||
pub narrative: String,
|
||||
pub current_playlist: Vec<MixxxTrack>
|
||||
}
|
||||
|
||||
impl StageDirection {
|
||||
@@ -27,22 +25,14 @@ impl Default for StageDirection {
|
||||
episode_number: 0,
|
||||
end_time: Utc::now() + Duration::hours(2),
|
||||
narrative: Default::default(),
|
||||
current_playlist: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||
pub struct Scenery {
|
||||
pub artifacts: Vec<Artifact>
|
||||
}
|
||||
|
||||
impl StageDirection {
|
||||
pub fn reload_mixxx_playlist(&mut self) -> Result<(), MixxxError> {
|
||||
self.current_playlist = MixxxDB::load(self.episode_number)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
pub artifacts: Vec<Artifact>,
|
||||
pub current_playlist: Vec<Artifact>
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user