Playlist export: skip intro+outro

Hi there,

i use the export function to create

  • a csv-file for packaging+tagging files via php
  • a Tracklist.txt
  • an HTML-Player
  • an HTML/CSS-Tracklist wich then is rendered as PNG

for some files i want to exclude the intro(track0)+outro(last track).

can i skip one loop conditionally? e.g. if track=0 or title=Outro

tracklist code:
$filename(Trackliste_shop.txt,utf-8)Inhaltsverzeichnis %album%
$loop(%track%) | %_length% | %title%$char(9)
$loopend()Spieldauer: ca. $div(%_total_time_raw%,60) Minuten

HTML-Code:

...HTML...
<tr>
	</td>
	<td>
		<img src="../../_Vorlagen/HTML/eule_red_headphones.png" height="150px" >
	</td>
	<td colspan="4" class="gross">
<center>%album%</center>
	</td>

</tr>
$loop(%_filename_ext%)
<tr class="Track%track% Title-%title%"> <td class="abstand" colspan="3"><hr color="#FFFFFF"/>-</td> </tr>
<tr class="Track%track% Title-%title%">
		<td class="gradient links weiss gross" >
		 $num(%track%,2)		
		 <div class="klein weiss">
		  <bbr />%_length%</td>
		 </div>
		</td>
		<td class="strich" />
		<td class="gradient mitte weiss mittel" >
			%title%
		</td>
		<!--td class="gradient mitte weiss klein" >
		 <bbr />%_length%</td>
		</td-->
		<td class="strich" />
		<td class="gradient rechts rot schatten gross " >
		&#9658;
		</td>

</tr>
$loopend()

	</table>
...HTML...

all the scripting functions, including the boolean ones are available for the export - though the syntax may become a little congested.
And I am not really sure if the parser likes "End-of-line" characters in the code.
Wouldn't it be much easier to use a filter first so that the intro and outro tracks are not part of the file list?

Hi there,
well i got quite a list of exports so there is a good chance of messing up when selecting the track by hand.
grafik

Regarding EOL: luckily there are no problems. Only Characters like []' require attention

Isn't it much more puzzling that you find that although you selected all files, not all of them appear in the export?
Also, you would have to edit every export with that condition ...
To test for the occurrance of a string, use $strstr(), e.g. $strstr(%title%,outro) which is case-sensitive.
This returns a number so you could use for the condition $(ifgreater($strstr(%title%,outro),0,do this,do the other)

Got my TXT working - Thx!

$filename(Trackliste_shop.txt,utf-8)Inhaltsverzeichnis %album%
$loop(%track%)$ifgreater($strstr(%title%,Ausklang),0,,$ifgreater($strstr(%title%,Einklang),0,, | %_length% | %title%$char(9)
))$loopend()Spieldauer: ca. $div(%_total_time_raw%,60) Minuten

so i guess you cannot call loopend() conditionally?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.