Jump to content

Recommended Posts

Posted

Hi,

 

I often search for audio-files and the Dynamic File Search works great — but only if I know the name of what im looking for. I would love for it to be possible to delineate/specify the duration (min/max/approx?) of the audiofile. Is that possible?

Posted

I don't think this is possible with a File Filter, no.

 

The metadata is there in kMDItemDurationSeconds, and the underlying search engine supports it, but Alfred only supports text-style searches, and will only find matches for the exact duration (and the metadata includes microseconds). Perhaps @Andrew can clarify if this is correct?

 

You'd have to write a custom Script Filter to properly handle numeric fields like filesize/duration/bitrate.

 

As a starting point, this command will show every audio file in ~/Music with a duration over 5 minutes:

mdfind -onlyin ~/Music '(kMDItemContentTypeTree == public.audio) && (kMDItemDurationSeconds > 360)'

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...