I **think** I've at least 99% fixed the top songs mismatch
This commit is contained in:
@@ -69,6 +69,18 @@ pub async fn update_status(
|
|||||||
Ok(active.update(db).await?)
|
Ok(active.update(db).await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn update_mbid(
|
||||||
|
db: &DatabaseConnection,
|
||||||
|
id: i32,
|
||||||
|
musicbrainz_id: &str,
|
||||||
|
) -> DbResult<WantedItem> {
|
||||||
|
let existing = get_by_id(db, id).await?;
|
||||||
|
let mut active: ActiveModel = existing.into();
|
||||||
|
active.musicbrainz_id = Set(Some(musicbrainz_id.to_string()));
|
||||||
|
active.updated_at = Set(Utc::now().naive_utc());
|
||||||
|
Ok(active.update(db).await?)
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn find_by_mbid(
|
pub async fn find_by_mbid(
|
||||||
db: &DatabaseConnection,
|
db: &DatabaseConnection,
|
||||||
musicbrainz_id: &str,
|
musicbrainz_id: &str,
|
||||||
|
|||||||
Reference in New Issue
Block a user