Jump to content

File filter, mp3s, folders, and tags


Recommended Posts

Posted (edited)

I'm trying to create a simple workflow to find mp3 files and folders (sometimes I want to load a whole album folder), and then pass them to an audio player (in this case, Vox). My keyword is 'play' and my workflow is "File Filter" -> "Open File".

 

My test mp3 file has the path ~/music/The Necks/Open/01 Open.mp3

 

I can get the file in Alfred with "play open" or "play necks". However, "play necks open" or "play open necks" both do not work. I guess this is because "necks" only matches the folder type, while "open" only matches the filename, and combined they matche neither.

 

"open" is not a very specific search, and it actually brings up a lot of music files with "open" in the title. I'd like to be able to specify the artist/album/track title or whatever to narrow searches. Can I perhaps bring in mp3 tags to the search somehow? Ideally I'd like to incorporate track title, artist, and album. Thanks!

Edited by drgibbon
Posted

I'm trying to create a simple workflow to find mp3 files and folders (sometimes I want to load a whole album folder), and then pass them to an audio player (in this case, Vox). My keyword is 'play' and my workflow is "File Filter" -> "Open File".

 

My test mp3 file has the path ~/music/The Necks/Open/01 Open.mp3

 

I can get the file in Alfred with "play open" or "play necks". However, "play necks open" or "play open necks" both do not work. I guess this is because "necks" only matches the folder type, while "open" only matches the filename, and combined they matche neither.

 

"open" is not a very specific search, and it actually brings up a lot of music files with "open" in the title. I'd like to be able to specify the artist/album/track title or whatever to narrow searches. Can I perhaps bring in mp3 tags to the search somehow? Ideally I'd like to incorporate track title, artist, and album. Thanks!

 

The Mini Player built in to Alfred already does a lot of this (if the music is imported into your library in iTunes).

 

If you still insist of using a workflow, then yes you are correct about how alfred matches the files and folders. It would look at each folder/file as a separate item and wouldn't match a multiword query. You could create a script filter to search for you and show the results in Alfred.

Posted

The Mini Player built in to Alfred already does a lot of this (if the music is imported into your library in iTunes).

 

If you still insist of using a workflow, then yes you are correct about how alfred matches the files and folders. It would look at each folder/file as a separate item and wouldn't match a multiword query. You could create a script filter to search for you and show the results in Alfred.

 

Unfortunately I'm using this to search through a number of folders in different locations around the drive, not just my iTunes collection. Can the file filter read mp3 tags somehow? If not, how would I go about making a script to search?

Posted

Unfortunately I'm using this to search through a number of folders in different locations around the drive, not just my iTunes collection. Can the file filter read mp3 tags somehow? If not, how would I go about making a script to search?

 

Well.. it really depends on what you wanna be able to do. If the files have metadata associated with them correctly, then yes, a filter would work to easily let you search. If they don't, that could be a bit of a pain to get to work efficiently.

 

You could go to your files and run mdls on them and see if they have the kMDItemAlbum and kMDItemTitle set appropriately. For instance, I tested on the song Vicarious by Tool on the album 10,000 Days. If I do "mdls 01-tool-vicarious-ud.mp3" it shows me the metadata on that file. In there, it has the album name and track name and could get artist from the file name if it had to. So I would adjust my filter under the advanced tab to look through the kMDItemTitle and kMDItemAlbum fields as well. That would find the files

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...