TRACKS vs TRACK & TITLE


#1

By trying different ways to replace the somehow prefixed TRACK field with web sources scripts, I came across the following.

If you add

outputto "1"
sayoutput "track"

outputto "2"
sayoutput "title"

outputto "3"
sayoutput "track temp"

at the end of a script which writes TRACK TEMP (e.g. my discogs scripts or dano's extended discogs scipts). TRACK TEMP is written to the TRACK field and to the field simply called 3 here.
(use a discogs release with letters as track positions (vinyl release) to have TRACK TEMP written first)

This seems not very logic to me, but it can be very usefull. However it seem to be a somewhat unstable solution. Changeing things in the script which should not be related to this afterward resulted in TRACK TEMP being written to TITLE instead of TRACK.

Can anybody explain this to me?
Is this a bug in the web scripts language or wanted behaviour?
Is there a way to use this for overwirting TRACK and set the 3 field afterwards without having TRACK restored to its original value?


[WS] Discogs (pone mod)
[WS] Discogs (pone mod)
Help with action
Script for ripping genre, year & record label from beatport.com
#2

I got further with my experiments. Here is a little web sources script which demonstrates the possiblilty to change the output of TRACK:

[Name]=track test
[BasedOn]=www.google.com
[AlbumUrl]=http://www.goolge.com
[SearchBy]=_

[ParserScriptAlbum]=...

outputto "title temp"
say "one|two|three|"

outputto "track temp"
say "a|b|c|"

outputto "tracks"
say "|||"

outputto "album"
say "album name"

outputto "artist"
say "artist name 1|artist name 2|artist name 3|"

outputto "title"
sayoutput "title temp"

outputto "track"
sayoutput "track temp"

set "title temp"
set "track temp"
outputto "tracks"

say "|||"


Seems to be necessary to let the script write exaclty three tracks. With every | an additional track is written.
If I leave that away, the script writes always as many tracks as I have files. That would be no good behaviour for web scripts, because you would not notice if your mp3 album is incomplete.

#3

Another success!

Add the following code to the end of any web sources script, and it will give you leading zeros for tracknumber 01-09. But not two leading zeros as would be needed if there are 100 tracks or more.

outputto "title temp"
sayoutput "tracks"

outputto "track temp 2"
say "01|02|03|04|05|06|07|08|09|"

outputto "title"
sayoutput "title temp"

outputto "track"
sayoutput "track temp 2"

set "title temp"
set "track temp 2"

#4
QUOTE (pone @ Oct 4 2011, 21:35) <{POST_SNAPBACK}>
Another success!

Add the following code to the end of any web sources script, and it will give you leading zeros for tracknumber 01-09. But not two leading zeros as would be needed if there are 100 tracks or more.

outputto "title temp"
sayoutput "tracks"

outputto "track temp 2"
say "01|02|03|04|05|06|07|08|09|"

outputto "title"
sayoutput "title temp"

outputto "track"
sayoutput "track temp 2"

set "title temp"
set "track temp 2"<!--QuoteEnd--></div><!--QuoteEEnd-->

Well done !!!!!!


#5

Seems like there is an even easier way to do that. The ...temp fields are not necessary. I just had them from my trial & error experiments and thought they were part of the sollution.
But these four lines at the end of the script are enough:

outputto "title"
sayoutput "tracks"

outputto "track"
say "01|02|03|04|05|06|07|08|09|"

#6

Fantastic find!
I can really use this.