Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --id3v23unsync option #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions flac2mp3.pl
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,16 @@
skipfilename => 'flac2mp3.ignore',
skipfile => 1,
processes => $NUM_PROCESSES_DEFAULT,
tagseparator => $TAG_SEPARATOR_DEFAULT
tagseparator => $TAG_SEPARATOR_DEFAULT,
id3v23unsync => 0
);

GetOptions(
\%Options, "quiet!", "tagdiff", "debug!",
"tagsonly!", "force!", "usage", "help",
"version", "pretend", "skipfile!", "skipfilename=s",
"processes=i", "tagseparator=s", "preset=s", "lameargs=s",
"copyfiles"
"copyfiles", "id3v23unsync!"
);

# info flag is the inverse of --quiet
Expand Down Expand Up @@ -451,6 +452,8 @@ sub showusage {
same tag.
Default: "/"
--copyfiles Copy non-flac files to dest directories
--id3v23unsync Enable id3v2.3 unsynchronisation (media players without id3 tag support)

EOT
exit 0;
}
Expand Down Expand Up @@ -839,6 +842,7 @@ sub write_tags {

if ( !$Options{pretend} ) {
my $mp3 = MP3::Tag->new($destfilename);
$mp3->get_config("id3v23_unsync")->[0] = $Options{id3v23unsync};

# Remove any existing tags
$mp3->{ID3v2}->remove_tag if exists $mp3->{ID3v2};
Expand Down