Welcome Guest

Pages: 1
Function to check if Compilation field is checked?
DiskutantPostAugust 19, 2018, 06:19
Newbie
Posts: 5
Registered:
August 19, 2018, 10:09
Normal topicFunction to check if Compilation field is checked?

Hello,

I'm starting to learn Yate actions, now I'm trying to do an action that sets album artist to empty if the compilation field is set. But I can't find a function to check for the compilation fields.

Is it possible to do this somehow?

2MR2PostAugust 19, 2018, 07:27
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Function to check if Compilation field is checked?

The field is called Part of a Compilation 🙂

Assuming that an arbitrary number of tracks in different albums can be selected, this is a safe way to do it:

Force Grouped Execution
Test if the numeric value of the Part of a Compilation field != 0 (Set result)
if true
Clear the Album Artist field
endif

DiskutantPostAugust 19, 2018, 07:58
Newbie
Posts: 5
Registered:
August 19, 2018, 10:09
Normal topicRe: Function to check if Compilation field is checked?

Thanks, I found the "Compare Numeric Test" function now. Works as intended.
Before I was trying around with the "Test" and if/else functions, but couldn't figure out how to set any conditions there.

Another question now though. I downloaded the trash files action from the samples page. Now the files are moved to trash but they are still open in Yate. What function would be needed to close them?

2MR2PostAugust 19, 2018, 12:08
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Function to check if Compilation field is checked?

You can only close files at the same time as stopping an action:

Stop Action and Close Files

will stop the action closing all selected files.

Stop action closing all visible files first discarding changes

Will close all visible files (ie. including those not selected). This is actually a Stop Action and Open Files statement.

2MR2PostAugust 19, 2018, 12:17
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Function to check if Compilation field is checked?

If you selectively want to only close those files in the trash you can use a statement as follows:

Stop Action and Select Files Matching Filter "Trashed Items"

You would have to create and save a main window filter as follows:

Image

DiskutantPostAugust 19, 2018, 12:47
Newbie
Posts: 5
Registered:
August 19, 2018, 10:09
Normal topicRe: Function to check if Compilation field is checked?

Awesome, thank you very much!

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.02 seconds.