Music Renaming

All about user-defined episode / movie / file name format expressions
Annihilator1243
Posts: 16
Joined: 20 Jan 2019, 07:34

Re: Music Renaming

Post by Annihilator1243 »

i am using {d} which shows the entire date.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Music Renaming

Post 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}
:idea: Please read the FAQ and How to Request Help.
Annihilator1243
Posts: 16
Joined: 20 Jan 2019, 07:34

Re: Music Renaming

Post by Annihilator1243 »

do you know any programs that allow you to tag the full release date?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Music Renaming

Post 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.
:idea: Please read the FAQ and How to Request Help.
Nic
Posts: 3
Joined: 17 Jun 2023, 06:08

Re: Music Renaming

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Music Renaming

Post 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) }
:idea: Please read the FAQ and How to Request Help.
Post Reply