Reimporting existing media

Hi, I am new here… First of all this is truly world’s best music organizer… I have spent all day yesterday with this utility and what it has done with my music collection is just brilliant.

Now my question. I usually sort my playlists by adding a comment like New or Fav . By doing this no matter what audio player I use, I can sort my playlists instantly. I wanted to copy both of my playlists to my android phone. So I did this -
beet move -cpt -d /home/akya/1Dump/sync/ comments:Fav (removed p later)
beet move -cpt -d /home/akya/1Dump/sync/ comments:New
After that I got all my mp3 files in a folder I mentioned and I moved all those to my phone. So these files still exist in my library folder but apparently move commands removed them from my database once I ran the command beet up. Now how to import these existing files back into my database?

My library is already sorted and has correct structure
/media/Media/Songs/English/ is library directory and has all artists/albums
/media/Media/Songs/English/Non-Album has all single tracks
/media/Media/Songs/English/Compilations/ has all comp.

reimporting this directory again created problems for me yesterday. I am a little stuck on what’s the correct method to proceed from here. Also if you have any other idea of syncing my playlist to an android phone or a folder, that would be awesome. Sorry for such a long post but I would love to hear how people sort their collections and see if I can get any tips.

Great! I’m glad you’re enjoying beets.

I can see how the beet move -cd command was confusing—it changed the path in your database too, which is probably not what you ever want. We should consider changing that default. In the future, until we make that change, it might be better to try the convert plugin instead.

As for cleaning up the mess: the best way to rectify things, unless you have a backup of your database file before the move command, would probably be to use beet import -AC to scan the files in your library directory without autoagging and without copying. Give that a try!

1 Like

import -AC worked and scanned those missing songs. beet up then updated the database. But the major screw up happened after that. I imported a new album and did a beet mv but after that command all 1500 songs from Non-Album directory got sorted in their own artist folder :scream: Now I have more than 1000 folders in my library directory. I think I have backup of my music collection somewhere, maybe I can get it all back. :disappointed:

Edit - Compilations directory retained its structure and contents. Non-Album should have done the same right?

Hmm, yes—beet mv should not have gathered your singleton items into your main path structure. Is there any chance your paths: configuration could be causing that? (That is, does the same problem happen if you take that part out of your config file?)

this is my paths config -

default: $albumartist/$album%aunique{}/$track $title
# default: $album%aunique{}/$track $title
singleton: Non-Album/$artist - $title
comp: Compilations/$album%aunique{}/$track $title

I tried commenting out that part and same thing happened

Weird! I don’t have a way to reproduce this (needless to say, it doesn’t happen from a blank-slate setup). Any chance you can get to the same problem starting from scratch? If so, a bug report on GitHub might be in order.

I will try to reproduce this with a sample directory with a few albums and singles etc. but before that can you check my config please to see if it’s all okay?

[code]directory: /media/Media/Songs/English
library: ~/data/musiclibrary.db
copy: no
write: yes
log: /home/akya/.config/beets/import.log

plugins: fetchart embedart lastgenre lyrics web missing beatport duplicates info play smartplaylist mpdupdate

command: mpv $args --playlist

cautious: true
cover_names: front back
minwidth: 300
sources: itunes *

playlist_dir: ~/.mpd/playlists
- name: fav.m3u
query: ‘comments:Fav’
- name: new.m3u
query: ‘comments:New’
- name: epic.m3u
query: ‘comments:Epic’
- name: lush.m3u
query: ‘comments:Lush’

default: $albumartist/$album%aunique{}/$track $title

default: $album%aunique{}/$track $title

singleton: Non-Album/$artist - $title
comp: Compilations/$album%aunique{}/$track $title[/code]

Sounds good! And this config looks fine from here, as far as I can see. Of course, you can always try debugging a configuration by removing options until the problem goes away.

I was able to reproduce it from scratch. Should I open an issue on github?
Edit - Done -

Thanks. Everything is sorted now and convert plugin works great for exporting my playlists!