diff --git a/migration/src/m20231126_000002_genres.rs b/migration/src/m20231126_000002_genres.rs index 1c04c60..76f1f10 100644 --- a/migration/src/m20231126_000002_genres.rs +++ b/migration/src/m20231126_000002_genres.rs @@ -69,7 +69,7 @@ macro_rules! relationalize { all_genres.dedup(); let all_genres: Vec<[SimpleExpr; 3]> = all_genres .into_iter() - .map(|g| [sha256::digest(&g).into(), g.to_owned().into(), g.into()]) + .map(|g| [sha256::digest(&g).into(), g.into(), "".into()]) .collect(); let mut builder = sea_query::Query::insert() .into_table(GenreEntity) diff --git a/server/src/import/search_result.rs b/server/src/import/search_result.rs index fce81ee..c2398ca 100644 --- a/server/src/import/search_result.rs +++ b/server/src/import/search_result.rs @@ -186,7 +186,8 @@ impl From for SearchResult { ); for genre in track.recording.genres.to_owned().unwrap_or_default().iter() { - let id = sha256::digest(&genre.disambiguation); + let id = + sha256::digest(format!("{}{}", genre.name, genre.disambiguation).as_str()); if !genres.contains_key(&id) { genres.insert( id.clone(),