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

mid3cp removes old tags #277

Closed
sylveon opened this issue Nov 28, 2016 · 12 comments
Closed

mid3cp removes old tags #277

sylveon opened this issue Nov 28, 2016 · 12 comments
Labels

Comments

@sylveon
Copy link

@sylveon sylveon commented Nov 28, 2016

I'd like to use it as a way to merge tags from two files (One has BPM, encoder but the other one has title, artist) into a single file, but the tool erases all old tags before copying (something that the original id3cp does not)

A better behavior would be to keep them and ask the user what to do if there is any conflicts during the progress.

@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 28, 2016

@sylveon

This comment has been minimized.

Copy link
Author

@sylveon sylveon commented Nov 28, 2016

id3cp does not ask for conflict, it creates a new tag element with the same type, creating a duplicate tag in the file. mid3cp could have an argument for each behavior (ask, overwrite, ignore or id3cp-like) and one to keep or remove old tags before copying. But it should also default to the old versions' behavior when no argument is provided, to not break scripts.

@lazka lazka added the bug label Nov 29, 2016
@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 30, 2016

I've just tested with id3cp and it also deletes all tags from the destination file first.

@lazka lazka added enhancement and removed bug labels Nov 30, 2016
@sylveon

This comment has been minimized.

Copy link
Author

@sylveon sylveon commented Nov 30, 2016

@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 30, 2016

This is what I get

lazka@debian> id3info a.mp3

    *** Tag information for a.mp3
    === TIT2 (Title/songname/content description): Das Boot
    === TPE1 (Lead performer(s)/Soloist(s)): Absolute Beginner
    === TLEN (Length): 249000
    *** mp3 info
    MPEG1/layer III
    Bitrate: 128KBps
    Frequency: 44KHz
lazka@debian> id3info b.mp3

    *** Tag information for b.mp3
    === TIT2 (Title/songname/content description): Elephant Gun
    === TPE1 (Lead performer(s)/Soloist(s)): Beirut
    === TALB (Album/Movie/Show title): Lon Gisland EP
    === TRCK (Track number/Position in set): 1
    *** mp3 info
    MPEG1/layer III
    Bitrate: 192KBps
    Frequency: 44KHz
lazka@debian> id3cp --version
    id3cp 3.8.3
lazka@debian> id3info --version
    id3info 3.8.3
lazka@debian> id3cp
    Usage: id3cp [OPTIONS] SOURCE DEST
lazka@debian> id3cp a.mp3 b.mp3
    Parsing a.mp3: done.  Copying to b.mp3: done
lazka@debian> id3info b.mp3

    *** Tag information for b.mp3
    === TIT2 (Title/songname/content description): Das Boot
    === TPE1 (Lead performer(s)/Soloist(s)): Absolute Beginner
    === TLEN (Length): 249000
    *** mp3 info
    MPEG1/layer III
    Bitrate: 192KBps
    Frequency: 44KHz
    lazka@debian>
@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 30, 2016

I'm still OK with adding an option to keep the tags, but as far as I can see the default behavior matches that of id3cp

@sylveon

This comment has been minimized.

Copy link
Author

@sylveon sylveon commented Nov 30, 2016

@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Nov 30, 2016

ok, thanks for checking.

Any opinions on how to call the switch? --merge?
And should we use the target or source id3 version?

@sylveon

This comment has been minimized.

Copy link
Author

@sylveon sylveon commented Nov 30, 2016

--merge: Do not erase the old tags before copying
--ask: Ask what to do in case of conflicts. (default) (requires --merge)
--overwrite: Automatically overwrite the tags of the destination with the tags from the source in case of conflicts. (requires --merge)
--ignore: Keep the tags from the destination in case of conflicts. (requires --merge)

The ID3 version is up to your preference.

lazka added a commit to lazka/mutagen that referenced this issue Dec 14, 2016
Instead of replacing the whole tag this will copy over
frames and potentially replace existing frames.

The id3 version of the target will be used. Excluded frames and
frames not supported by the target version will not be copied.

In case the target has no ID3 tag this option has no effect.
@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Dec 14, 2016

Proposed implementation here: #280

I don't like adding that many options if there is no common use case for it. It makes the implementation more complex and makes reading the help output and man page harder for not much gain.

Does the functionality outlined in #280 cover your use case, or did I miss anything?

lazka added a commit to lazka/mutagen that referenced this issue Dec 14, 2016
Instead of replacing the whole tag this will copy over
frames and potentially replace existing frames.

The id3 version of the target will be used. Excluded frames and
frames not supported by the target version will not be copied.

In case the target has no ID3 tag this option has no effect.
@sylveon

This comment has been minimized.

Copy link
Author

@sylveon sylveon commented Dec 14, 2016

It seems fine to me.

@lazka lazka closed this in 22f74bb Dec 15, 2016
@lazka

This comment has been minimized.

Copy link
Member

@lazka lazka commented Dec 15, 2016

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.