Ability to Perform Math on Smart Playlist/Filter Rules

Feature description:

In addition to the existing Smart Playlist/Filter rules that allow you to access data related to metadata and play data, it would be useful to be able to perform math using the numerical data.

Problem solved:

Say you want to create a smart playlist with your most played tracks, but want a more filtered result. With this feature, you could set rules that look like the following:
(Play count - Skip count) greater than (0)

Brought benefits:

This is technically already possible with Any/All option. You could require a playlist only include songs above a specific number of plays and under a specific number of skips. However, this feature would allow for greater customization as this kind of thing could be achieved in many different ways with different results with a math filter feature. For example, the previous scenario could be done differently:

((Skip count * 0.5) / Play count) less than (1). Allowing you to weight one option or the other to your preference.

Other application solutions:

 

 

Additional description and context:

 

 

Screenshots / Mockup:

    

Sorry but way too niche and complicated both from UX and code POV.

Couldn’t this just be implemented on top of the smart playlist/filter rule system? You could create rule entries for numerals and operators like +,-,*,/ etc. It may require an adjustment for passing the result of whatever math is performed through as a filter rule. I feel like this feature would greatly expand the usage of many.

This needs complicated interface for users to enter those and manage parenthesis and all the math stuff :slight_smile:

Then it needs an even more complicated handling to convert all that to actionable SQL.

For something that maybe 2 users will use.