Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
a10345fbbe
|
|||
|
f3423eea53
|
|||
|
80e3d02cb4
|
|||
|
b7a7abbf61
|
|||
|
5abadc3131
|
|||
|
9c86cdcc62
|
|||
|
605fa5c15b
|
|||
|
9c1d39ba5f
|
|||
|
c6c9da2f27
|
|||
|
6872e7897b
|
|||
|
2d1497cb36
|
|||
|
f1fb3506b5
|
|||
|
f4050fe645
|
|||
|
b533f059d7
|
|||
|
00a25e168d
|
|||
|
b51c9939c1
|
|||
|
c22d45818e
|
|||
|
18cc852e6b
|
@@ -1,7 +1,7 @@
|
|||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|||||||
1
.rustfmt.toml
Normal file
1
.rustfmt.toml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hard_tabs = true
|
||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.3.0
|
||||||
|
|
||||||
|
* allow multiple values for the tags "musicbrainz-artistid" and "musicbrainz-albumartistid"
|
||||||
|
* fix "from", "to" & "config" cli argument processing
|
||||||
|
|
||||||
|
## v1.2.2
|
||||||
|
|
||||||
|
* dependencies upgraded
|
||||||
|
|
||||||
|
## v1.2.1
|
||||||
|
|
||||||
|
* dependencies upgraded
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
* "copy" encoding format added
|
* "copy" encoding format added
|
||||||
|
|||||||
506
Cargo.lock
generated
506
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
14
Cargo.toml
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "audio-conv"
|
name = "audio-conv"
|
||||||
version = "1.2.0"
|
version = "1.3.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Copies directory structure and converts audio files in it"
|
description = "Copies directory structure and converts audio files in it"
|
||||||
authors = ["Thomas Heck <t@b128.net>"]
|
authors = ["Thomas Heck <t@b128.net>"]
|
||||||
@@ -21,22 +21,22 @@ include = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
gstreamer-audio = { version = "0.16", features = ["v1_10"] }
|
gstreamer-audio = { version = "0.18", features = ["v1_10"] }
|
||||||
gstreamer = { version = "0.16", features = ["v1_10"] }
|
gstreamer = { version = "0.18", features = ["v1_10"] }
|
||||||
gstreamer-base = { version = "0.16", features = ["v1_10"] }
|
gstreamer-base = { version = "0.18", features = ["v1_10"] }
|
||||||
glib = "0.10"
|
glib = "0.15"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
num_cpus = "1"
|
num_cpus = "1"
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
clap = "2"
|
clap = { version = "3", features = ["cargo"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
globset = "0.4"
|
globset = "0.4"
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
tui = { version = "0.14", default-features = false, features = ["crossterm"] }
|
tui = { version = "0.17", default-features = false, features = ["crossterm"] }
|
||||||
|
|
||||||
[dependencies.tokio]
|
[dependencies.tokio]
|
||||||
version = "1"
|
version = "1"
|
||||||
|
|||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1618868421,
|
"lastModified": 1648297722,
|
||||||
"narHash": "sha256-vyoJhLV6cJ8/tWz+l9HZLIkb9Rd9esE7p+0RL6zDR6Y=",
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "eed214942bcfb3a8cc09eb3b28ca7d7221e44a94",
|
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1619118726,
|
"lastModified": 1649352661,
|
||||||
"narHash": "sha256-eEB4bIcl/REE5c9rMl4k3FmI9clTfjoFky5dm73gthY=",
|
"narHash": "sha256-6IO5W02HKY6pj4uRgStJ2EjIENlpvbb99OlDBBzJMDQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "14c8ae6efbf38dd4fd5fedaeeea2641c9c0e1e97",
|
"rev": "2bc410afc423de1fd7ce1d84da9f294eee866b3f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -117,44 +117,47 @@ struct TranscodeMatchFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn config() -> Result<Config> {
|
pub fn config() -> Result<Config> {
|
||||||
use clap::{App, Arg, SubCommand};
|
use clap::{Arg, Command};
|
||||||
|
|
||||||
let arg_matches = App::new("audio-conv")
|
let arg_matches = Command::new("audio-conv")
|
||||||
.version(clap::crate_version!())
|
.version(clap::crate_version!())
|
||||||
.about("Converts audio files")
|
.about("Converts audio files")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("config")
|
Arg::new("config")
|
||||||
.short("c")
|
.short('c')
|
||||||
.long("config")
|
.long("config")
|
||||||
|
.allow_invalid_utf8(true)
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("Path to an audio-conv config file, defaults to \"audio-conv.yaml\""),
|
.help("Path to an audio-conv config file, defaults to \"audio-conv.yaml\""),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("from")
|
Arg::new("from")
|
||||||
.short("f")
|
.short('f')
|
||||||
.long("from")
|
.long("from")
|
||||||
|
.allow_invalid_utf8(true)
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("\"from\" directory path"),
|
.help("\"from\" directory path"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("to")
|
Arg::new("to")
|
||||||
.short("t")
|
.short('t')
|
||||||
.long("to")
|
.long("to")
|
||||||
|
.allow_invalid_utf8(true)
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("\"to\" directory path"),
|
.help("\"to\" directory path"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("jobs")
|
Arg::new("jobs")
|
||||||
.short("j")
|
.short('j')
|
||||||
.long("jobs")
|
.long("jobs")
|
||||||
.required(false)
|
.required(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("Allow N jobs/transcodes at once. Defaults to number of logical cores"),
|
.help("Allow N jobs/transcodes at once. Defaults to number of logical cores"),
|
||||||
)
|
)
|
||||||
.subcommand(SubCommand::with_name("init").about("writes an example config"))
|
.subcommand(Command::new("init").about("writes an example config"))
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
let current_dir = std::env::current_dir().context("Could not get current directory")?;
|
let current_dir = std::env::current_dir().context("Could not get current directory")?;
|
||||||
@@ -288,15 +291,8 @@ pub fn config() -> Result<Config> {
|
|||||||
.context("Could not canonicalize \"to\" path")?,
|
.context("Could not canonicalize \"to\" path")?,
|
||||||
matches: transcode_matches,
|
matches: transcode_matches,
|
||||||
jobs: arg_matches
|
jobs: arg_matches
|
||||||
.value_of_os("jobs")
|
.value_of("jobs")
|
||||||
.map(|jobs_os_str| {
|
.map(|jobs_str| {
|
||||||
let jobs_str = jobs_os_str.to_str().with_context(|| {
|
|
||||||
// TODO: use `OsStr.display` when it lands
|
|
||||||
// https://github.com/rust-lang/rust/pull/80841
|
|
||||||
format!(
|
|
||||||
"Could not convert \"jobs\" argument to string due to invalid characters",
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
jobs_str.parse().with_context(|| {
|
jobs_str.parse().with_context(|| {
|
||||||
format!(
|
format!(
|
||||||
"Could not parse \"jobs\" argument \"{}\" to a number",
|
"Could not parse \"jobs\" argument \"{}\" to a number",
|
||||||
|
|||||||
64
src/main.rs
64
src/main.rs
@@ -1,11 +1,12 @@
|
|||||||
mod config;
|
mod config;
|
||||||
|
mod tag;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use crate::config::{Config, Transcode};
|
use crate::config::{Config, Transcode};
|
||||||
use anyhow::{Context, Error, Result};
|
use anyhow::{Context, Error, Result};
|
||||||
use futures::{pin_mut, prelude::*};
|
use futures::{pin_mut, prelude::*};
|
||||||
use glib::{subclass::prelude::*, GBoxed, GString};
|
use glib::{Boxed, GString};
|
||||||
use gstreamer::{gst_element_error, prelude::*, Element};
|
use gstreamer::{element_error, prelude::*, Element};
|
||||||
use gstreamer_base::prelude::*;
|
use gstreamer_base::prelude::*;
|
||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
@@ -19,8 +20,8 @@ use std::{
|
|||||||
};
|
};
|
||||||
use tokio::{fs, io::AsyncWriteExt, task, time::interval};
|
use tokio::{fs, io::AsyncWriteExt, task, time::interval};
|
||||||
|
|
||||||
#[derive(Clone, Debug, GBoxed)]
|
#[derive(Clone, Debug, Boxed)]
|
||||||
#[gboxed(type_name = "GBoxErrorWrapper")]
|
#[boxed_type(name = "GBoxErrorWrapper")]
|
||||||
struct GBoxErrorWrapper(Arc<Error>);
|
struct GBoxErrorWrapper(Arc<Error>);
|
||||||
|
|
||||||
impl GBoxErrorWrapper {
|
impl GBoxErrorWrapper {
|
||||||
@@ -171,6 +172,9 @@ async fn main() -> Result<()> {
|
|||||||
async fn main_loop(ui_queue: ui::MsgQueue) -> Result<()> {
|
async fn main_loop(ui_queue: ui::MsgQueue) -> Result<()> {
|
||||||
let (config, conv_args) = task::spawn_blocking(|| -> Result<_> {
|
let (config, conv_args) = task::spawn_blocking(|| -> Result<_> {
|
||||||
gstreamer::init()?;
|
gstreamer::init()?;
|
||||||
|
gstreamer::tags::register::<tag::MbArtistId>();
|
||||||
|
gstreamer::tags::register::<tag::MbAlbumArtistId>();
|
||||||
|
|
||||||
let config = config::config().context("Could not get the config")?;
|
let config = config::config().context("Could not get the config")?;
|
||||||
|
|
||||||
let conv_args = get_conversion_args(&config)
|
let conv_args = get_conversion_args(&config)
|
||||||
@@ -325,7 +329,7 @@ async fn transcode_gstreamer(
|
|||||||
queue: &ui::MsgQueue,
|
queue: &ui::MsgQueue,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let file_src: Element = gmake("filesrc")?;
|
let file_src: Element = gmake("filesrc")?;
|
||||||
file_src.set_property("location", &path_to_gstring(&from_path))?;
|
file_src.try_set_property("location", &path_to_gstring(&from_path))?;
|
||||||
|
|
||||||
let decodebin: Element = gmake("decodebin")?;
|
let decodebin: Element = gmake("decodebin")?;
|
||||||
|
|
||||||
@@ -350,9 +354,9 @@ async fn transcode_gstreamer(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let is_audio = src_pad.get_current_caps().and_then(|caps| {
|
let is_audio = src_pad.current_caps().and_then(|caps| {
|
||||||
caps.get_structure(0).map(|s| {
|
caps.structure(0).map(|s| {
|
||||||
let name = s.get_name();
|
let name = s.name();
|
||||||
name.starts_with("audio/")
|
name.starts_with("audio/")
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -360,7 +364,7 @@ async fn transcode_gstreamer(
|
|||||||
None => {
|
None => {
|
||||||
return Err(Error::msg(format!(
|
return Err(Error::msg(format!(
|
||||||
"Failed to get media type from pad {}",
|
"Failed to get media type from pad {}",
|
||||||
src_pad.get_name()
|
src_pad.name()
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
Some(false) => {
|
Some(false) => {
|
||||||
@@ -372,7 +376,7 @@ async fn transcode_gstreamer(
|
|||||||
|
|
||||||
let resample: Element = gmake("audioresample")?;
|
let resample: Element = gmake("audioresample")?;
|
||||||
// quality from 0 to 10
|
// quality from 0 to 10
|
||||||
resample.set_property("quality", &10)?;
|
resample.try_set_property("quality", &10i32)?;
|
||||||
|
|
||||||
let mut dest_elems = vec![
|
let mut dest_elems = vec![
|
||||||
resample,
|
resample,
|
||||||
@@ -386,7 +390,7 @@ async fn transcode_gstreamer(
|
|||||||
bitrate_type,
|
bitrate_type,
|
||||||
} => {
|
} => {
|
||||||
let encoder: Element = gmake("opusenc")?;
|
let encoder: Element = gmake("opusenc")?;
|
||||||
encoder.set_property(
|
encoder.try_set_property(
|
||||||
"bitrate",
|
"bitrate",
|
||||||
&i32::from(*bitrate)
|
&i32::from(*bitrate)
|
||||||
.checked_mul(1_000)
|
.checked_mul(1_000)
|
||||||
@@ -417,8 +421,8 @@ async fn transcode_gstreamer(
|
|||||||
let encoder: Element = gmake("lamemp3enc")?;
|
let encoder: Element = gmake("lamemp3enc")?;
|
||||||
// target: "1" = "bitrate"
|
// target: "1" = "bitrate"
|
||||||
encoder.set_property_from_str("target", "1");
|
encoder.set_property_from_str("target", "1");
|
||||||
encoder.set_property("bitrate", &i32::from(*bitrate))?;
|
encoder.try_set_property("bitrate", &i32::from(*bitrate))?;
|
||||||
encoder.set_property(
|
encoder.try_set_property(
|
||||||
"cbr",
|
"cbr",
|
||||||
match bitrate_type {
|
match bitrate_type {
|
||||||
config::BitrateType::Vbr => &false,
|
config::BitrateType::Vbr => &false,
|
||||||
@@ -437,7 +441,7 @@ async fn transcode_gstreamer(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let file_dest: gstreamer_base::BaseSink = gmake("filesink")?;
|
let file_dest: gstreamer_base::BaseSink = gmake("filesink")?;
|
||||||
file_dest.set_property("location", &path_to_gstring(&to_path_clone))?;
|
file_dest.try_set_property("location", &path_to_gstring(&to_path_clone))?;
|
||||||
file_dest.set_sync(false);
|
file_dest.set_sync(false);
|
||||||
dest_elems.push(file_dest.upcast());
|
dest_elems.push(file_dest.upcast());
|
||||||
|
|
||||||
@@ -452,7 +456,7 @@ async fn transcode_gstreamer(
|
|||||||
let sink_pad = dest_elems
|
let sink_pad = dest_elems
|
||||||
.get(0)
|
.get(0)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get_static_pad("sink")
|
.static_pad("sink")
|
||||||
.expect("1. dest element has no sinkpad");
|
.expect("1. dest element has no sinkpad");
|
||||||
src_pad.link(&sink_pad)?;
|
src_pad.link(&sink_pad)?;
|
||||||
|
|
||||||
@@ -464,7 +468,7 @@ async fn transcode_gstreamer(
|
|||||||
.field("error", &GBoxErrorWrapper::new(err))
|
.field("error", &GBoxErrorWrapper::new(err))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
gst_element_error!(
|
element_error!(
|
||||||
decodebin,
|
decodebin,
|
||||||
gstreamer::LibraryError::Failed,
|
gstreamer::LibraryError::Failed,
|
||||||
("Failed to insert sink"),
|
("Failed to insert sink"),
|
||||||
@@ -473,9 +477,7 @@ async fn transcode_gstreamer(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let bus = pipeline
|
let bus = pipeline.bus().context("Could not get bus for pipeline")?;
|
||||||
.get_bus()
|
|
||||||
.context("Could not get bus for pipeline")?;
|
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
.set_state(gstreamer::State::Playing)
|
.set_state(gstreamer::State::Playing)
|
||||||
@@ -499,28 +501,28 @@ async fn transcode_gstreamer(
|
|||||||
let pipe_stop_res = pipeline.set_state(gstreamer::State::Null);
|
let pipe_stop_res = pipeline.set_state(gstreamer::State::Null);
|
||||||
|
|
||||||
let err: Error = err
|
let err: Error = err
|
||||||
.get_details()
|
.details()
|
||||||
.and_then(|details| {
|
.and_then(|details| {
|
||||||
if details.get_name() != "error-details" {
|
if details.name() != "error-details" {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
let err = details
|
let err = details
|
||||||
.get::<&GBoxErrorWrapper>("error")
|
.get::<&GBoxErrorWrapper>("error")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.map(|err| err.clone().into())
|
.clone()
|
||||||
.expect("error-details message without actual error");
|
.into();
|
||||||
Some(err)
|
Some(err)
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
GErrorMessage {
|
GErrorMessage {
|
||||||
src: msg
|
src: msg
|
||||||
.get_src()
|
.src()
|
||||||
.map(|s| String::from(s.get_path_string()))
|
.map(|s| String::from(s.path_string()))
|
||||||
.unwrap_or_else(|| String::from("None")),
|
.unwrap_or_else(|| String::from("None")),
|
||||||
error: err.get_error().to_string(),
|
error: err.error().to_string(),
|
||||||
debug: err.get_debug(),
|
debug: err.debug(),
|
||||||
source: err.get_error(),
|
source: err.error(),
|
||||||
}
|
}
|
||||||
.into()
|
.into()
|
||||||
});
|
});
|
||||||
@@ -560,7 +562,7 @@ async fn transcode_gstreamer(
|
|||||||
|
|
||||||
let dur = decodebin
|
let dur = decodebin
|
||||||
.query_duration::<ClockTime>()
|
.query_duration::<ClockTime>()
|
||||||
.and_then(|time| time.nanoseconds());
|
.map(|time| time.nseconds());
|
||||||
|
|
||||||
let ratio = dur.and_then(|dur| {
|
let ratio = dur.and_then(|dur| {
|
||||||
if dur == 0 {
|
if dur == 0 {
|
||||||
@@ -569,11 +571,11 @@ async fn transcode_gstreamer(
|
|||||||
|
|
||||||
let pos = decodebin
|
let pos = decodebin
|
||||||
.query_position::<ClockTime>()
|
.query_position::<ClockTime>()
|
||||||
.and_then(|time| time.nanoseconds());
|
.map(|time| time.nseconds());
|
||||||
|
|
||||||
pos.map(|pos| {
|
pos.map(|pos| {
|
||||||
let ratio = pos as f64 / dur as f64;
|
let ratio = pos as f64 / dur as f64;
|
||||||
ratio.max(0.0).min(1.0)
|
ratio.clamp(0.0, 1.0)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
45
src/tag.rs
Normal file
45
src/tag.rs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
use glib::Value;
|
||||||
|
use gstreamer::{
|
||||||
|
tags::{merge_strings_with_comma, CustomTag},
|
||||||
|
Tag, TagFlag,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub struct MbArtistId;
|
||||||
|
|
||||||
|
impl<'a> Tag<'a> for MbArtistId {
|
||||||
|
type TagType = &'a str;
|
||||||
|
|
||||||
|
fn tag_name<'b>() -> &'b str {
|
||||||
|
"musicbrainz-artistid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CustomTag<'_> for MbArtistId {
|
||||||
|
const FLAG: TagFlag = TagFlag::Meta;
|
||||||
|
const NICK: &'static str = "artist ID";
|
||||||
|
const DESCRIPTION: &'static str = "MusicBrainz artist ID";
|
||||||
|
|
||||||
|
fn merge_func(src: &Value) -> Value {
|
||||||
|
merge_strings_with_comma(src)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct MbAlbumArtistId;
|
||||||
|
|
||||||
|
impl<'a> Tag<'a> for MbAlbumArtistId {
|
||||||
|
type TagType = &'a str;
|
||||||
|
|
||||||
|
fn tag_name<'b>() -> &'b str {
|
||||||
|
"musicbrainz-albumartistid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CustomTag<'_> for MbAlbumArtistId {
|
||||||
|
const FLAG: TagFlag = TagFlag::Meta;
|
||||||
|
const NICK: &'static str = "album artist ID";
|
||||||
|
const DESCRIPTION: &'static str = "MusicBrainz album artist ID";
|
||||||
|
|
||||||
|
fn merge_func(src: &Value) -> Value {
|
||||||
|
merge_strings_with_comma(src)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user