Help - Search - Members - Calendar
Full Version: TRACKS vs TRACK & TITLE
Mp3tag Forums > Mp3tag - International > Development > Web Sources Discussion
pone
By trying different ways to replace the somehow prefixed TRACK field with web sources scripts, I came across the following.

If you add
QUELLTEXT
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?
pone
I got further with my experiments. Here is a little web sources script which demonstrates the possiblilty to change the output of TRACK:
QUELLTEXT
[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.
pone
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.

QUELLTEXT
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"
Victor Kostas
QUOTE (pone @ Oct 4 2011, 21:35) *
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.

CODE
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"


Well done !!!!!!
pone
ZITAT(pone @ Oct 4 2011, 21:35) *
Add the following code to the end of any web sources script, and it will give you leading zeros for tracknumber 01-09.


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:

QUELLTEXT
outputto "title"
sayoutput "tracks"

outputto "track"
say "01|02|03|04|05|06|07|08|09|"
dano
Fantastic find!
I can really use this.
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.