Updates for the "full flow"

This commit is contained in:
Connor Johnstone
2026-03-17 21:38:11 -04:00
parent e1b682b048
commit 9e1886b45a
8 changed files with 110 additions and 1 deletions
+4
View File
@@ -9,6 +9,8 @@ use crate::error::{DbError, DbResult};
pub async fn add(
db: &DatabaseConnection,
item_type: ItemType,
name: &str,
musicbrainz_id: Option<&str>,
artist_id: Option<i32>,
album_id: Option<i32>,
track_id: Option<i32>,
@@ -16,6 +18,8 @@ pub async fn add(
let now = Utc::now().naive_utc();
let active = ActiveModel {
item_type: Set(item_type),
name: Set(name.to_string()),
musicbrainz_id: Set(musicbrainz_id.map(String::from)),
artist_id: Set(artist_id),
album_id: Set(album_id),
track_id: Set(track_id),