Creating disc number tag from discogs

Hi all,

me again !

Ok so discogs hands off track numbers as follows in a fielf called position

single disc
1
2
3
4
etc...

if multi disc

1-01
1-02

or

2-01
2-02
etc ...

Is there a way i could do something similar to my psudo code that folows

if position = d-tt then ? output d to tag discnumber and output tt to tag Track
else
position output to track tag

Cheers all

The example i'm having difficulty with is Dave Clarke World Service 2 - the script i'm using just numbers the whole release from 1 - 45 when i want it to break at 19 (disc1) and then disc 2 to restart numbering from 1 - 26.

mANY tHANKS
Gav

Anyone ?