Undo FtInTitle without re-importing the entire library

39 views
Skip to first unread message

kccourier

unread,
Oct 31, 2016, 12:34:12 AM10/31/16
to beets
It looks like there is no easy way to undo the FtInTitle plugin for the files already in my library. It seems that update and move have no effect on files already imported using the plugin so the only option is to import the files again with the plugin disabled.

I either have to do a search for all folders containing "Feat." so I know which folders I have to run a beet import command on or I have to run a beet import -q for the entire library.

Neither option is desirable as the former involves way too much of my time manually searching for folders to import while the latter involves way too much unnecessary computer processing slowing down my system.

What I need is a batch file which will search my library and only run a beet import -q for any folder containing an mp3 or flac file with "Feat." in the filename.  I'm just not sure how exactly to get a batch file to do that.

Adrian Sampson

unread,
Oct 31, 2016, 3:44:32 PM10/31/16
to beets...@googlegroups.com
You might consider using a beets query to find those. For example, you could use:

$ beet ls -p title:feat

to get the paths to audio files and then pipe it through `dirname` to get the enclosing directory:

$ beet ls -p title:mix | while read -r line; do dirname $line; done

and, finally, pipe that into `beet import`:

$ beet ls -p title:mix | while read -r line; do dirname $line; done | xargs -d "\n" beet import

There’s more on using `xargs` with `beet import` in this thread:
https://github.com/beetbox/beets/issues/422

Good luck!

Adrian
> --
> You received this message because you are subscribed to the Google Groups "beets" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beets-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

kccourier

unread,
Oct 31, 2016, 7:54:11 PM10/31/16
to beets...@googlegroups.com
Thanks for the quick response although I don't understand it.  I can run the first command to get the file listing no problem but but am not sure what I'm supposed to do after that.  Trying to run the next command just give me an error message.

> To unsubscribe from this group and stop receiving emails from it, send an email to beets-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "beets" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beets-users/fmoilyuCXb4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beets-users+unsubscribe@googlegroups.com.

kccourier

unread,
Oct 31, 2016, 9:22:34 PM10/31/16
to beets...@googlegroups.com
Maybe it is because I'm running my beets installation on a windows pc and xargs does not run in windows powershell.

Adrian Sampson

unread,
Oct 31, 2016, 9:32:57 PM10/31/16
to beets
Hmm… those were just a few standard Unix shell constructs. If you need help debugging your shell commands, Stack Overflow and SuperUser generally have pretty good advice.

To unsubscribe from this group and stop receiving emails from it, send an email to beets-users...@googlegroups.com.

Adrian Sampson

unread,
Oct 31, 2016, 9:36:14 PM10/31/16
to beets...@googlegroups.com
Ah! Yes, those are Unix shell commands. You might try Cygwin or the new “Bash on Ubuntu on Windows” or looking for PowerShell-based alternatives to that pipeline.

To unsubscribe from this group and stop receiving emails from it, send an email to beets-users...@googlegroups.com.

kccourier

unread,
Oct 31, 2016, 9:37:26 PM10/31/16
to beets...@googlegroups.com
I'll figure it out eventually.  I think I will try installing Win-bash and running it from there
Reply all
Reply to author
Forward
0 new messages