Help - Search - Members - Calendar
Full Version: Count total number of albums
Mp3tag Forums > Mp3tag - International > Development > Export
blake
Is there a simple way to use MP3tag to count the total number of albums in my tagged music collection? I have several hundred albums, all in one big directory. I need to count the total number of albums seen by MP3tag so I can compare that total with the total seen by my network music player via the music server in my NAS drive.
foo_peter
please try this I hope it helps

CODE
$filename(mp3.txt)$loop(%album%,1)$if($eql($strstr(%_extension%,mp3),0)
,,%_counter% - %album%)
$loopend()
blake
That worked perfectly. Thank you very much.
DJ Mucke
ZITAT(foo_peter @ Sep 10 2011, 13:35) *
$filename(mp3.txt)$loop(%album%,1)$if($eql($strstr(%_extension%,mp3),0)
,,%_counter% - %album%)
$loopend()


$filename(mp3.csv)$loop(%album%,1)$if($eql($strstr(%_extension%,mp3),0)
,,%_counter%|%album%)
$loopend()
Wie muss der Code aussehen für *.csv???
- Nummerierung;Album in getrennten Spalten???
verwenden von "|" oder "$char(9)"
bitte um hilfestellung

DetlevD
QUOTE (blake @ Sep 7 2011, 03:51) *
Is there a simple way to use MP3tag to count the total number of albums in my tagged music collection? ...

Use an export script.

$filename($getEnv('USERPROFILE')'\Desktop\AlbumCount.txt')
'Album list'
'----------'
$loop(%ALBUM%,1)%_counter%' - '%ALBUM%$char(13)$char(10)$loopend()
'All = '%_max_counter%
'----------'
$loop(%ALBUM%,1)$loopend()'Albums = '%_max_counter%
'----------'


DD.20131210.1435.CET, DD.20140914.1643.CEST


This export script relies on each track number 1 to exist, and counts albums with the same name individually.

1: $filename($getEnv('USERPROFILE')'\Desktop\AlbumCount.txt')
2: 'Album list'
3: '----------'
4: $loop($num($regexp(%TRACK%,'^A',),1))$if($eql(1,$num($regexp(%TRACK%,'^A',),1)),
5: $loop(%ALBUM%)%_counter%' - '%ALBUM%$char(13)$char(10)$loopend()
6: 'All = '%_max_counter%
7: ,)$loopend()
8: '----------'


DD.20140914.1730.CEST


Here is a solution, which measures only the amount of albums having a track 1.
Load all related files into Mp3tag listview and apply the following Filter expression, then check the Mp3tag status line information how many files, i. e. how many albums, have been found.

ALBUM PRESENT AND "$num(%TRACK%,1)" IS 1

This filter string detects also tracks of format "A1" ...
ALBUM PRESENT AND "$num($regexp(%TRACK%,'^A',),1)" IS 1

DD.20131223.1752.CET, DD.20140914.1730.CEST
parafux
i think the counting does not work if there are albums available from different artists but with the same name.

can anyone confirm?

i have several home-made albums called "various" and those only exist once per list, not once per artist.

i tried adding the artist also between the counter and the album name.
only the album is ouput with the alphabetically first artist

another question:
is there a way to generate the counter with leading zeros?




ohrenkino
ZITAT(parafux @ Sep 14 2014, 16:26) *
i think the counting does not work if there are albums available from different artists but with the same name.
...is there a way to generate the counter with leading zeros?

Anything that is the same is treated the same way.
So if you have "Greatest Hits" by a lot of artists, you would have to append the ALBUM title to show the difference ... or add another loop in the export script that sorts the ARTIST.
The function $num() (see http://help.mp3tag.de/main_scripting.html) allows you to pad numbers.
DetlevD
QUOTE (parafux @ Sep 14 2014, 16:26) *
i think the counting does not work if there are albums available from different artists but with the same name. can anyone confirm?
i have several home-made albums called "various" and those only exist once per list, not once per artist. ...

See above post #5, I made some modifications.

QUOTE (parafux @ Sep 14 2014, 16:26) *
... is there a way to generate the counter with leading zeros?

Use function $num(number,width).
The parameter "width" means the total string length of the left side zero padded number.

DD.20140914.1738.CEST
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-2014 Invision Power Services, Inc.