HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: Mrakobes on 2021-04-22 11:46:58

Title: Help me set up the rename script
Post by: Mrakobes on 2021-04-22 11:46:58
using the metatogger, I rename the tags in the track files from the folder names. I do not know how to configure it in the case when you need to cut off the part from the beginning and the tail

script

%album artist%\%date% - %album%\%discnumber%\

How to replace

CD1 - Album
CD2 - Bonus

to a simple number without "CD" and ending with " - Album"
Title: Re: Help me set up the rename script
Post by: Mrakobes on 2021-04-22 12:11:17
ARTIST
--YEAR - ALBUM
------CD1

As an option, I would like to see your design-add the name of the third nesting folder to the name of the second folder and enclose it in parentheses

Name Album (CD2 - Bonus)
Title: Re: Help me set up the rename script
Post by: Porcus on 2021-04-22 13:07:45
Think over whether you have more than one version of a particular (double/triple) CD. For example, you might want to have

Led Zeppelin\1975 Physical Graffiti `1987 1st CD press´ ¶1
Led Zeppelin\1975 Physical Graffiti `1987 1st CD press´ ¶2
Led Zeppelin\1975 Physical Graffiti `1994 remaster´ ¶1 
Led Zeppelin\1975 Physical Graffiti `1994 remaster´ ¶2

sorted in that order. Here I use one folder per physical CD, because that keeps order of rip log files etc, and makes for easier retro-verification using CUETools. I delete the discnumber or total discs tag if it is a 1CD release. I also used different separator characters than "-", because that is used so often in actual metadata. You can also consider use ^¨~§£µ¬, it depends a bit on your keyboard layout. "~" is not far from safe either. Beware that ¤ is often identified with other currency symbols like $.

Also consider "9999" as a placeholder year for e.g.
Led Zeppelin\9999 various rare tracks bootleg
Title: Re: Help me set up the rename script
Post by: Mrakobes on 2021-04-22 15:31:44
I download a lot from the site bandcamp.com Often in the tags of the files, there is incorrect information about the year of publication, as an option, the year of the reissue is simply added, but this does not suit me. I edit folders by discography and then send to player and change tags

As for the naming of albums with explanations in the name - information about the album from the site musicbrainz.org is not loaded and lyrics are not loaded, if the name has no clean
Title: Re: Help me set up the rename script
Post by: Porcus on 2021-04-22 17:00:07
If you are sticking to fb2k to both tag and rename, you can use custom tags. I put the "1994 remaster" in an <ALBUMVERSION> tag, so that <ALBUM> remains Physical Graffiti. For a Bandcamp example, https://aidanbaker.bandcamp.com/album/bach-eingeschaltet-vierter-band : I correct the date to 2011 and enter "2015 bonus Bandcamp" in ALBUMVERSION.

(ALBUMVERSION because I have seen VERSION being already populated with a particular version of a track, like "remixed by ..." - not from that particular vendor though, it could have been just what some artist put there themselves. Oh, and I also strip "CD1" etc from all album titles.)

Title: Re: Help me set up the rename script
Post by: Mrakobes on 2021-04-22 17:50:59
Yes, I understand how to create additional fields. The initial question is how to get information from folder names to automate the process metatogger
Title: Re: Help me set up the rename script
Post by: Porcus on 2021-04-22 21:26:36
Sorry. I read the subject line as you wanted a renaming script and not a tagging script ... I was wrong?
Title: Re: Help me set up the rename script
Post by: deus-ex on 2021-04-22 22:00:27
How is metatogger related to foobar2000? It's a standalone app, not a plugin, right?
Title: Re: Help me set up the rename script
Post by: anamorphic on 2021-04-23 14:09:20
In foobar you could use Masstagger (https://www.foobar2000.org/components/view/foo_masstag) component with 'Guess values from filename' (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Masstagger_(foo_masstag)#Guess_values_from_filename) ...

(This does the same as the right-click tracks > Properties > Tools button > Automatically Fill Values (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Properties/Automatically_Fill_Values) - except Masstagger lets you save it as a preset to run quickly)

using the metatogger, I rename the tags in the track files from the folder names. I do not know how to configure it in the case when you need to cut off the part from the beginning and the tail

%album artist%\%date% - %album%\%discnumber%\

How to replace

CD1 - Album
CD2 - Bonus

to a simple number without "CD" and ending with " - Album"

If using Masstagger, select all album tracks > right-click > Tagging > Manage Scripts
Clear button (to remove previous)
Add > 'Guess values from filename'
-
Code: [Select]
%album artist%\%date% - %album%\CD%discnumber% - %discsubtitle%\%tracknumber% %title%

^ The DISCNUMBER field should only contain a number, therefore the above would move "Album" or "Bonus" text to DISCSUBTITLE field. (Note: You may need to fix the %tracknumber% %title% part to match your filenames, if they have a dot . or - for example, make the pattern match)

Check the preview to see the result before running the script. (You can also save it as a preset to run from context menu, and then make it a toolbar button / keyboard shortcut)

ARTIST
--YEAR - ALBUM
------CD1

As an option, I would like to see your design-add the name of the third nesting folder to the name of the second folder and enclose it in parentheses

Name Album (CD2 - Bonus)
What are you trying to rename here? If you mean tags, really the ALBUM tag should not contain that information - it should only have the album name.

Instead, just use title formatting in your playlist grouping to show that information using the various tags. For example make a playlist grouping like this -

Code: [Select]
%album artist% - %album%[ '('CD%discnumber%[ - %discsubtitle%]')']

Cheers
Title: Re: Help me set up the rename script
Post by: Rollin on 2021-04-23 15:31:40
Often in the tags of the files, there is incorrect information about the year of publication, as an option, the year of the reissue is simply added, but this does not suit me. I edit folders by discography and then send to player and change tags
Proper solution would be to edit tags first, then use File Operations to automatically create correctly named folders and move files there.
Title: Re: Help me set up the rename script
Post by: Mrakobes on 2021-04-24 16:39:04
Of course I meant Masstagger, confused, sorry. I will test it now