Welcome Guest

Pages: 1
rename files help?
kawayamaPostJuly 5, 2016, 12:22
Newbie
Posts: 7
Registered:
July 5, 2016, 16:10
Normal topicrename files help?

Hi!
I've just started using Yate, and it seems like the best tagger yet. But, as stated, the Actions learning curve is pretty steep.
I'd like to rename my files, and I have 8 different rename templates (based on the critera below). Undoubtedly there's a way to automate this, but I'm apparently not a programmer and I don't understand how to use if/else statements.
I don't want to move the files, and each album has its own folder.

note: Disc Count tag is often empty.
if the album's number of discs are 2 or higher
include the disc number (unpadded)
else if the total number of discs is 1, or if the Disc tag is empty
exclude the disc number

if the highest track number is 10 or higher
use Track Pad2
else
use Track
(should ideally be the same for all discs in the album)

if AlbumArtist is empty, or AlbumArtist ≠ Artist
use Artist - Title
else (if AlbumArtist = Artist)
use Title

and put it all together to "d-tt Artist - Title" (all elements included)
for example, a 2-disc album track:
1-1 little fluffy clouds.flac
but a 1-disc compilation track:
05 Speedy J - De-Orbit.flac

Is this possible, and how would you do it?

2MR2PostJuly 5, 2016, 13:53
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: rename files help?

np. I'll post something later tonight.

2MR2PostJuly 5, 2016, 16:00
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: rename files help?

I've uploaded an action to:

https://2manyrobots.com/actions/ContextSensitiveRename.zip

Unzip the file and import the plist file via Yate>Import Preferences. You will have an action named 'Context Sensitive Rename'. You can run it from the Actions>User Defined menu, from a toolbar Actions menu, from a toolbar dedicated icon or via a shortcut key. The action will work in all execution contexts....so you can run it interactively or you can use it in the Batch Processor. It will handle empty track and disc numbers. If you want the action to automatically select all open files, go to the Action Manager, select the action and check the 'All Files' option.

It seems to do what you've asked, but please test the different scenarios and let me know how it works for you.

Have fun 🙂

kawayamaPostJuly 6, 2016, 16:00
Newbie
Posts: 7
Registered:
July 5, 2016, 16:10
Normal topicRe: rename files help?

Thank you so much for your extremely quick reply!
It works well in the Batch Processor Wizard (it treats each folder as an album), but if I just select some files in the Main Window, it will treat all the selected files as belonging to the same album. Not a problem, as long as you know that.

Thanks again!

2MR2PostJuly 6, 2016, 17:48
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicRe: rename files help?

I assumed that you were always working on a single album. Assumptions are bad!!! Not enough sleep 🙂

I've found a bug in the action where certain named variables were not being reset. This could result in incorrect track or disc formatting when running through the Batch Processor. The information will always be correct but the padding may be incorrect. Sorry about that. If you notice any issues you can always run again with one of the two never versions:

Download:

https://2manyrobots.com/actions/ContextSensitiveRenameVariants.zip

There are two variants of the action now:

Context Sensitive Rename Single Album

and

Context Sensitive Rename Multiple Albums

The 'Single' variant is a patched version of the one I posted earlier. The 'Multiple" variant works on any number of loaded albums.

Test Multiple and see if you prefer it.

kawayamaPostJuly 7, 2016, 11:53
Newbie
Posts: 7
Registered:
July 5, 2016, 16:10
Normal topicRe: rename files help?

Works like a charm!

Please take the time to sleep properly. Overworking is bad. 🙂

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