Welcome Guest

Pages: 1
Action to tag files using folder names
flkinPostDecember 17, 2014, 03:44
Newbie
Posts: 6
Registered:
December 17, 2014, 07:51
Normal topicAction to tag files using folder names

I am using Yate to tag FLAC and DSF music files with artwork and other tagging info so that my music player can display and search properly. Currently not planning to link this database with iTunes.

I organise music in Folders by: Genre/Artist/Album/Track.dsf

Each genre has multiple artists, each artist has multiple albums and each album has multiple tracks. Track names are sometimes numbered with 01 xx, 02 xx, etc. And other times they are numbered 01 - xx, 02 - xx, etc. I prefer to keep the track number in the track name, just use the track number in the tag.

Do you have an action that would automatically create tags for the music files from the folder names?

Perhaps even get the artwork inserted into each file too? Then it would truly be an automated process for my tagging work.

Posted this request in the Sample Actions thread - probably better here.

Thanks! Kin

Purchased your program this morning already.. 🙂

2MR2PostDecember 17, 2014, 06:38
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: Action to tag files using folder names

Hi, I posted an action called 'Split Off Path Components'. You can download it here:
http://2manyrobots.com/actions/SplitOffPathComponents.zip

Unzip the file and drag the plist to Yate's main file area.

The action will extract genre,artist,album and title from the path. If for any reason your path is not long enough, nothing will be extracted. The action is written to ignore fields that already have metadata. If for any reason you always want to overwrite existing metadata, edit the Copy statements and uncheck 'only if they are empty'.

I wrote this after reading your first post so I didn't remove the track numbers from the title field. I'll try and get you a different action later today which does that part.

Do you already have the artwork in files? I'm not big on doing auto artwork extraction without viewing and okaying the results. We have an auto search for artwork which tends to get good results. I can include that into the action with a prompt asking you to okay the results. Alternately we have a workflow to get iTunes to find the artwork for unsupported files such as flac and dsf and I could set you up to go that way. The advantage of the second route is that you can easily batch the process and go over the files at your leisure determining if you like what they found.

flkinPostDecember 17, 2014, 09:16
Newbie
Posts: 6
Registered:
December 17, 2014, 07:51
Normal topicRe: Action to tag files using folder names

Hi, thanks for the quick action!

I would like to keep the track numbers in the title field but also get the track number into the tag too, if that is possible.

Your automatic cover action seems to be pretty good already but if you could do something with iTunes to find the artwork automatically that would be probably even better. Then I can check through to see if the covers are fine later like you suggest. One thing I find with your existing cover finder, it only allows consistent album names. This means it cannot be performed on more than a single album at a time. Any chance we can adjust this for multiple albums? I basically want to try to add many at a time.

Thanks.

2MR2PostDecember 17, 2014, 17:27
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: Action to tag files using folder names

http://2manyrobots.com/actions/SplitOffPathComponents2.zip

I'm taking you literally. In addition to extracting genre, artist, album and title as the previous action did, this variant 'Split Off Path Components 2' will see if the title starts with:

digit digit space
or
digit digit -

If it does, the track number will be extracted and saved as long as the track number is currently empty. (Title not modified).

As far as using iTunes to create the artwork it is quite simple. There is a help topic called: 'Using iTunes to Look for Missing Artwork' on the main help page. Basically it involves writing two one line actions: One containing a Create Stubs statement, the other a Process Stubs statement. Both these actions are run through the batch processor (Remember to enable auto-save when running the Process Stubs action). In between the two batch runs you use iTunes to look for the artwork. One user wrote up his experience here:

http://www.head-fi.org/t/713798/a-guide-for-adding-album-art-in-flac-files-on-os-x-with-yate

Let me know if you need any help.

flkinPostDecember 18, 2014, 04:35
Newbie
Posts: 6
Registered:
December 17, 2014, 07:51
Normal topicRe: Action to tag files using folder names

As per instructions, created
1. Create Stub Action
2. Process Stubs Action
Ran Batch Processor Wizard
It asks for a folder - don't know why. I don't want to do a folder, I want to do a group of folders.
Gave it a sample folder to test. Batch completed with message no files logged. The folder contained 3 sub folders with WAV files with no jpgs inside any folder.
Batch process stopped. Never got to asking about process stubs action.
iTunes doesn't seem to have any new stubs files or music files. In any case I can't find the in the search.

What went wrong? Phew this is difficult! 🙂

2MR2PostDecember 18, 2014, 08:03
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: Action to tag files using folder names

LOL it's difficult because I can't programmatically tell iTunes to fetch the artwork.

When the batch processor asks for a folder it's asking for a 'root' folder. The folder you supply and all sub folders will be processed.

Yate Step 1: The 'first' action should only contain a 'Create Stub' statement. Make sure you check off the file types you're interested in. If I remember correctly, the default is flac, dsf and wav. The create stub functionality will only process tracks which have an Album field and which do not currently have any artwork. Run the Batch Processor. Select the 'Create Stub' action. Select your 'root' folder (you can try it with one folder). On the next panel 'auto save' does not matter. Enable 'verbose logging'. Let it run. The log file should contain enrties describing that stubs were created. If it does not, either no files of the matching types were found; stubs already existed; the album tag was empty or the tracks already have artwork.

iTunes step: Make sure the Grouping column is displayed in the list My Music view. If you sort the column you should see items with a STUB grouping. Select all these files and from the iTunes context menu do a 'Get Album Artwork'.

Yate Step 2: Run the Batch Processor Wizard again. Select the 'Process Stubs' action. This action should contain a single 'Process Stubs' statement with everything checked. Select the same 'root' folder. Make sure that auto save is checked and you might as well leave verbose log checked. Run the action. If iTunes found any artwork it should have been imported.

If I haven't missed any steps, this should do it. This is the only functionality in Yate that had to span two separate process runs 🙁

flkinPostDecember 19, 2014, 02:30
Newbie
Posts: 6
Registered:
December 17, 2014, 07:51
Normal topicRe: Action to tag files using folder names

Thanks, I got it now and seems to be working.

I think I'm getting to being able to handle batches of files in multiple folders.

Appreciate your efforts and patience! 😀

2MR2PostDecember 19, 2014, 06:30
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: Action to tag files using folder names

🙂

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