Welcome Guest

Pages: 1
Cannot get my head around processing albums or tracks
cromPostSeptember 25, 2016, 16:23
Newbie
Posts: 9
Registered:
September 1, 2016, 13:55
Normal topicCannot get my head around processing albums or tracks

Hi,
I have been slowly getting an action together but I feel I am just not grasping a few fundamentals. Assuming that pretty much all the scripts I write will need to deal with multiple albums (just being lazy!) is there an idiot guide or key that I can learn that will take care of processing a track or an album? I have looked through loads of sample code and other actions but I haven't got a handle about how to do it reliably on my own.

For instance, if, from a list of selected albums, I want to gather the disk count then I need to process this by album. But if I want to, say, move some tracks around then this would be done on a per track basis. I guess what I'm looking for is an answer to how I should structure actions and call sub-procedures.

Hope that's clear 🙂

2MR2PostSeptember 25, 2016, 17:43
Avatar photo
Administrator
Posts: 2086
Registered:
August 23, 2012, 19:27
Normal topicRe: Cannot get my head around processing albums or tracks

It is far easier to write an action which operates on a single album as there are lots of assumptions which can be made. Personally I always tag one album at a time....or I run the batch processor which walks my collection which is nicely organized as one album per folder 🙂

However, that being said I constantly have to write actions which might potentially have more than one album to work with. Typically I create a list which has albums as keys and the per key value is whatever I'm interested in.

Take a look at the 'Move Creating Disc Subfolders' action on the Resources page (you can easily get there from the Yate Help menu). In there I accumulate the list of albums. This thing does something similar to what you are asking about and as it's a sample action it is documented.

The basic problem is that actions are easier when all tracks are equal. Being in the same album certainly helps. If you have multiple albums, you have to manually accumulate and segregate the information so that you can effectively loop over whatever you're interested in, much as you would in any programming environment.

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