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

Bug: Does group-albums use ../$album%aunique{}/.. as the path by default? #764

Closed
udiboy1209 opened this issue May 14, 2014 · 24 comments
Closed
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@udiboy1209
Copy link
Contributor

I had a directory with many songs from an artist spanning 4-5 albums, all tagged correctly.

I imported them using

$ beet import -gA ~/Music/Linkin\ Park

and beets created a new folder for each song in every album. I ended up having 10-12 folders per album like Hybrid Theory <some_number>, each with one or two songs in them.
I think this happened because of the album disambiguation thingy.

I then set the default path in my config file to $albumartist/$album/$track $title, and reimported that whole dir. It worked as expected.

I am not able to isolate this setting in the code, but I think group-albums feature should leave the disambiguation setting out.

@sampsyo
Copy link
Member

sampsyo commented May 14, 2014

Hmm, it sounds like the issue is that the group-albums setting detected that these were different albums. (The disambiguation string appearing is just a symptom of that fact and not a problem.)

Can you provide more details on the metadata of those files? We should be able to identify why group-albums thought there were many different albums. For example, it could be getting tripped up by featuring artists.

@udiboy1209
Copy link
Contributor Author

I know for sure those 10-12 files in each album had exactly the same album name. I however updated them using beets after this happened, so i can't show you conclusive proof. Could you build up a few test files and check?

@sampsyo
Copy link
Member

sampsyo commented May 14, 2014

Everything works fine in testing here. We'll need specimens of files that cause this behavior reproducibly to diagnose it—please reopen this issue if you come across any more.

@sampsyo sampsyo closed this as completed May 14, 2014
@udiboy1209
Copy link
Contributor Author

I found a similar problem with another album. I have five tracks from the album 'Recovery'. They were in a directory along with other songs from different albums. I imported that dir using group-albums option. The tracks all went to the same directory because I had disabled album disambiguation in my config. But, in the database, they are listed as different albums.

Querying the library like so

beet ls -af '$album - $mb_albumid - $id'  recovery

gives the following output:

Recovery - c17555bf-b84f-328c-94ff-d749bb35b95a - 43
Recovery - 65085f39-6482-44fd-8c34-a266475bedeb - 45
Recovery - c17555bf-b84f-328c-94ff-d749bb35b95a - 48
Recovery - c17555bf-b84f-328c-94ff-d749bb35b95a - 50

clearly beets is regarding them as different albums. How do I "merge" these into a single album entry in the library database?

@sampsyo
Copy link
Member

sampsyo commented May 19, 2014

Do you have the original (unmodified, pre-import) files so we can run some experiments?

FWIW, the grouping depends on the artist, album artist, and album fields on the original files: https://github.com/sampsyo/beets/blob/master/beets/importer.py#L1084

If you're interested in post-facto regrouping of albums, see #112.

@udiboy1209
Copy link
Contributor Author

I don't think I have the original files. I should start making copies of what I am about to import!

Also, is the grouping done before or after auto-tagging? If its done after, then the problem might be with unreliable and not necessarily accurate tags in the unimported files, due to which they might have been grouped separately.

@sampsyo
Copy link
Member

sampsyo commented May 19, 2014

