Page 1 of 1

Add index number on renamed file.

Posted: 30 Mar 2020, 09:53
by tfonias74
Hello,

I don't know if it addressed on older post (couldn't find it) but I want to know if there is a way to add an index number to the renamed file when there is a conflict with another file having the same name.. ex (1), (2),..
Especially in the Acoustid section.

Thanx in advance.

Thanos

Re: Add index number on renamed file.

Posted: 30 Mar 2020, 10:00
by rednoah
Try this. Not sure how well it'll work for AcoustID matches though.
rednoah wrote: 03 Jan 2020, 19:34 The {di} duplicate index and {dc} duplicate count should do the job:

Code: Select all

{if (dc > 1) ".part$di"}
Image

Re: Add index number on renamed file.

Posted: 30 Mar 2020, 10:06
by tfonias74
I tried it but it does not seem to work there..

Re: Add index number on renamed file.

Posted: 30 Mar 2020, 10:09
by rednoah
tfonias74 wrote: 30 Mar 2020, 10:06 I tried it but it does not seem to work there..
I suppose AcoustID will have many unique IDs for conceptually the same song, so it's a duplicate or not depending on your point of view.


:arrow: If you're using the GUI, you'll need extra information in the filename to make the filename unique, e.g. adding [{crc32}] will do the job.


:arrow: If you're using the CLI, then --conflict index then it'll add .1-9 to the filename to make it unique.


EDIT:

AudioTrack "uniqueness" is defined by [album, artist, title] so [di, dc] will work:

Code: Select all

{album} - {artist} - {t}{if (dc > 1) ".$di"}