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

Support multiple formats and qualities for one track or album #2316

Closed
twrightsman opened this issue Dec 13, 2016 · 10 comments
Closed

Support multiple formats and qualities for one track or album #2316

twrightsman opened this issue Dec 13, 2016 · 10 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@twrightsman
Copy link
Contributor

This feature request is similar to #791 but I think it would be useful to have beets capable of managing multiple file formats of the same track and/or album in the beets directory and library. This would be similar to how Calibre can convert between and store multiple file formats of the same book for different ebook readers.

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Dec 13, 2016
@sampsyo
Copy link
Member

sampsyo commented Dec 13, 2016

Hi! This sounds intriguing, but I don't quite understand how it would work. Can you go into a little more detail on how this would look from a UI perspective? How would the importer detect this? How would you tell beets that you're adding a second format for an existing album? What would the output of beet ls -p be? How would you beet rm one copy but not the other? This kind of thinking can help determine what needs to be done.

#136 seems related: there, the number of files is less than the number of tracks; here, the number of files would be more than the number of tracks.

@twrightsman
Copy link
Contributor Author

twrightsman commented Dec 13, 2016

Sure!

How would the importer detect this?

I am imagining that beets finds a file during the import process that, according to its metadata, is already present in the library (either from the same import run or a previous one) but is of a different file format or even same format but different quality. Chromaprint can be used for files without metadata, if enabled.

How this would look from a UI perspective?

Beets would ask similar questions when duplicates are detected:

How would you tell beets that you're adding a second format for an existing album?

It seems this would be handled without a user flag, but by auto-detection of an existing album with the same (or similar) metadata to the one being imported.

What would the output of beet ls -p be?

This command would simply list all filenames of all tracks like so:

/Library/Artist/Album/Track1.ogg
/Library/Artist/Album/Track2.ogg
/Library/Artist/Album/Track2.mp3
/Library/Artist/Album/Track3.ogg

Is there any problems you are imagining where this wouldn't be an ideal case? Would there be a situation where a user would want only one filename per track in beet ls -p output? If so, we could create a "preference" flag to output, per track, only the filename of the preferred format if multiple file formats exist for that track so that we could enforce a "one track, one filename" rule.

How would you beet rm one copy but not the other?

If beet rm detects multiple file formats for a track matching the query then it can ask similar questions to the ones on import (if the -d flag is used, I would keep the default no-flag behavior of leaving the files on the disk):

  • Do you want to delete all file formats?
  • Which file formats do you want to delete?

If we want to do this non-interactively, we could have that preference flag again, where a file format or formats is/are preferred for deletion (and all others kept).

@ghost
Copy link

ghost commented Dec 13, 2016

@twrightsman : the missing plugin should also be detect the example you posted:

/Library/Artist/Album/Track1.ogg
/Library/Artist/Album/Track2.ogg
/Library/Artist/Album/Track2.mp3
/Library/Artist/Album/Track3.ogg

as missing an mp3 file for Track1. So we'd definitely wanna think about how it'd work with other plugins too.

@sampsyo
Copy link
Member

sampsyo commented Dec 13, 2016

Hmm... so far, this sounds pretty similar to just having multiple copies of some music in your library. For example, you could just choose "keep both" on import and you'd end up with two different albums with the same metadata but different files.

Any thoughts about how your proposal would improve on that?

@twrightsman
Copy link
Contributor Author

I do agree that the situations are quite similar. However, I don't see the advantage of having two different albums with the same metadata. It would seem more user-friendly to have all the different file formats in one folder and to modify the keep both behavior to follow this.

I don't think the current convert plugin is the ideal implementation by transcoding all music to a single directory because I, as a user, would like the transcoded music to be organized as well.

Two big issues that go against my feature suggestion are:

  • The implementation and schema changes (including future maintenance) required to facilitate multiple file formats aren't worth changing compared to dealing with the current implementation of duplicate albums
  • I'm possibly in the minority when it comes to wanting organized transcoded music

@sampsyo
Copy link
Member

sampsyo commented Dec 13, 2016

Yeah! I didn't mean to suggest that this general idea isn't worth pursuing; I was just asking for a little more clarification. Specifically, where do you imagine this feature manifesting itself in the UI?

For example, above, beet ls -p appears to behave the same way as if the different formats were treated as separate tracks. If you want different formats to share a directory, you can remove %aunique{} from your path formats. So what were you imagining would be different for this feature?

@twrightsman
Copy link
Contributor Author

twrightsman commented Dec 13, 2016

That's a strong point and I didn't know about the paths feature; perhaps the convert plugin should be expanded to allow a user to transcode tracks and then import them into the library (as a command-line option)? If the user hasn't configured their paths then the plugin could give a helpful suggestion to do so, if that's appropriate.

Because the paths feature would allow separate directories for identical albums of different formats, it seems beets already has the feature I requested 😄

@sampsyo
Copy link
Member

sampsyo commented Dec 14, 2016

Cool! The idea to add something to the "convert" plugin is interesting… it wouldn't be too complicated to have its newly-converted files added to the library. I'll close this issue for now, but please feel free to open another if you're interesting in pursuing that!

@sampsyo sampsyo closed this as completed Dec 14, 2016
@pprkut
Copy link
Contributor

pprkut commented Dec 19, 2016

FWIW, this sounds pretty similar to my motivation behind #1640.

@sampsyo
Copy link
Member

sampsyo commented Dec 20, 2016

Yes! That's the issue I was looking for but somehow couldn't find. Thanks, @pprkut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
Projects
None yet
Development

No branches or pull requests

3 participants