Welcome Guest

Pages: 1
Filling Genre by Deriving Most Common Selection
PhukkinPostMarch 28, 2014, 01:27
Newbie
Posts: 17
Registered:
March 28, 2014, 05:21
Normal topicFilling Genre by Deriving Most Common Selection

Sorry if the title is vague, I don't know exactly how to word it. I would like to be able to run an action which looks at the all files of a particular artist, checks which genre is currently most used under this artist name, and fill all genre fields of this particular artist with the result (the most used).

Anybody able to help me with that? I'm sure it can be done, this program has been able to do anything I've asked of it so far, I'm just having trouble finding a function which would allow me to do this.

Thanks in advance.

2MR2PostMarch 28, 2014, 07:44
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Filling Genre by Deriving Most Common Selection

Hmm, I assume that this is a batch type of thing. I'll have to think about this as other than text fields there is no concept of arrays or dictionaries to retain the information. If you want to do it without any changes to Yate 🙂 i can see it but as a two stage process.

The first would walk your collection and accumulate the Genre information for a particular artist eventually choosing the best. The second run would walk the collection again, applying the changes.

If you're really only interested in doing this occasionally with a particular artist I can see it working. However doing it as a general thing for all artists will probably exhaust the current data structure capabilities available in actions today.

If you want help with the 'one-shot' type of action I can put something together for you. As I said the more general case will involve much more thought.

PhukkinPostMarch 29, 2014, 10:34
Newbie
Posts: 17
Registered:
March 28, 2014, 05:21
Normal topicRe: Filling Genre by Deriving Most Common Selection

Thanks for the reply, I'm not looking to retain the Genre preference for each artist for future use, I just want Yate to do a one time pass over my collection, look at every track listed under a particular artist, and replacing all Genre fields of that artist with the one currently most used.

For example if I have say 100 tracks by a certain artist, and 75 are listed as Rock, 10 are listed as Rock n Roll and 15 are unspecified, Rock would be selected as the dominant genre and all 100 genre fields would be changed to Rock.

I hope I'm being clear enough, my knowledge of databases etc is limited and I'm not sure if this is something that can be easily done or not.

Thanks again for your help 🙂

2MR2PostMarch 29, 2014, 14:47
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Filling Genre by Deriving Most Common Selection

I've been giving this some thought and I have a potential approach which would be a real pain. It would involve you running two batch scripts for any one artist. Yate basically works with files as units and given the current state of the action library this type of thing would be quite tedious.

However, as is quite often the case I tend to overthink some of these interesting requests. 🙂

Why not simply create a Track database in Yate. I personally maintain two databases for my personal collection. The first is an Album database of all the albums in my library. I carry this on my phone so that wherever I am I know what albums I own and what's recent, etc.. The second is a track database of every track I own.

Why not create a track database which contains the file path (mandatory), the title, artist, genre, track number and whatever other information that you desire. You can open the database in Yate, filter down to a particular artist and then easily see what genres are used. There is not currently any counting functionality except by filtering....but it should be pretty obvious what genre is prevalent. You can then select all the tracks with different genres and open them in the Yate main window from the context menu. Once open in the main window, you can select all the tracks and edit the genre field once for all of them. You can even apply the changes back to the database if you desire.

If this type of thing becomes more common, I can add functionality to the database code to do counting, etc.

To create a Track database you must first design the Export set to be used. You do this in Preferences>Export Sets. As I said the only mandator field is the file path but you can add any other columns that you'd like to see. (Obviously Artist and Genre are needed for what you want). You can drag and drop the items to change the order in the produced database.

Once you have your Export Set you have to write a simple one line action which is a 'Create Track Database'. Other than naming the database to be produced, I'd leave all the other options to their default values. (Other than auto open if you wish). If you'd like to see artwork in the database I suggest adding an 'Artwork to folder.jpg' function to the action. The database handler will display the images contained in the folder.jpg files.

To build your database start the batch processor from Actions>Batch Processor Wizard. Select the action you created and drag over the root folder of your collection. Once started the batch processor will run over your entire collection and create the database.

Once the database has been created you can open it at any time or simply drag it to the file area of the main window. When a database is open and has the focus you can see its help from Help>Help for Current Context.

Let me know if this works for you or if you need any assistance.

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