Page 2 of 2

Re: Music Renaming

Posted: 21 Jan 2019, 05:42
by Annihilator1243
i am using {d} which shows the entire date.

Re: Music Renaming

Posted: 21 Jan 2019, 07:21
by rednoah
If you're using {d} then you can get the year / month / day fields like so:

Code: Select all

{d.year}-{d.month}

Re: Music Renaming

Posted: 23 Jan 2019, 02:32
by Annihilator1243
do you know any programs that allow you to tag the full release date?

Re: Music Renaming

Posted: 23 Jan 2019, 03:24
by rednoah
In general, I can recommend MusicBrainz Picard, but I'm not sure if ID3v2 tags allow for what you're asking for specifically.

Re: Music Renaming

Posted: 17 Jun 2023, 06:29
by Nic
Hi, so I have similar issues and goals.

The goal is, if the track is part of the multi-disc album, then split the album by disc number and assign the disc number in front of the track number, except if it's a single disc album, in which case it should just not include any disc references.

For example:

Multi Disc

Code: Select all

Disc 1 - 101
Disc 2 - 201
Single Disc

Code: Select all

01

this is the code I am using:

Format: Select all

F:\AA/[{y}]{album+'/'}{n}\ - {album}{media.'part/position_total' == null ? null : '/CD ' + media.'part/position'}\{pi.pad(2)} - {t}
These are the bindings:

Properties: Select all

# MediaInfoLib - v22.12

[General]
Count                        : 343
StreamCount                  : 1
StreamKind                   : General
StreamKind/String            : General
StreamKindID                 : 0
AudioCount                   : 1
Audio_Format_List            : FLAC
Audio_Format_WithHint_List   : FLAC
Audio_Codec_List             : FLAC
CompleteName                 : F:\ACDC\FLAC\Are You Ready - The Very Best Of AC DC\Are You Ready - The Very Best Of AC DC [Disc 1]\08 - Baptism by Fire.flac
FolderName                   : F:\ACDC\FLAC\Are You Ready - The Very Best Of AC DC\Are You Ready - The Very Best Of AC DC [Disc 1]
FileNameExtension            : 08 - Baptism by Fire.flac
FileName                     : 08 - Baptism by Fire
Title                        : Baptism by Fire
Album                        : Are You Ready? The Very Best Of
Album/Performer              : AC/DC / AC/DC
Part                         : 1
Part/Position_Total          : 2
Track                        : Baptism by Fire
Track/Position               : 8
Track/Position_Total         : 17
Performer                    : AC/DC
Label                        : Sony Japan
Genre                        : Hard Rock
Recorded_Date                : 2016
ORIGINALDATE                 : 2016
Ideally I would like to include the album release year in Brackets after the Album Name

Code: Select all

Are You Ready - The Very Best Of AC DC (2016)
For example.

Please help1

This is my current output:

Code: Select all

F:/AA/[2016]Are You Ready? The Very Best Of/AC DC AC DC/- Are You Ready? The Very Best Of/CD null/08 - Baptism by Fire
Thanks so much

Re: Music Renaming

Posted: 18 Jun 2023, 10:59
by rednoah
:!: Note that your code says this:

Groovy: Select all

media.'part/position'
But your media file says this:

Properties: Select all

Part                         : 1
Part/Position_Total          : 2

e.g. use media.Part to generate Disk 1/2 naming:

Format: Select all

{ if (media.Part) "Disc $media.Part - $media.Part" }{ pi.pad(2) }

Code: Select all

Disc 1 - 114

e.g. check for both media.PartPosition and media.Part, in this order, since some files may only specify one or the other:

Format: Select all

{
	def di = any{ media.PartPosition }{ media.Part }
	if (di) "Disc $di - $di"
}
{
	pi.pad(2)
}

:idea: This specific behaviour is already available via the {music.medium} binding:

Format: Select all

{ if (music.medium) "Disc $music.medium - $music.medium" }{ pi.pad(2) }



EDIT:

FileBot r9812 adds {medium} as a top-level binding so this will work with future releases:

Format: Select all

{ "Disc $medium - $medium" }{ pi.pad(2) }