Autonumbering "tracknumber" reset counter for each "album"

Hi friends

I have a specific requirement here.

My Indian music collection are CD rips. Majority of the cds have multiple movies (albums)
I have ripped and tagged them to match the track number on the CDs

For example if the CD has 14 songs and under 2 different movies/albums, I have tagged them as follows. The first two digits represent the %track%

Unfortunatley, when I exported the folder into roon, it combined these two albums as one. A workaround to fix this is to number the track of each album separately as follows.

I can see that there is an option to to do this using an auto numbering wizard, however I will have to select the tracks of each album manually as reset counter is only for folder but not album.

I'm wondering if someone can hel me with a script to do this
Thanks in advance

This is the only way to accomplish your goal.
Mp3tag can not guess what tracks belongs to an album (even if you and I can "see" it, :wink:
Mp3tag will always change track after track. Therefore the Auto-numbering wizard only works with manually selected tracks.)

If you have 2 albums in 1 folder - why not move the files into seperate folders first? The data for the album is there, so it should be possible to format value the _FILENAME and then use the track numbering assistant.

Hi @ohrenkino
Yes that is a solution, but I would like to keep the files in the same folder as it represents the CD.
I'm womdering if we can use loop() command to write a logic and create a text file and then convert text to tag.

Also if two cds have one movie in common it will get mixed up

I dont know how to use it but I see some articles to achive advanced things using loop() in google.

I expect that under the existing CD folder you have, you can still have additional sub folders for each Movie/Album you are trying to handle?

This is usually where the AlbumArtist field can help. You can distinguish between two or more identical Movie/Album names when they have different AlbumArtists.

As an alternative if the Artist is actually the same, you can also consider using the Albumsort field that is hidden from view normally. Again this field can help to distinguish Albums that have common names. However there are less players that support this field, so check with your favourite player’s documentation before you go and make these changes.

For some reason I just hate it :frowning:
I really wish if a rest tracknumber for each album would have been available with mp3tag.

It is up to you to find which way is better for you.
After you have moved and numbered the tracks - what hinders you to move them back into 1 folder?
MP3tag has the functions for that, so you can do it almost automatically.
And to make it clear: it is the player that causes the problems as apparently it requires files from 1 album to be found in 1 folder (which is strange as most players either go by the tag data or the filename but hardly ever by the folder structure).

Well, who knows what the future will bring.
Until you find that function you know now a way to achieve your goal.

I see.If that is the best solution could you please help me in how to achieve this?

Say I have a folder(ABCD) which represents the CD which has 3 Albums (XXX,YYY,ZZZ)
Can I split the tracks into separate folders XXX, YYY and ZZZ
Then I do the auto numbering to reset track after each folder
Once this is done move the tracks to origibal folder ABCD and delete XXX, YYY and ZZZ

If you want to do it completely automatically, then save the name of the original folder in a user-defined field like
%mypath% formatted with %_folderpath%.

To distribute the files to new folders, use Converter>Tag-Filename with
Format string: %album%\%_filename%

To get them all back again into the original folder, use Converter>Tag-Tag for _DIRECTORY with an absolute path like
Format string: d:\mymusic\Soundtracks\ABCD
enter here the original path of the album or re-use the contents of %mypath% if you have saved it.
This moves all selected files to the named folder and removes the extra folders that were created to renumber the files.

Thanks so much @ohrenkino for the detailed steps.
Could you please tall me how to save the name of the original folder in a user-defined field like
%mypath% formatted with %_folderpath%.

I tried , but looks like wrong method

Either, create an action of the type "Format value" for MYPATH (you have to type in that name)
Format string: %_folderpath%
Or use the Converter>Tag-Tag in the same way.

Still not getting it, Apologies :frowning:
Here are the steps I followed.

What should I select in the "Field" field?

You can't select a user defined field (Mp3tag doesn't know what custom field you like to fill).
You have to type in MYPATH manually as Field name entry.

in the combobox for FIeld.

There is no concept of an Album within mp3tag, each file is treated as an individual title. The grouping structure for folders or Albums can be what you want it to be.

This is really the root of the problem. It is quite uncommon for a single disc (or CD) to have more than one Album. So I can’t see that this will justify a change to the design of mp3tag’s track number wizard tool. Not for a single use case such as you have presented.

This is really just folder structure. It has nothing to do with the tagging content, or even how media players will typically handle the files. Unless you only browse by folder of course.

1 Like

I'm a native of India. Majority of Indian film music CDs(popularly known as Bollywood, evethough it represents only a minor sector of the vast regional languages film music) are released as combinations CDs. Each CD contains songs from two to three different movies. As opposed to English, majority are albums by artists.

Yeah, its strange :slight_smile:

Hi @ohrenkino amd @LyricsLover
Thank you so much for your patience in replying to my stupi queries. I have finally got the solution with least possible minimal effort :slight_smile:

I don't doubt that there are many discs that follow the scenario you are describing. Even in western regions, there are countless compilation releases with different Artists. But the track list still runs in order starting at 1 and increasing to the final total count of the tracks on that disc. If you were to play this CD in any standard player, the track numbers would not reset to start back at 1 simply because of an artist change.

It seems you have found the work around to suit your preference now, so that is most important for your library.

This is the pain I'm having with roon.
If you tag the multi album disc (each movie/album belonging to a different composer/album artist) as it is ( track list still runs in order starting at 1 and increasing to the final total count of the tracks on that dis) roon combines them as one album with some weird logic to display one among the albums as the roon album and Varios artists or composer/albumartists separated by "/".
Please see below