Welcome Guest

Pages: 1
Exporting a copy of files of a playlist with new metadata, whilst preserving the metadata of the original files
CosmasPostMay 20, 2024, 19:19
Newbie
Posts: 10
Registered:
May 20, 2024, 23:02
Normal topicExporting a copy of files of a playlist with new metadata, whilst preserving the metadata of the original files

I'm trying to write a custom script for Yate, but I'm definitely no programmer, so I'm hoping someone can offer a bit of help.

Background: Each month I like to make a playlist of tracks that I've accumulated from various albums, etc. and save them out as a new compilation album.

In my custom action, I am changing a number of tag values (track numbers, album name, comments, etc etc). That part I have figured out fine.
But then I want to copy all the tracks from my list with the new metadata to one new folder, but to leave all the original files in their original locations with their original data.

I see how I can use the 'Copy Files To' command to finish up my process, but unfortunately they do not have the NEW state of the metadata, but the original state. I need to temporarily assign or save(?) the new state so I can copy the files with the new metadata to my new location, but somehow preserve the original state of the metadata for the source files.

Make sense? I suspect this is doable, but I'm not immediately figuring out how to do it. Forgive me I'm only on my first real day with Yate.

Thanks ahead of time for any help on this!

2MR2PostMay 20, 2024, 21:00
Avatar photo
Administrator
Posts: 2149
Registered:
August 23, 2012, 19:27
Normal topicExporting a copy of files of a playlist with new metadata, whilst preserving the metadata of the original files

I can think of a many ways to do it ... but here's the easiest.

Make whatever changes to the source files in the action. Then do the following:

1: Copy Files to \<new folder>/{filename}
2: Get Property Retained Path 1 -> Variable 0
3: Transfer all fields out to the file referenced in Variable 0
4: Revert

Statement 1 is whatever Copy Files function you want to do. The copy sets the Retained Path 1 property to the new (ie. copied location). Statement 2 is a Get Property statement which copies this property to track variable 0. Statement 3 is a Transfer Metadata statement which exports the current metadata to the file at the path in variable 0. Statement 4 reverts the source files back to their initial state.

I've uploaded the snippet to:

https://2manyrobots.com/actions/Copy-Modifed-Metadata-Preserving-Source-Files.zip

Hopefully this helps.

CosmasPostMay 20, 2024, 22:34
Newbie
Posts: 10
Registered:
May 20, 2024, 23:02
Normal topicExporting a copy of files of a playlist with new metadata, whilst preserving the metadata of the original files

This is stunning. I knew you'd know immediately how to do it. Thanks so much. It worked so quickly I thought maybe something had gone wrong. This is going to really expedite my monthly mixes. Very cool.

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