Fun with Filters

Tonight's build is all about extending the existing filtering mechanism to address a few of the longest-standing, most popular requests for SoulseekQt. Primarily that for bitrate filtering, but with a little extra, and built on a base that can be further extended to add new forms of filtering. You can skip all this and just head to the download page, as the filter box present on search result and browsed share pages now has a 'Filter Help' button next to it that will provide you with a more concise version of what I'm going to be saying here about the new filters.

There are three new filters that deal with audio attributes. As audio attributes are only currently extracted by the original client and SoulseekQt for MP3 files, using any of these will filter out any other file type. If and when support for extracting audio attributes from other file types is added to SoulseekQt, these attributes should work seamlessly with those file types as well. The three bitrate-specific attributes are isvbr, iscbr and minbitrate. Of those three, only minbitrate takes a parameter. For example, typing the following in the filter box:

iscbr minbitrate:256

Will only show files that are constant bitrate-encoded, of a bitrate of 256 or higher. minbitrate can be shorthanded to mbr. The isvbr attribute will make sure files shown are encoded as variable bitrate.

The other two new filter attributes are not audio specific. The first, minfilesize (shorthand: mfs) will filter out files smaller than the specified file size, using megabytes as a unit of measurement. The other, minfilesinfolder (shorthand: mfif) will only show folders with at least as many files that are not made invisible by the rest of the filter. For example:

mfs:10 mfif:8

Will only show folders with 8 or more files that are at least 10 megabytes in size, and then only show those files in said folders.

Any of these attributes can be used in conjunction with the existing ability to filter literal tokens in or out. As a final example:

lackluster container -bothersome mfif:8 iscbr minbitrate:320

Will only show files whose names or folder names contain both 'lackluster' and 'container' but not 'bothersome', that are in folders with at least 8 non-filtered files, constant bitrate encoded, minimum bitrate of 320.

This is all the result of a lot of pretty complicated work in a short space of time so, same as always but moreso, problems are not outside the realm of the possible.

Download links on the download page as soon I'm done updating it!

Cheers, Nir

Comments

is there any filter i could use for lossless files ? anything better than filtering out -iscbr and -isvbr ?

If you know which lossless file type you're looking for, you can always add ".extension" (without the quotes) to your filter. For example: .flac will only show FLAC files.

not to mention some format have both lossy and lossless encoding with the same file extension. (m4a, wma)

thanks, thats what i ve been doing. i was hoping for something more practical than duplicating the wishlist query for each main lossless format