Lack of song track numbers when renaming

Support for Windows users
Post Reply
Gimic010
Posts: 3
Joined: 01 Mar 2024, 13:23

Lack of song track numbers when renaming

Post by Gimic010 »

I've been renaming my files using the following script:

Format: Select all

{n} - {album+'/'}{pi.pad(2)}-{t.space('.').lower()}
When using it and having it pull from ID3 Tags it seems to no longer add the track number after my last couple of tries while in version 5.1.2 and 5.1.3

I have provided a link below with the screenshot of my FileBot sysinfo and a picture of what the track renaming looks like when I run the script from above.

https://drive.google.com/file/d/1sUg44q ... sp=sharing
https://drive.google.com/file/d/1K9UDwV ... drive_link
User avatar
rednoah
The Source
Posts: 23468
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Lack of song track numbers when renaming

Post by rednoah »

:?: The gdrive links are not public. Please make them public or share screenshots via your preferred image host.


:?: What is the MediaInfo table for a file where {pi} does not work? The {pi} will typically give you the Track/Position property, so it'll work / not work depending on the existence of that property.
:idea: Please read the FAQ and How to Request Help.
Gimic010
Posts: 3
Joined: 01 Mar 2024, 13:23

Re: Lack of song track numbers when renaming

Post by Gimic010 »

Apologies for that with the screenshots I had a feeling that might occur, I have added the MediaInfo with the others and made them public for viewing. Tried to upload and share them through imgur and it wouldn't show up properly on the board when using the proper img code.

https://drive.google.com/file/d/1ht4PG6 ... drive_link
https://drive.google.com/file/d/1K9UDwV ... drive_link
https://drive.google.com/file/d/1sUg44q ... drive_link

The MediaInfo has 'pi', but not 'pi.pad' but when changing my script to point at 'pi' it still didn't seem to work.
User avatar
rednoah
The Source
Posts: 23468
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Lack of song track numbers when renaming

Post by rednoah »

:idea: {pi} is the value, e.g. 1. {pi.pad(2)} pads {pi} with 2 leading zeros, e.g. 01.



:!: This screenshot shows sample data, not real data based on your real files:
Screenshot
:arrow: You'll want to use Double-Click ➔ Edit Format in New Names after generating matches to prototype your format with real match information:
Screenshot



:arrow: Do share the MediaInfo table for the file at hand (you may need click Icon to select a Media File first) via the Copy to Clipboard button as instructed in How do I share MediaInfo properties? please:
rednoah wrote: 11 Jul 2023, 11:19 Icon Open FileBot ➔ Icon Edit Format ➔ Icon Change Sample ➔ Icon Open MediaInfo ➔ Copy to Clipboard

Screenshot
:idea: Please read the FAQ and How to Request Help.
Gimic010
Posts: 3
Joined: 01 Mar 2024, 13:23

Re: Lack of song track numbers when renaming

Post by Gimic010 »

I have pasted the following Music Bindings from one of the files i'm working on

Media Binding - Media
Media Binding - Audio
User avatar
rednoah
The Source
Posts: 23468
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Lack of song track numbers when renaming

Post by rednoah »

:!: Your files are tagged badly. You may want to use tools like MusicBrainz Picard to fix the ID3 tags.


:idea: Part/Position refers to the "medium index", i.e. the CD number. Track/Position refers to the "track number". The latter is undefined in the ID3 tags at hand and so {pi} does not work for this file:

Properties: Select all

Title : All Of Your Weapons - Sultan + Shepard VIP Mix
Album : Echoes Of Life: Day
Album/Performer : Sultan + Shepard
Part/Position : 1
Part/Position_Total : 1

:arrow: You can access the Part/Position property in your format directly like so:

Format: Select all

{ media.'Part/Position' }
viewtopic.php?t=4285


:arrow: You will likely want to process both correctly tagged files and incorrectly tagged files (i.e. use Track/Position if possible; otherwise use Part/Position instead) which can be done like so:

Format: Select all

{ any{ media.'Track/Position' }{ media.'Part/Position' } }
or this if you want to keep both CD and track number where both are available:

Format: Select all

{ allOf{ media.'Part/Position' }{ media.'Track/Position' }.join('-') }
viewtopic.php?t=1895
:idea: Please read the FAQ and How to Request Help.
Post Reply