Problem with merging tracks into albums when importing

When importing with autotagging I noticed:

Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,                                                                                      
Enter search, enter Id, aBort, plaY? A                                                                                                                 
This album is already in the library!                                                                                                                  
Old: 11 items, MP3, 320kbps, 35:35, 95.6 MiB                                                                                                           
Old: 19 items, MP3, 320kbps, 61:10, 144.4 MiB                                                                                                          
New: 1 items, MP3, 258kbps, 2:44, 5.2 MiB                                                                                                              
[S]kip new, Keep all, Remove old, Merge all? M

So it looks like it didn’t properly merge stuff. I’m not looking forward to manually check every single music folder.

I often chose “merge” to complete albums with missing tracks.

So how do I check or is there a way to check my existing music for doubles and have beets fix it?

Running beets inside docker with the music and downloads folder mapped into the container. The command I use to import:

docker exec -u abc -it beets /bin/bash -c ‘beet import /mnt/downloads/completed/music/*’

I can share my config if needed?

Hello! Could you elaborate a little bit on what went wrong here? What happens after you choose “M”—as in, what’s in your database for the relevant album if you do beet ls and beet ls -a with an appropriate query?

Hi and thanks for trying to help. Let me see what info I can add to my initial post.

I had a cron job (with the -q for quiet option beet import -q) going off every 4h to auto-import music from a specific folder. I changed that cron job to once every 24h as I thought it might have crashed with my manual imports.
Every now and then I’d execute the above command without the -q and fix whatever could not automatically be imported.

During my manual imports, I saw the above issue with multiple old files existing. I remember checking the music library folder and indeed finding songs like song-name.1.mp3 song-name.2.mp3 etc
. So there definitely were leftovers from beets imports.

Also while manually running these imports a few times I had beets crash and give me some python errors which looked like parts of code from scripts. Unfortunately I haven’t noted them down. :frowning:

I’ve chosen “-M” a few times, it seems to work but then later either beets crashed or whatnot, sometimes I found that the imported music files had not been moved to the library folder as they should have.

I can’t remember which artist/album had the multiple old files issue, so I started poking around and found this mess.

image

  • there are multiple folders for the Back to Black and Frank album
  • some of them have cryptic numbers at the end
  • the last 3 folders only contain albumart.jpg
  • the 4th folder from the bottom contains exactly 1 song

I also found that another artist somehow has 2 albums with the same name, except for a capital A instead of an a. I have no idea how this happened since all music in my music library has been processed and put there by beets. Any ideas?

image

I’ll share my beets config.yaml here: config.yaml - Pastebin.com

oh, here’s another folder from my library with clear problems: Bossa nova.

ls -al /Music/Ana\ Caram/                                                                                              
total 501                                                                                                                                            
drwxrwx---   10 1000 1000   10 Oct  9 13:39  .                                                                                                       
drwxrwx--- 1043 1000 1000 1043 Oct  6 01:47  ..                                                                                                      
drwxrwx---    2 1000 1000   15 Oct  8 05:09  Amazonia                                                                                                
drwxrwx---    2 1000 1000    3 Oct  9 13:39 'Bossa nova'                                                                                             
drwxrwx---    2 1000 1000   15 Oct  9 13:39 'Bossa nova [2802]'                                                                                      
drwxrwx---    2 1000 1000   15 Oct  4 22:06 'Hollywood Rio'                                                                                          
drwxrwx---    2 1000 1000   17 Jun 18 23:51 'Postcards from Rio_ The Ana Caram Collection'                                                           
drwxrwx---    2 1000 1000   18 Oct  8 05:15 'Rio After Dark'                                                                                         
drwxrwx---    2 1000 1000   12 Jun 18 23:52 'Sunflower Time'                                                                                         
drwxrwx---    2 1000 1000   14 Oct  8 05:18 'The Other Side of Jobim'                                                                                
ls -al /Music/Ana\ Caram/Bossa\ nova                                                                                   
total 3103                                                                                                                                           
drwxrwx---  2 1000 1000       3 Oct  9 13:39  .                                                                                                      
drwxrwx--- 10 1000 1000      10 Oct  9 13:39  ..                                                                                                     
-rwxrwx---  1 1000 1000 3079547 Jun 18 23:49 '03 - Rio.mp3'                                                                                          
ls -al /Music/Ana\ Caram/Bossa\ nova\ \[2802\]/                                                                        
total 46907                                                                                                                                          
drwxrwx---  2 1000 1000      15 Oct  9 13:39  .                                                                                                      
drwxrwx--- 10 1000 1000      10 Oct  9 13:39  ..                                                                                                     
-rw-rw----  1 1000 1000 3579517 Oct  9 13:41 '01 - Chega de saudade (No More Blues).mp3'                                                             
-rw-rw----  1 1000 1000 3280524 Oct  9 13:41 '02 - Samba de verao (Summer Samba).mp3'                                                                
-rw-rw----  1 1000 1000 4711354 Oct  9 13:41 '03 - Rio.mp3'                                                                                          
-rw-rw----  1 1000 1000 5496813 Oct  9 13:41 '04 - Garota de Ipanema (Girl from Ipanema).mp3'                                                        
-rw-rw----  1 1000 1000 4083587 Oct  9 13:41 '05 - Agua de beber (Water to Drink).mp3'                                                               
-rw-rw----  1 1000 1000 3322140 Oct  9 13:41 '06 - Chovendo na roseira (Double Rainbow).mp3'                                                         
-rw-rw----  1 1000 1000 4897096 Oct  9 13:41 '07 - O amor em paz (Once I Loved).mp3'                                                                 
-rw-rw----  1 1000 1000 3253648 Oct  9 13:41 '08 - O pato (The Duck).mp3'                                                                            
-rw-rw----  1 1000 1000 3805341 Oct  9 13:41 '09 - Voce vai ver (You'\''ll See).mp3'                                                                 
-rw-rw----  1 1000 1000 2648260 Oct  9 13:41 '10 - Brigas, nunca mais (No More Quarrels).mp3'                                                        
-rw-rw----  1 1000 1000 4099699 Oct  9 13:41 '11 - Olha pro ceu (Look to the Sky).mp3'                                                               
-rw-rw----  1 1000 1000 4290193 Oct  9 13:41 '12 - Samba do aviao (Song of the Jet).mp3'                                                             
-rwxrwx---  1 1000 1000   37936 Jun 18 23:49  albumart.jpg

I am now doing a:
docker exec -u abc -it beets /bin/bash -c 'beet import /mnt/downloads/completed/music/Ana*'

lets see what happens. I will report below. So far, beets sees a new album and I chose “Apply”

> docker exec -u abc -it beets /bin/bash -c 'beet import  /mnt/downloads/completed/music/Ana*'                                 
>                                                                                                                                                      
> /mnt/downloads/completed/music/Ana Caram/Bossa Nova (11 items)                                                                                       
> Correcting tags from:                                                                                                                                
>     Ana Caram - Bossa Nova                                                                                                                           
> To:                                                                                                                                                  
>     Ana Caram - Bossa nova                                                                                                                           
> URL:                                                                                                                                                 
>     https://musicbrainz.org/release/94b76471-d52e-490c-ba1f-e89549ec1f0b                                                                             
> (Similarity: 92.6%) (tracks, missing tracks) (CD, 1995, US, Chesky Records, JD129)                                                                   
>  * Chega de Saudade              -> Chega de saudade (No More Blues) (title)                                                                         
>  * Summer Samba (Samba de VerĂŁo) -> Samba de verĂŁo (Summer Samba) (title)                                                                            
>  * Garota de Ipanema             -> Garota de Ipanema (Girl from Ipanema) (title)                                                                    
>  * Agua de Beber                 -> Agua de beber (Water to Drink) (title)                                                                           
>  * Chovendo Na Roseira           -> Chovendo na roseira (Double Rainbow) (title)                                                                     
>  * O Amor Em Paz                 -> O amor em paz (Once I Loved) (title)                                                                             
>  * O Pato                        -> O pato (The Duck) (title)                                                                                        
>  * VocĂȘ Vai Ver                  -> VocĂȘ vai ver (You'll See) (title)                                                                                
>  * Brigas, Nunca Mais            -> Brigas, nunca mais (No More Quarrels) (title)                                                                    
>  * Olha Pro Céu                  -> Olha pro céu (Look to the Sky) (title)                                                                           
>  * Samba Do AviĂŁo                -> Samba do aviĂŁo (Song of the Jet) (title)                                                                         
> Missing tracks (1/12 - 8.3%):                                                                                                                        
>  ! Rio (# 3) (3:15)                                                                                                                                  
> [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,                                                                                  
> Enter search, enter Id, aBort, plaY? A                                 
> This album is already in the library!                                                                                                                
> Old: 1 items, MP3, 128kbps, 3:09, 2.9 MiB                                                                                                            
> Old: 12 items, MP3, 133kbps, 47:13, 45.3 MiB                                                                                                         
> New: 11 items, MP3, 192kbps, 45:04, 62.3 MiB
> [S]kip new, Keep all, Remove old, Merge all? M
> 
> /mnt/downloads/completed/music/Ana Caram/Bossa Nova                                                                                                  
> /music/Ana Caram/Bossa nova/03 - Rio.mp3                                                                                                             
> /music/Ana Caram/Bossa nova [2802]/01 - Chega de saudade (No More Blues).mp3                                                                         
> /music/Ana Caram/Bossa nova [2802]/02 - Samba de verao (Summer Samba).mp3                                                                            
> /music/Ana Caram/Bossa nova [2802]/03 - Rio.mp3                                                                                                      
> /music/Ana Caram/Bossa nova [2802]/04 - Garota de Ipanema (Girl from Ipanema).mp3                                                                    
> /music/Ana Caram/Bossa nova [2802]/05 - Agua de beber (Water to Drink).mp3                                                                           
> /music/Ana Caram/Bossa nova [2802]/06 - Chovendo na roseira (Double Rainbow).mp3                                                                     
> /music/Ana Caram/Bossa nova [2802]/07 - O amor em paz (Once I Loved).mp3                                                                             
> /music/Ana Caram/Bossa nova [2802]/08 - O pato (The Duck).mp3                                                                                        
> /music/Ana Caram/Bossa nova [2802]/09 - Voce vai ver (You'll See).mp3                                                                                
> /music/Ana Caram/Bossa nova [2802]/10 - Brigas, nunca mais (No More Quarrels).mp3                                                                    
> /music/Ana Caram/Bossa nova [2802]/11 - Olha pro ceu (Look to the Sky).mp3                                                                           
> /music/Ana Caram/Bossa nova [2802]/12 - Samba do aviao (Song of the Jet).mp3 (24 items)                                                              
> Tagging:                                                                                                                                             
>     Ana Caram - Bossa nova                                                                                                                           
> URL:                                                                                                                                                 
>     https://musicbrainz.org/release/94b76471-d52e-490c-ba1f-e89549ec1f0b                                                                             
> (Similarity: 84.6%) (unmatched tracks, tracks) (CD, 1995, US, Chesky Records, JD129)                                                                 
>  * O amor em paz (Once I Loved) (5:02) -> O amor em paz (Once I Loved) (5:13) (length)                                                               
> Unmatched tracks (12):                                                                                                                               
>  ! Chega de Saudade              (# 1) (3:48)                                                                                                        
>  ! Summer Samba (Samba de VerĂŁo) (# 2) (3:25)                                                                                                        
>  ! Garota de Ipanema             (# 4) (5:45)                                                                                                        
>  ! Agua de Beber                 (# 5) (4:16)                                                                                                        
>  ! Chovendo Na Roseira           (# 6) (3:28)                                                                                                        
>  ! O Amor Em Paz                 (# 7) (5:13)                                                                                                        
>  ! O Pato                        (# 8) (3:23)                                                                                                        
>  ! VocĂȘ Vai Ver                  (# 9) (4:00)                                                                                                        
>  ! Brigas, Nunca Mais            (#10) (2:47)                                                                                                        
>  ! Olha Pro CĂ©u                  (#11) (4:20)                                                                                                        
>  ! Samba Do AviĂŁo                (#12) (4:35)                                                                                                        
>  ! Rio                           (# 3) (3:15)                                                                                                        
> [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,                                                                                  
> Enter search, enter Id, aBort, plaY? M

And the result of that:

ls -al /sixer/Music/Ana\ Caram/                                                                                              
total 469                                                                                                                                            
drwxrwx---   10 1000 1000   10 Oct 10 10:18  .                                                                                                       
drwxrwx--- 1043 1000 1000 1043 Oct  6 01:47  ..                                                                                                      
drwxrwx---    2 1000 1000   15 Oct  8 05:09  Amazonia                                                                                                
drwxrwx---    2 1000 1000    3 Oct 10 10:19 'Bossa nova [2802]'                                                                                      
drwxrwx---    2 1000 1000   15 Oct 10 10:19 'Bossa nova [2803]'

That’s interesting! Given the background, it’s kind of hard to see exactly what happened in the past that led to this
 we’re only seeing the “after the fact” evidence and making inferences.

Is there any way you could try to reproduce this pattern by manually invoking a similar import a few times?

Sure can do.

docker exec -u abc -it beets /bin/bash -c 'beet import  /mnt/downloads/completed/music/Ana*' 

/mnt/downloads/completed/music/Ana Caram/Bossa Nova (11 items)                                                                                       
Correcting tags from:                                                                                                                                
    Ana Caram - Bossa Nova                                                                                                                           
To:                                                                                                                                                  
    Ana Caram - Bossa nova                                                                                                                           
URL:                                                                                                                                                 
    https://musicbrainz.org/release/94b76471-d52e-490c-ba1f-e89549ec1f0b                                                                             
(Similarity: 92.4%) (tracks, missing tracks) (CD, 1995, US, Chesky Records, JD129)                                                                   
 * Chega de Saudade              -> Chega de saudade (No More Blues) (title)                                                                         
 * Summer Samba (Samba de VerĂŁo) -> Samba de verĂŁo (Summer Samba) (title)                                                                            
 * Garota de Ipanema             -> Garota de Ipanema (Girl from Ipanema) (title)                                                                    
 * Agua de Beber                 -> Agua de beber (Water to Drink) (title)                                                                           
 * Chovendo Na Roseira           -> Chovendo na roseira (Double Rainbow) (title)                                                                     
 * O Amor Em Paz                 -> O amor em paz (Once I Loved) (title)                                                                             
 * O Pato                        -> O pato (The Duck) (title)                                                                                        
 * VocĂȘ Vai Ver                  -> VocĂȘ vai ver (You'll See) (title)                                                                                
 * Brigas, Nunca Mais            -> Brigas, nunca mais (No More Quarrels) (title)                                                                    
 * Olha Pro Céu                  -> Olha pro céu (Look to the Sky) (title)                                                                           
 * Samba Do AviĂŁo                -> Samba do aviĂŁo (Song of the Jet) (title)                                                                         
Missing tracks (1/12 - 8.3%):                                                                                                                        
 ! Rio (# 3) (3:15)                                                                                                                                  
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,                                                                                  
Enter search, enter Id, aBort, plaY? A   
This album is already in the library!                                                                                                                
Old: 1 items, MP3, 192kbps, 3:15, 4.5 MiB                                                                                                            
Old: 12 items, MP3, 128kbps, 47:07, 43.7 MiB                                                                                                         
New: 11 items, MP3, 192kbps, 45:04, 62.3 MiB                                                                                                         
[S]kip new, Keep all, Remove old, Merge all? M
                                                                                                                                                     
/mnt/downloads/completed/music/Ana Caram/Bossa Nova                                                                                                  
/music/Ana Caram/Bossa nova [2802]/03 - Rio.mp3                                                                                                      
/music/Ana Caram/Bossa nova [2803]/01 - Chega de saudade (No More Blues).mp3                                                                         
/music/Ana Caram/Bossa nova [2803]/02 - Samba de verao (Summer Samba).mp3                                                                            
/music/Ana Caram/Bossa nova [2803]/03 - Rio.mp3                                                                                                      
/music/Ana Caram/Bossa nova [2803]/04 - Garota de Ipanema (Girl from Ipanema).mp3                                                                    
/music/Ana Caram/Bossa nova [2803]/05 - Agua de beber (Water to Drink).mp3                                                                           
/music/Ana Caram/Bossa nova [2803]/06 - Chovendo na roseira (Double Rainbow).mp3                                                                     
/music/Ana Caram/Bossa nova [2803]/07 - O amor em paz (Once I Loved).mp3                                                                             
/music/Ana Caram/Bossa nova [2803]/08 - O pato (The Duck).mp3                                                                                        
/music/Ana Caram/Bossa nova [2803]/09 - Voce vai ver (You'll See).mp3                                                                                
/music/Ana Caram/Bossa nova [2803]/10 - Brigas, nunca mais (No More Quarrels).mp3                                                                    
/music/Ana Caram/Bossa nova [2803]/11 - Olha pro ceu (Look to the Sky).mp3                                                                           
/music/Ana Caram/Bossa nova [2803]/12 - Samba do aviao (Song of the Jet).mp3 (24 items)                                                              
Tagging:                                                                                                                                             
    Ana Caram - Bossa nova                                                                                                                           
URL:                                                                                                                                                 
    https://musicbrainz.org/release/94b76471-d52e-490c-ba1f-e89549ec1f0b                                                                             
(Similarity: 84.6%) (unmatched tracks, tracks) (CD, 1995, US, Chesky Records, JD129)                                                                 
 * O amor em paz (Once I Loved) (5:02) -> O amor em paz (Once I Loved) (5:13) (length)                                                               
Unmatched tracks (12):                                                                                                                               
 ! Chega de Saudade              (# 1) (3:48)                                                                                                        
 ! Summer Samba (Samba de VerĂŁo) (# 2) (3:25)                                                                                                        
 ! Garota de Ipanema             (# 4) (5:45)                                                                                                        
 ! Agua de Beber                 (# 5) (4:16)                                                                                                        
 ! Chovendo Na Roseira           (# 6) (3:28)                                                                                                        
 ! O Amor Em Paz                 (# 7) (5:13)                                                                                                        
 ! O Pato                        (# 8) (3:23)                                                                                                        
 ! VocĂȘ Vai Ver                  (# 9) (4:00)                                                                                                        
 ! Brigas, Nunca Mais            (#10) (2:47)                                                                                                        
 ! Olha Pro CĂ©u                  (#11) (4:20)                                                                                                        
 ! Samba Do AviĂŁo                (#12) (4:35)                                                                                                        
 ! Rio                           (# 3) (3:09)                                                                                                        
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,                                                                                  
Enter search, enter Id, aBort, plaY? A   
acousticbrainz: Acousticbrainz did not provide infoabout highlevel                                                                                   
acousticbrainz: Acousticbrainz did not provide infoabout lowlevel                                                                                    
acousticbrainz: Acousticbrainz did not provide infoabout rhythm                                                                                      
acousticbrainz: Acousticbrainz did not provide infoabout tonal                                                                                       
acousticbrainz: Acousticbrainz did not provide infoabout lowlevel                                                                                    
acousticbrainz: Acousticbrainz did not provide infoabout rhythm                                                                                      
acousticbrainz: Acousticbrainz did not provide infoabout tonal                                                                                       
acousticbrainz: Acousticbrainz did not provide infoabout highlevel                                                                                   
acousticbrainz: Acousticbrainz did not provide infoabout lowlevel                                                                                    
acousticbrainz: Acousticbrainz did not provide infoabout rhythm                                                                                      
acousticbrainz: Acousticbrainz did not provide infoabout tonal                                                                                       
acousticbrainz: Acousticbrainz did not provide infoabout highlevel                                                                                   
acousticbrainz: Acousticbrainz did not provide infoabout highlevel
...

and the result is:

ls -al /sixer/Music/Ana\ Caram/
total 469
drwxrwx— 10 1000 1000 10 Oct 12 10:11 .
drwxrwx— 1043 1000 1000 1043 Oct 6 01:47 

drwxrwx— 2 1000 1000 15 Oct 8 05:09 Amazonia
drwxrwx— 2 1000 1000 3 Oct 12 10:11 ‘Bossa nova [2803]’
drwxrwx— 2 1000 1000 15 Oct 12 10:11 ‘Bossa nova [2804]’
drwxrwx— 2 1000 1000 15 Oct 4 22:06 ‘Hollywood Rio’
drwxrwx— 2 1000 1000 17 Jun 18 23:51 ‘Postcards from Rio_ The Ana Caram Collection’
drwxrwx— 2 1000 1000 18 Oct 8 05:15 ‘Rio After Dark’
drwxrwx— 2 1000 1000 12 Jun 18 23:52 ‘Sunflower Time’
drwxrwx— 2 1000 1000 14 Oct 8 05:18 ‘The Other Side of Jobim’

as we can see, the folders with the numbers went one up from 2802 and 2803 to 2803 and 2804 while the original files to be imported are still in the downloads folder.

ls -al /sixer/tmp/downloads/completed/music/Ana\ Caram/Bossa\ Nova/                                                          
total 64279                                                                                                                                          
drwxrwxr-x 2 1000 1000      13 Oct  9 13:39  .                                                                                                       
drwxrwxr-x 3 1000 1000       3 Oct  8 05:19  ..                                                                                                      
-rw-rw-r-- 1 1000 1000 5511040 Oct  7 19:01 '01 Chega de Saudade.mp3'                                                                                
-rw-rw-r-- 1 1000 1000 4968320 Oct  7 19:01 '02 Summer Samba (Samba de VerĂŁo).mp3'                                                                   
-rw-rw-r-- 1 1000 1000 8331136 Oct  7 19:01 '04 Garota de Ipanema.mp3'                                                                               
-rw-rw-r-- 1 1000 1000 6188928 Oct  7 19:01 '05 Agua de Beber.mp3'                                                                                   
-rw-rw-r-- 1 1000 1000 5027712 Oct  7 19:01 '06 Chovendo Na Roseira.mp3'                                                                             
-rw-rw-r-- 1 1000 1000 7577472 Oct  7 19:01 '07 O Amor Em Paz.mp3'                                                                                   
-rw-rw-r-- 1 1000 1000 4913024 Oct  7 19:01 '08 O Pato.mp3'                                                                                          
-rw-rw-r-- 1 1000 1000 5797760 Oct  7 19:01 '09 VocĂȘ Vai Ver.mp3'                                                                                    
-rw-rw-r-- 1 1000 1000 4038528 Oct  7 19:01 '10 Brigas, Nunca Mais.mp3'                                                                              
-rw-rw-r-- 1 1000 1000 6287232 Oct  7 19:01 '11 Olha Pro CĂ©u.mp3'                                                                                    
-rw-rw-r-- 1 1000 1000 6639488 Oct  7 19:01 '12 Samba Do AviĂŁo.mp3'

Apart from the import problem, would “beet update” fix the existing library problems or will it not touch and move files/albums? I tried the “-p” option and it ran forever and spit out loads of changes it would presumably do but msot were just dealing with bpm info and some such unrelated stuff.

docker exec -u abc -it beets /bin/bash -c 'beet update -p'

Anyone got any hints for me please?

Here’s another duplicate folder created by beets. Is there really nobody out there who can help me debug/fix this issue?

My only alternative is to stop using beets :-/ open for alternative suggestions.

ls -al Music/George\ Ezra/                                                                                                                                                                                                                                               
total 435                                                                                                                                                                                                                                                                                                            
drwxrwx---    6 1000 1000    6 Feb  8 12:28  .                                                                                                                                                                                                                                                                       
drwxrwx--- 1049 1000 1000 1049 Jan 26 13:44  ..                                                                                                                                                                                                                                                                      
drwxrwx---    2 1000 1000   15 Jan 29 05:07 'Gold Rush Kid'                                                                                                                                                                                                                                                          
drwxrwx---    2 1000 1000   15 Feb  8 12:28 'Gold Rush Kid [2852]'                                                                                                                                                                                                                                                   

I have to admit that I’m still having trouble understanding what the background is here. It looks like, earlier, you had imported two different albums with the same name? If so, that’s the expected behavior: beets tries to keep them in two different directories.

If you meant for this to be one album, you’ll probably want to put them all together in one directory and import them again as a unit.

I honestly don’t know what more I could add. It’s simple: I import an album, beets says it exists already and shows me the old size and the new size so knowing the new one is “bigger” its higher quality and I chose “merge”.

The result looks like this:

ls -al Music/George\ Ezra/                                                                                                                                                                                                                                               
total 435                                                                                                                                                                                                                                                                                                            
drwxrwx---    6 1000 1000    6 Feb  8 12:28  .                                                                                                                                                                                                                                                                       
drwxrwx--- 1049 1000 1000 1049 Jan 26 13:44  ..                                                                                                                                                                                                                                                                      
drwxrwx---    2 1000 1000   15 Jan 29 05:07 'Gold Rush Kid'                                                                                                                                                                                                                                                          
drwxrwx---    2 1000 1000   15 Feb  8 12:28 'Gold Rush Kid [2852]'
ls -al Music/Ana\ Caram/
total 469
drwxrwx— 10 1000 1000 10 Oct 12 10:11 .
drwxrwx— 1043 1000 1000 1043 Oct 6 01:47 

drwxrwx— 2 1000 1000 3 Oct 12 10:11 ‘Bossa nova [2803]’
drwxrwx— 2 1000 1000 15 Oct 12 10:11 ‘Bossa nova [2804]’
ls -al Music/Santana/                                                                                                 
total 580                                                                                                                                            
drwxrwx---    8 1000 1000    8 Mar 22 10:39  .                                                                                                       
drwxrwx--- 1052 1000 1000 1052 Mar 22 09:29  ..                                                                                                      
drwxrwx---    2 1000 1000   16 Jul  4  2022  Supernatural                                                                                            
drwxrwx---    2 1000 1000   16 Mar 22 10:19 'Supernatural [2881]'                                                                                    
drwxrwx---    2 1000 1000    4 Jul  4  2022 'The Essential Santana'                                                                                  
drwxrwx---    2 1000 1000   31 Mar 22 10:43 'The Essential Santana [2882]'

Is this supposed to work this way? Its driving me insane, I’m currently looking for some bash script to list all folder with names containing numbers so I can manually clean up :frowning:

As far as I can tell (although beet ls -a output before and after the import could confirm it), it looks like you are ending up with two albums with the same name. That is indeed not what is supposed to happen when you choose “merge” at the prompt; you are supposed to end up with one unified album with all the tracks from the old and new albums.

If that’s what you’re hoping for, you may want to try confirming the situation with beet ls -a. If beets is indeed creating separate album entries despite an attempt to merge, that is probably a bug. As I mentioned above, a good workaround could be to remove the old album first and then import the two together as a unit.

That is indeed not what is supposed to happen when you choose “merge” at the prompt; you are supposed to end up with one unified album with all the tracks from the old and new albums.

That is what I was expecting. I checked and there are duplicate albums. Will try and manually move them to my import folder and check after importing, maybe even try importing one after another, as that is how this problem started.

docker exec -u abc -it beets /bin/bash -c 'beet ls -a | grep Ezra'                                                         
George Ezra - Gold Rush Kid                                                                                                                          
George Ezra - Gold Rush Kid                                                                                                                          
George Ezra - Staying at Tamara’s                                                                                                                    
docker exec -u abc -it beets /bin/bash -c 'beet ls -a | grep Caram'                                                        
Ana Caram - Bossa nova                                                                                                                               
Ana Caram - Bossa nova
docker exec -u abc -it beets /bin/bash -c 'beet ls -a | grep Santana'                                                      
Santana - Supernatural                                                                                                                               
Santana - Supernatural                                                                                                                               
Santana - The Essential Santana                                                                                                                      
Santana - The Essential Santana
docker exec -u abc -it beets /bin/bash -c 'beet ls -a | grep Winehouse'                                                    
Amy Winehouse - Back to Black                                                                                                                        
Amy Winehouse - Back to Black                                                                                                                        
Amy Winehouse - Back to Black                                                                                                                        
Amy Winehouse - Stronger Than Me                                                                                                                     
Amy Winehouse - Stronger Than Me

I had similar problems importing albums and specifically using an import to fill in the gaps for an existing album. Merge - the name is descriptive and sounds exactly like the behavior that I would have liked. Sounds like you were of the same impression. I don’t know if it is a misunderstanding on my part or a bug in the program, but Merge was not what happened. I did some controlled tests and turns out that Replace actually behaved as I needed. Not sure if it would meet your needs or not, but what I found was if I selected replace, it would indeed replace the existing tracks that were matches and it would insert the new tracks that were missing (exactly what I thought merge would do). You may want to give that a shot. Now, cleaning up what you have already gotten is a whole different exercise.

1 Like

Thanks @wcage for chiming in. I was sure I couldn’t be the only one out there who was hit with this problem.

As for cleaning up,

locate all folders with 4 numbers within “[“ “]” in their names

find . -type d | grep -P "\[[0-9]{4}\]" | more

I also searched for 3 numbers as beets seemed to have also produced that combination and then manually cleaned them up.

As for the rest if your text, that is exactly what I was trying to do as well: using an import to fill in the gaps for an existing album

From your description it sounds like “replace” is indeed what I am looking for. Will test the next time I have the chance.

I don’t see a “Replace” option though. Would you mind pointing me how/where you found that?

I am sorry, it is the other R - “Remove old” that I was referring to, not replace.

If you are curious, I wrote a plugin that I call PlugFiles that uses existing files in your library to fill in missing files from albums. For example if you have an album that is missing a track, but you have another album (say a greatest hits version) it will allow you to duplicate the track into the album to make it complete.

If you are looking for complete albums it is helpful. If you are trying to reduce duplication, it is not. Anyway, I completed the plugin about a month ago, but haven’t gotten traction on getting it submitted for consideration. If you have any interest, I will pick up the pursuit again.

I see, thanks. That should work if I make sure the new versions are always of a higher quality.

Thanks for the offer with the plugin, but having a song in 2 different albums is rarely the case in my collection so it wouldn’t help me.