Help - Search - Members - Calendar
Full Version: Determine number of tracks and add them as tag
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Franklin
Hi there,

my flac files do have the following tags:

artist
album
year
tracknumber
title
discnumber, if more than one disc

I would like to add a tag "totaltracks", which contains the number of tracks of an album. But I do not want to add this tag manually to all my files but adding this tag automatically to my files.

So I would like to know, whether there is a way to determine the number of tracks with foobar's scripting language?

Thanks in advance

Best regards
Franklin
Olive
I did it last year with foo_freedb. Add your albums to a playlist, highlight, do "freedb>Get tags (multiple albums)" then uncheck all fields to write but tracknumber in the "nn/NN" format. From there use the masstagger to copy NN to a new tag and if needed remove /NN from %tracknumber%. Note that v0.9 automatically displays nn/NN as nn and appends %total tracks% tags for NN.
JoyO
Maybe not fully automatic, but will work:
select album, properties..., [...] button on right, auto track number. This will only modify tracnumber to format nn/NN so you will have to modify this with masstagger probably.
Franklin
QUOTE(JoyO @ Apr 9 2006, 12:16 AM) *

Maybe not fully automatic, but will work:
select album, properties..., [...] button on right, auto track number. This will only modify tracnumber to format nn/NN so you will have to modify this with masstagger probably.

Hello,

I just did it as you described, and it seems that foobar 0.9 splits the info correctly by default. tracknumber contains the tracknumber as before and there's a new field totaltracks which contains the number for tracks.

thanks a lot.

Best regrads
Franklin
JoyO
Actually, totaltracks displayed by foobar isnt the tag, its the second part (NN) of tracnumber nn/NN temporary mapped/displayed as separate tag (it isnt written in file as totaltracks tag)
Birk
You can do this:
1. Go to masstagger (Tagging/edit tags)
2. Format value "TOTALTRACKS" using "%list_total%"
3. Save as a script

4. Select an album and use the script
vasya_pupkin
QUOTE(JoyO @ Apr 9 2006, 11:59 AM) *
Actually, totaltracks displayed by foobar isnt the tag, its the second part (NN) of tracnumber nn/NN temporary mapped/displayed as separate tag (it isnt written in file as totaltracks tag)

You are wrong. TOTALTRACKS is written as a separate tag. Just for example:

CODE
E:\music\MPC albums (downloaded)\Aerosmith\1993 - Get a Grip>tag "14 - Boogie Man.mpc"
Tag - Automatic Tag from filename      Copyright (c) 2002-2003 Case
Version 2.0.39b, Compiled 2003-04-11

E:\music\MPC albums (downloaded)\Aerosmith\1993 - Get a Grip\14 - Boogie Man.mpc
Format:  Musepack SV7.0 profile above 'BrainDead' (--Alpha-- 1.15)
Details: 44100 Hz Stereo, 332 kbps, playtime 02:17
Tag:     APE v2.0
Title:   Boogie Man
Artist:  Aerosmith
Album:   Get a Grip
Year:    1993
Track:   14
Genre:   Rock & Roll
Comment:
TOTALTRACKS=14


Edit: Oops, pressed wrong 'Reply' last time.. smile.gif
foosion
It is written as nn/NN to ID3v2 tags as required by the ID3v2.4 specification.
vasya_pupkin
QUOTE(foosion @ Apr 9 2006, 01:03 PM) *

It is written as nn/NN to ID3v2 tags as required by the ID3v2.4 specification.

Oh, maybe. I have no albums in MP3 tagged with ID3v2. smile.gif
Franklin
QUOTE(Birk @ Apr 9 2006, 01:14 AM) *

You can do this:
1. Go to masstagger (Tagging/edit tags)
2. Format value "TOTALTRACKS" using "%list_total%"
3. Save as a script

4. Select an album and use the script

That's even simplier, thank you smile.gif

Best regards
Franklin
JoyO
If you want it even simplier, choose "auto track number" in masstagger, and save it as script. smile.gif
Erich w/ an h
QUOTE(JoyO @ Apr 9 2006, 11:45 AM) *

If you want it even simplier, choose "auto track number" in masstagger, and save it as script. smile.gif


I think you missunderstood what he wants smile.gif He wants a tag that indicates the total number of tracks in an album, such as:

Artist: Pink Floyd
Album: Animals
Title: Pigs On The Wing (Part 1)
Tracknumber: 01
Totaltracks: 05

Artist: Pink Floyd
Album: Animals
Title: Dogs
Tracknumber: 02
Totaltracks: 05

... etc
Lozer
QUOTE(Erich w/ an h @ Apr 9 2006, 10:31 AM) *

QUOTE(JoyO @ Apr 9 2006, 11:45 AM) *

If you want it even simplier, choose "auto track number" in masstagger, and save it as script. smile.gif


I think you missunderstood what he wants smile.gif He wants a tag that indicates the total number of tracks in an album...


Auto track number in masstagger does in fact do that, so JoyO didn't misunderstand. smile.gif
Erich w/ an h
QUOTE(Lozer @ Apr 9 2006, 01:45 PM) *
Auto track number in masstagger does in fact do that, so JoyO didn't misunderstand. smile.gif


You dont say? It didnt used to, am I correct? I do apologize, then, for my misunderstanding, foot in mouth!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.