Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Columns UI: guessing tracknumber from filename (Read 2613 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Columns UI: guessing tracknumber from filename

I made a script that guesses the tracknumber from the filename of the track, if theres no tracknumber info in the meta tag. I don't believe its that effecient, but it works.
I use foobar with columnsui

All my albums are tagged 01-artist-song for single albums and 101-artist-song, 102, 103 etc for multidisc albums. Now what my code does: it gets the first 3 characters from the filename. If its 01- it will delete the -

Thats easy.
For multicd it echos 101 ; 102 ; etc. Then i let it subtrack 100, so 104 will become 4 (to which an 0 will be added in the end). When it has stripped it, it checks again if its still > 100 ... so 204 will become 104, will become 4. I worked it out so that it works up to a 6CD album.

Now every multicd is labeled like this:

but what i would like it to do, is to keep counting from where it stopped in the previous cd. So:

So really i need a way for my code to know how much tracks are present on the previous cd...
i cant figure it out, who of you more experienced guys can help me out?

Tnx in advance
[hope this is in the right thread]

Here's the code:

Code: [Select]

// get first 3 characters of the filename

// delete the - or _ sign if its there

// store the tracknumber minus x

// if track_raw is greater than 100 go on, else keep it






// check at each check if the number is greater than 100






// get the guessed tracknumber if there isnt one in the meta tag
// also, add a 0 to it, and if its then like 001, remove the 0 again


Columns UI: guessing tracknumber from filename

Reply #1
well, 1st of all, if you files are named correctly why can't you use tagging scripts?

you can't do what you want unless you are using < F2K 0.9.5. and cwb_hooks, which can get info about previous track, and of course even more power to it with custom_info, so don't bother.

you can try to look in lyx (azrael, navigator, olight...) scripts for guessing, they are interesting but they consume more processor time, so here is simple fast code for 2 number guessing (supposing that track # is in the begining of the file):

Code: [Select]
// Begin






// End

Columns UI: guessing tracknumber from filename

Reply #2
all my files are sfv corret now, and i don't want to change them, thats why i cant adjust the meta-tags... gonna try you're simple guessing code now.

Your code works for tracks that start with 01, 02, 03 etc.. but not with 101, 102, 103, 104, 201, 202, 203 etc..

Columns UI: guessing tracknumber from filename

Reply #3
as i said with f2k > 0.9.5. you task is impossible, and the code that i send is just a simple example of fast 2 # guessing code, which is unusible for your track namings (but for common names works just fine and is fast).

the var at the begining [tracknr] i parse at the end of my globals, but in the example there should be [track] instead of [tracknr] to avoid confusion even in this simple code - but you probably figure that one (i'll correct them now)

you need at least info about prev. track which you can't reach even with some temp global vars (with cwb_hooks you can get them, but there is no point of going back to some prev. versions of f2k)

so your only info is %list_index% and that's not enough.

keep in touch with your progression.

btw, what's sfv?

Columns UI: guessing tracknumber from filename

Reply #4
Simple file verification (SFV) is a file format for storing CRC32 checksums of files in order to verify the integrity of files. SFV can be used to detect random corruptions in a file, but cannot be used for checking authenticity in any meaningful way. Typically, the .sfv extension is used on SFV files.

Its a way to see that the files that you own are still in their original state...

And yeah, you're code is good voor your kind of tags... mine works too, it just echoes the first 2 characters of the filename ...

anyway i guess we'll have to hope from the developers that they include something to see previous track info or something

Columns UI: guessing tracknumber from filename

Reply #5
i knew that FV is for file verification, but i was gessing about S (simple
CRC (or maybe better MD5)

and i think that waiting for prev/next info will be endless, according to f2k developers, but who knows?

i tried your code the first time and it didn't work for me, so i thought it's just a part of your script.
you aren't yoking, are you?

SimplePortal 1.0.0 RC1 © 2008-2021