Yes, grouping is done as a pre-processing step before autotagging. (Grouping afterward wouldn't work very well since they would already have uniform tags as a single album. The point of the feature is to tag the files as separate albums.) So it's almost certainly because the original metadata is slightly inconsistent (different artist name spelling, for example).

@udiboy1209
Copy link
Contributor Author

I removed those albums from the beets library and then again imported those five tracks (as a single album) which worked correctly. I think group-albums should have this feature of handling inconsistent tags while grouping.

Few ideas as to how to approach that:

  1. Auto-tag each entry as a singleton, and then try to group. (similar to what I did manually right now)
  2. Use fuzzy matching (distance calculation) while grouping. This might go horribly wrong, and will need some experimenting with.
  3. Ask the user to group manually. Or better, group the tracks automatically first and then allow the user to modify the groups.

@sampsyo
Copy link
Member

sampsyo commented May 19, 2014

Fuzzy matching does seem like a good idea. Do you mind opening a separate issue to make that into a feature request? We'll need some examples to use as robustness test cases.

Tagging separately seems rather slow (requiring many more trips to MusicBrainz) but could work. Grouping manually is also an option, but that doesn't offer too much over having the user manually group files into directories, and it's unclear how the UI should work.

@linkdaniel
Copy link

Hi @sampsyo, I sent you some example files via WeTransfer.

@sampsyo
Copy link
Member

sampsyo commented Dec 3, 2016

Hi, @linkdaniel! I don't quite see what's going on from the files—can you please file a new bug with full details (i.e., what you expected to happen, and any guesses as to what went wrong from your perspective)?

@linkdaniel
Copy link

@sampsyo Perhaps you didn't see the message that came with the files. They belong to the same album, and $albumartist as well as $album have the same values. I'd expect beets to disambiguate nothing. Instead, it should organize all files into just one folder. I'm using the default paths.

$ beet ls -f 'Album Artist: $albumartist - Album: $album - Path: $path' dusty 1
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 9/07 Kismet.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 92/03 The Windmills of Your Mind.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 76/08 The Warnings.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 181/06 Hogin' Machine.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 222/12 Hey Jude.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 89/11 Holding You, Loving You.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 34/04 Forty Days.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 91/05 Get Thy Bearings.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 103/02 Lady Love.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 253/10 Bamboo Child.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 16/13 Survival.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 229/14 Humpty Dumpty.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 232/01 Intro _ Abstractions.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 220/09 On the Hill.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 271/15 The Journey.mp3
Album Artist: Various Artists - Album: Dusty Fingers, Volume 1 - Path: /home/daniel/Musik/Collection/Various Artists/Dusty Fingers, Volume 1 82/16 Dee Dee Drums.mp3

I'm using the beets version that is included in Mint 18 Cinnamon, plus some plugins:

$ beet version
beets version 1.3.8
plugins: lyrics, discogs, replaygain, fetchart, chroma, embedart

@sampsyo
Copy link
Member

sampsyo commented Dec 4, 2016

OK, thanks for including that here! Having details on the public bug tracker is important so everyone can see and help out.

Does this still happen if you try it again with the latest release of beets?

@linkdaniel
Copy link

I can tell when the latest release makes it to the Mint repository. If it doesn't happen on your computer with the files I sent you, I guess it's ok now.

@sampsyo
Copy link
Member

sampsyo commented Dec 4, 2016

OK. You can also try installing with pip to get the latest version.

@linkdaniel
Copy link

That's a good idea, thanks! Installed it:

$ beet version
beets version 1.4.1
Python version 2.7.12
plugins: chroma, discogs, embedart, fetchart, lyrics, replaygain

Issued beet update and beet move. The album is still distributed over 16 or so folders, unfortunately.

@sampsyo
Copy link
Member

sampsyo commented Dec 5, 2016

OK, thanks for giving that a try!

To finish completing the report, could you perhaps include your configuration and the verbose output of running an import that results in the problem?

@linkdaniel
Copy link

Reimporting the files correctly placed them in just one folder. See below for the verbose output. Shouldn't beet move have done the same?

$ beet -v import Import/
user configuration: /home/daniel/.config/beets/config.yaml
data directory: /home/daniel/.config/beets
plugin paths: 
Sending event: pluginload
lyrics: Disabling google source: no API key configured.
library database: /home/daniel/.config/beets/musiclibrary.blb
library directory: /home/daniel/Musik/Collection
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/daniel/Musik/Import
Tagging Various Artists - Dusty Fingers, Volume 1
Searching for discovered album ID: a41d7ab7-2623-473c-8811-769f35193566
Candidate: Various Artists - Dusty Fingers, Volume 1
Success. Distance: 0.00
Album ID match recommendation is Recommendation.strong
ID match.

/home/daniel/Musik/Import (16 items)
Sending event: before_choose_candidate
Tagging:
    Various Artists - Dusty Fingers, Volume 1
URL:
    http://musicbrainz.org/release/a41d7ab7-2623-473c-8811-769f35193566
(Similarity: 100.0%) (12" Vinyl, 1997, US, Strictly Breaks Records)
Sending event: import_task_choice
Sending event: import_task_apply
0 of 16 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
lyrics: lyrics not found: Les Baxter - Dusty Fingers, Volume 1 - Hogin' Machine
lyrics: lyrics not found: Oliver Sain - Dusty Fingers, Volume 1 - On the Hill
lyrics: lyrics not found: The Overton Berry Trio - Dusty Fingers, Volume 1 - Hey Jude
lyrics: lyrics not found: Projection - Dusty Fingers, Volume 1 - Intro / Abstractions
lyrics: lyrics not found: Ferrante and Teicher - Dusty Fingers, Volume 1 - Lady Love
lyrics: lyrics not found: David Axelrod - Dusty Fingers, Volume 1 - The Warnings
lyrics: lyrics not found: Ryo Kawasaki - Dusty Fingers, Volume 1 - Bamboo Child
lyrics: lyrics not found: Amon Düül II - Dusty Fingers, Volume 1 - Kismet
lyrics: lyrics already present: Don Blackman - Dusty Fingers, Volume 1 - Holding You, Loving You
lyrics: lyrics already present: Small Faces - Dusty Fingers, Volume 1 - The Journey
lyrics: lyrics not found: Annette Peacock - Dusty Fingers, Volume 1 - Survival
lyrics: lyrics not found: Dorothy Ashby - Dusty Fingers, Volume 1 - The Windmills of Your Mind
lyrics: lyrics not found: Dee Dee Warwick - Dusty Fingers, Volume 1 - Dee Dee Drums
lyrics: lyrics not found: Billy Brooks - Dusty Fingers, Volume 1 - Forty Days
lyrics: lyrics already present: Donovan - Dusty Fingers, Volume 1 - Get Thy Bearings
lyrics: lyrics not found: Placebo - Dusty Fingers, Volume 1 - Humpty Dumpty
replaygain: analyzing Various Artists - Dusty Fingers, Volume 1
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: before_item_moved
Sending event: item_moved
Sending event: database_change
Sending event: database_change
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: import_task_files
Sending event: art_set
embedart: Embedding album art into Various Artists - Dusty Fingers, Volume 1
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: album_imported
Sending event: import
Sending event: cli_exit

@sampsyo
Copy link
Member

sampsyo commented Dec 18, 2016

No, reimporting gives the importer another chance to group items into albums. beet move does not.

So has the problem vanished, or is there something we can try to reproduce?

@linkdaniel
Copy link

I don't understand why I should have to reimport albums so that beets would organize them correctly. This should not be necessary. But if you say that's just how it is, I guess there's issue with the move command. Thanks!

@sampsyo
Copy link
Member

sampsyo commented Dec 22, 2016

Oh no, sorry! That's not what I meant to say at all. I just need a way to reproduce the original problem, or at least see the verbose output from a run that has the problem. Any chance you can recreate that?

We know something's wrong, but I can't see what quite yet.

@linkdaniel
Copy link

Ah, ok, now I get it. Sorry. :)
I have several more albums in my library that would need reimporting. Do you have an idea which commands gave you good information?

@sampsyo
Copy link
Member

sampsyo commented Dec 22, 2016

Sure—the most helpful thing would be to see the verbose log from an import that leads to this problem. That is, you've run both original imports, which led to a bunch of separate albums in your library, and re-imports, which fixed the problem. A -vv log from the former would be most useful.

@linkdaniel
Copy link

linkdaniel commented Dec 22, 2016

I'll try to do this when I'm back home in a few weeks and can access the original files again. I hope the files will import just fine, as this would mean an import issue has already been fixed in the current beets version.

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