Could somebody tell me what is wrong with this code
CODE
// ***
// First track on playlist - Generate header code for entire page
// ***
$puts(text_bitrate,$if2($pad(%__bitrate_dynamic%,3)'kbps',$if2( ~ %__bitrate%'kbps',)))
$puts(text_extrainfo,[ %__extrainfo%])
//**************************************
// codec
//**************************************
$if(%__codec%,
$if($stricmp(%__codec%,musepack),$puts(codec,'MPC'),
$if($stricmp(%__codec%,vorbis),$puts(codec,'Ogg Vorbis'),
$puts(codec,%__codec%)
))
,
//If no codec tag and not streaming, read file extention
$if($and(%_time_total%,$not(%__codec%)),
$puts(codec,$upper($ext(%_path%)))
)
)
//**************************************
// bitrate
//**************************************
$puts(bitrate,$get(spacer)$get(text_bitrate))
$if($stricmp(%__codec%,musepack),
$if(%__mpc_profile%,
$puts(bitrate,$get(spacer)%__mpc_profile%$get(spacer)$get(text_bitrate))
)
)
//**************************************
// extrainfo
//**************************************
$puts(extrainfo,$get(spacer)$get(text_extrainfo))
$if($stricmp(%__codec%,musepack),
$if(%__mpc_streamversion%,$puts(extrainfo,$get(spacer)'sv'%__mpc_streamversion%))
)
$if($strstr($num(%_playlist_number%,10),$num('1',10)),
<HTML>$char(10)
<HEAD>$char(10)
<TITLE>My Playlist</TITLE>$char(10)
</HEAD>$char(10)
<BODY>$char(10)
Playlist Generated from %_foobar2000_version% <BR>$char(10)
<P>
<ul> $char(10)
<li id="foldheader">MP3s</li> $char(10)
<ul id="foldinglist" style="display:none" style=&{head};> $char(10),
)
// ***
// End Header Code
// ***
// First track in an album - Generate header code for this album
$if($strstr($num(%tracknumber%,10),$num('1',10)),
// Generate Footer Album Code only if NOT first track
$if($strstr($num(%_playlist_number%,10),$num('1',10)),,
</ul>
<P>$char(10)
)
// Generate Header Album Code
<li id="foldheader"><b>%artist% - %date% - %album% -> $get(codec)</b>
</li> $char(10)
<ul id="foldinglist" style="display:all" style=&{head};> $char(10)
)
// Code For Each Track
<li>$num(%tracknumber%,2). %title% '['$ifgreater($len(%_length%),4,,0)%_length%']' <code>$get(bitrate) $get(extrainfo)<
/code></li> $char(10)
// Generate Code for the last track - Footer code
$if($and(%_playlist_number%,$strstr($num(%_playlist_number%,10),$num(%_playlist_total%,10))),
</ul>
</ul>
</BODY>$char(10)
</HTML>$char(10)
)
// END PLAYLIST GENERATION
// First track on playlist - Generate header code for entire page
// ***
$puts(text_bitrate,$if2($pad(%__bitrate_dynamic%,3)'kbps',$if2( ~ %__bitrate%'kbps',)))
$puts(text_extrainfo,[ %__extrainfo%])
//**************************************
// codec
//**************************************
$if(%__codec%,
$if($stricmp(%__codec%,musepack),$puts(codec,'MPC'),
$if($stricmp(%__codec%,vorbis),$puts(codec,'Ogg Vorbis'),
$puts(codec,%__codec%)
))
,
//If no codec tag and not streaming, read file extention
$if($and(%_time_total%,$not(%__codec%)),
$puts(codec,$upper($ext(%_path%)))
)
)
//**************************************
// bitrate
//**************************************
$puts(bitrate,$get(spacer)$get(text_bitrate))
$if($stricmp(%__codec%,musepack),
$if(%__mpc_profile%,
$puts(bitrate,$get(spacer)%__mpc_profile%$get(spacer)$get(text_bitrate))
)
)
//**************************************
// extrainfo
//**************************************
$puts(extrainfo,$get(spacer)$get(text_extrainfo))
$if($stricmp(%__codec%,musepack),
$if(%__mpc_streamversion%,$puts(extrainfo,$get(spacer)'sv'%__mpc_streamversion%))
)
$if($strstr($num(%_playlist_number%,10),$num('1',10)),
<HTML>$char(10)
<HEAD>$char(10)
<TITLE>My Playlist</TITLE>$char(10)
</HEAD>$char(10)
<BODY>$char(10)
Playlist Generated from %_foobar2000_version% <BR>$char(10)
<P>
<ul> $char(10)
<li id="foldheader">MP3s</li> $char(10)
<ul id="foldinglist" style="display:none" style=&{head};> $char(10),
)
// ***
// End Header Code
// ***
// First track in an album - Generate header code for this album
$if($strstr($num(%tracknumber%,10),$num('1',10)),
// Generate Footer Album Code only if NOT first track
$if($strstr($num(%_playlist_number%,10),$num('1',10)),,
</ul>
<P>$char(10)
)
// Generate Header Album Code
<li id="foldheader"><b>%artist% - %date% - %album% -> $get(codec)</b>
</li> $char(10)
<ul id="foldinglist" style="display:all" style=&{head};> $char(10)
)
// Code For Each Track
<li>$num(%tracknumber%,2). %title% '['$ifgreater($len(%_length%),4,,0)%_length%']' <code>$get(bitrate) $get(extrainfo)<
/code></li> $char(10)
// Generate Code for the last track - Footer code
$if($and(%_playlist_number%,$strstr($num(%_playlist_number%,10),$num(%_playlist_total%,10))),
</ul>
</ul>
</BODY>$char(10)
</HTML>$char(10)
)
// END PLAYLIST GENERATION
I put together pices of code i found in this board, but it does not do everything it has to
And also i would add the total number of albums at the end of the list
Thank you
