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

Duplicate audio when storing metadata in cue file #1010

Open
OVlasiuk opened this issue Nov 15, 2020 · 8 comments
Open

Duplicate audio when storing metadata in cue file #1010

OVlasiuk opened this issue Nov 15, 2020 · 8 comments
Labels

Comments

@OVlasiuk
Copy link

Bug report

This follows up on #992

Describe the bug

Suppose I have two files: a .flac (.ape, .wv, etc) without any metadata, containing an album, and a .cue file with metadata for this album. This causes duplication: the no-metadata file is listed as a single item, followed by the same audio split into tracks coming from the .cue file.

Expected Behavior

Only list the tracks once. This is what other popular players do as well.

Actual Behavior

As explained above, there is duplication in the audio added by e.g. mpc add [folder name].
Would it make sense to introduce an option of the sort "always prefer the metadata in cue files"?

Version

Music Player Daemon 0.22.3 (0.22.3)

Log

Log is not really relevant. Here is a sample output of mpc playlist after mpc add [folder name]. Notice the superfluous first item:

1  -  ()
2 Ensemble Organum - Introït: Salve sancta parens (1991)
3 Ensemble Organum - Kyrie (1991)
4 Ensemble Organum - Gloria in excelsis Deo (1991)
5 Ensemble Organum - Graduel: Benedicta et venerabilis (1991)
6 Ensemble Organum - Alleluia: Nobilis atque pia (1991)
7 Ensemble Organum - Alleluia: Ave Maria gratia plena (1991)
8 Ensemble Organum - Séquence: Ave mundi spes Maria (1991)
9 Ensemble Organum - Credo in unum Deum (1991)
10 Ensemble Organum - Offertoire: Felix namque es sacra virgo (1991)
11 Ensemble Organum - Préface - Sanctus (1991)
12 Ensemble Organum - Agnus Dei (1991)
13 Ensemble Organum - Communion: Beata viscera (1991)
14 Ensemble Organum - Ite missa est - Deo gratias - Motet (1991)
@MPconta
Copy link

MPconta commented Dec 8, 2020

Are you sure, the .flac does not contain any tags?
I also use .flac +.cue, where the .cue contains the tags and in the .flac all tags are removed. With the current MPD version i do not have the problem of doubled entries.
It seems, it is necessary to distinguish strictly between the possibilities where tags can be stored. When the tags are in the .cue, the .flac must not contain any tags.

@hiqua
Copy link

hiqua commented Dec 8, 2020

Are you sure, the .flac does not contain any tags?
I also use .flac +.cue, where the .cue contains the tags and in the .flac all tags are removed. With the current MPD version i do not have the problem of doubled entries.
It seems, it is necessary to distinguish strictly between the possibilities where tags can be stored. When the tags are in the .cue, the .flac must not contain any tags.

How do you add your tracks? Don't you have the problem if you add the folder containing both the .flac and the .cue?

@MPconta
Copy link

MPconta commented Dec 8, 2020

The folder contains 2 files. Just the plain .flac and the .cue . Both have the same filename.

You can check the database with

lsinfo [folder name]

The result should not show any tag-entry like "album" or "artist", but entries like Time, duration and a reference to the .cue .

@OVlasiuk
Copy link
Author

OVlasiuk commented Dec 9, 2020

@MPconta:

Are you sure, the .flac does not contain any tags?

Quite sure indeed: I have removed them with metaflac. I have also tried this on a .wv file, removing tags with wvtag; for both formats there is an empty item containing the entire album, as shown above. I wonder if the difference is in that you do mpc add [cue file] and not mpc add [folder], as @hiqua has suggested.

The folder contains 2 files. Just the plain .flac and the .cue . Both have the same filename.

Yep. Not sure how to tell mpd to lsinfo, so can't try out your suggestion though.

@MPconta
Copy link

MPconta commented Dec 9, 2020

Yep. Not sure how to tell mpd to lsinfo, so can't try out your suggestion though.

You can use telnet from another computer.

telnet [ip-adress] [port-number]

Btw. i use MPDroid and Gmpc as MPD-clients.

@hiqua
Copy link

hiqua commented Dec 9, 2020

@MPconta it could be that your clients solve this problem themselves. Maybe it would be better to solve these in mpc / ncmpc (and clients in general) instead of mpd. I assume the problem is the same with playlists: if you add a folder containing both a few tracks and a playlist with all the tracks, I guess they'll be added twice by mpc / ncmpc (I don't use playlists so I don't really know).

@MPconta
Copy link

MPconta commented Dec 9, 2020

@MPconta it could be that your clients solve this problem themselves.

Not really sure about that.
To my understanding all clients have to revert to the MPD protocol-commands listed here:
[https://www.musicpd.org/doc/html/protocol.html]
So you can overview best whats happening, when using commands like lsinfo directly.
But maybe i'm totally wrong?!

@vvnull
Copy link

vvnull commented Jan 24, 2021

I encounter this duplication as well. Both clients that I use (ncmpcpp and MPDroid) list <empty> and <no album> or (Unknown Artist) and (Unknown Album) respectively for these flac files, in addition to sourcing the cue appropriately.
Previously I had solved this issue by simply putting *.cue in .mpdignore, but that required me to split the flacs every time. My current workaround has been to nest my audio into folders:

  • flac_split (for split flac files, which I keep the cue for in the directory)
  • flac_cue (for single flac + cue)

In each dir I keep an .mpdignore file; in flac_split it contains *.cue, and in flac_cue it contains *.flac. Thanks to this, the split files use their own tags and do not use the cue files (which I prefer to keep there for backup/reference), and the single flacs' tags (or lack thereof) are ignored, and only the cues are used. This satisfies both of my used clients, without needing to convert all files to one convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants