Skip to content

Automatic singleton detection #1167

@mried

Description

@mried

It would be great if beets is able to decide if a particular file should be imported as part of an album or a singleton. These need comes from my personal music library:
I've got a folder for each artist. Below the artist folder follow folders for each album of the artist as well as single files which do not belong to an album.
Example find-like output

> find /music
/music/artist1
/music/artist1/album1
/music/artist1/album1/01 - album_track.mp3
/music/artist1/album1/02 - album_track.mp3
/music/artist1/singleton_track_01.mp3

Using beet import /music will create two albums: One for album1 and one more or less random for the singleton. That's definitely not what I want 😉. The singletons can be identifies using the file name (they don't start with two or more digits followed by -).
To solve this, I see the following solutions:

  1. Move all singletons away before starting the import; import everything else using beet import; move the files back; import every singleton file explicitly using beet import -s.
  2. Implement a filter which filters out the file which should not be imported. The filter could use different configurations for the import of singletons and albums. So I could just write beet import /music; beet import -s /music.
  3. Implement something that is able to decide how a file should be imported. Something like beet import --auto-singleton /music
    The first solution works right now but is a bad way 'cause it's very slow and not the way it should be done. The second one is the most flexible one whereas the third does not require two beet runs.

I'm willing to do all the implementation but we should decide how to do it first 😉

Suggestions are welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurefeatures we would like to implement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions