Importing Singles as a Playlist

Hi,

I have a couple of dozen folders which contain songs that I like to play regularly or the kids etc - the songs dont relate but I do have a playlist file setup for these at the moment.

The files are currently saved outside of the beets music directory.

Can I import these as singles and have beets create a playlist on the fly so I can still play these songs as I do now but include them in the library?

Or is there better way to handle playlists that doesnt involve getting rid of them?

Thankyou

Hi! I think an easy way to do this would be to set a special field on some singletons you import. For example, you could use beet import -s --set playlist=my_playlist. Then, to get a list of all the songs with that tag, use beet ls playlist:my_playlist.

You can even set up a paths: rule in your config that will group all these files together in a single directory. Maybe something like this:

paths:
    'playlist:my_playlist': Playlists/My Playlist/$artist - $title

Thankyou,

With the second option this would import all playlists into one folder or would I need to have a path option for each playlist to ensure they ended up in their own named folder?

Well, you could put $playlist into your path format to get differently-labeled music to go into different directories! Then use --set playlist=foo and --set playlist=bar to choose different names. You’ll want to change the query predicate in the paths: section to something like playlist::. to match all tracks with a non-empty $playlist field.

Sorry - can I please grab some more assistance with this?

With

playlist::. Playlists/$playlist/$artist - $title in my config I get the following errors

    beets\config.yaml could not be read: while scanning a simple key
      in "C:\Users\user\AppData\Roaming\beets\config.yaml", line 13, column 5
    could not find expected ':'
      in "C:\Users\user\AppData\Roaming\beets\config.yaml", line 13, column 53

If I change that just to playlist: Playlists/$playlist/$artist - $title files import as if they were albums and I dont get an option to import as tracks (well it doesnt prompt).

code used for the import is
beet import -s --set playlist="soundscape" Soundscape

thankyou

Hi! Take a look again at the YAML syntax I suggested above:

paths:
    'playlist::.': Playlists/$playlist/$artist - $title

You may also want to read the YAML documentation to understand exactly what’s going on here. But the thing is that you need to put the left-hand of the key: value pair in quotes if it contains a colon.