Skip to content

Commit

Permalink
Merge pull request #33 from snylonue/musicbrainz-improvement
Browse files Browse the repository at this point in the history
feat(anni): use musicbrainz id as album id
  • Loading branch information
Yesterday17 authored Oct 3, 2023
2 parents 80b6140 + baf79fe commit 712239f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anni/src/subcommands/repo/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use musicbrainz_rs::entity::artist_credit::ArtistCredit;
use musicbrainz_rs::entity::release::Release;
use musicbrainz_rs::Fetch;
use std::path::PathBuf;
use uuid::Uuid;

#[derive(Args, Handler, Debug, Clone)]
pub struct RepoGetAction {
Expand Down Expand Up @@ -261,6 +262,9 @@ async fn repo_get_musicbrainz(

let mut album = Album::new(
AlbumInfo {
album_id: Uuid::parse_str(&options.id)
.ok()
.unwrap_or_else(Uuid::new_v4),
title: release.title,
artist,
release_date,
Expand Down

0 comments on commit 712239f

Please sign in to comment.