Determining whether condition applies to multiple files

Tags: #<Tag:0x00007fd2a7957f00>

Hello, I’m trying to figure out whether it is possible to do the following with scripting:

  1. Determine whether a release consists of the same media type or not. For example, whether all of its discs are CDs, or if one is something else, such as a live DVD, bonus 7" or something. I would like to file them into a directory tagged, for example, “Album 2CD”, and if mixed “Album something else”.

  2. Whether all the files in a digital release are of the same bitrate and samplerate. I have releases where an album might contain a few bonus tracks at a better quality. I’d like to file albums with a consistent bitrate away like “album 16-44.1” with mixed releases filed away like “album mixed”. I wouldn’t want a single release to be sorted into multiple directories based on differing qualities.

Thanks!