# Hilfe bei Text-Export

**URL:** https://community.mp3tag.de/t/hilfe-bei-text-export/9072
**Category:** Allgemein
**Created:** [October 3, 2009, 6:26am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072 "2009-10-03T06:26:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Ponscho](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@Ponscho](https://community.mp3tag.de/u/Ponscho)
#### Post date: [October 3, 2009, 6:26am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/1 "2009-10-03T06:26:25Z")

</div>

Guten Morgen @all!

Habe ein Problem beim Text-Export, da mehrere Augen bekanntlich besser sehen, wende ich mich an alle Adleraugen 😉  
Wahrscheinlich habe ich irgendwo das $loop oder $loopend() verkehrt angesetzt, nur sehe ich im Augenblick nicht wo.

Hier mal mein String:

```
 $if($eql($left(%genre%,4),hoer),,N$char(186) $if($eql(%band%,Various),$repeat( ,2)INTERPRET - TITEL,$repeat( ,2)TITEL) $if($eql(%band%,Various),$repeat( ,37)DAUER,$repeat( ,49)DAUER))$char(13)$char(10) $if($eql($left(%genre%,4),hoer),,$repeat(-,4) $repeat(-,54) $repeat(-,5))

$if($eql($left(%genre%,4),hoer),,$if($eql($left(%genre%,4),hoer),,$if($less(%totaldiscs%,2),,$loop(%titlesortorder%%discnumber%%album%,1) $upper(%album%[Vol. $num(%titlesortorder%,2)] '('CD $num(%discnumber%,2)')')$char(13)$char(10) $repeat(-,67)
$if($eql($left(%genre%,4),hoer),,$loop(%_path%) $num(%track%,3). $iflonger($if($eql(%band%,Various),%artist% - %title%,%title%),54,$left($if($eql(%band%,Various),%artist% - %title%,%title%),54) $repeat( ,$sub(54,$len($left($if($eql(%band%,Various),%artist% - %title%,%title%),54))))%_length%
$repeat( ,7)$mid($if($eql(%band%,Various),%artist% - %title%,%title%),61,54) $repeat( ,$sub(54,$len($mid($if($eql(%band%,Various),%artist% - %title%,%title%),61,54)))),$left($if($eql(%band%,Various),%artist% - %title%,%title%),54) $repeat( ,$sub(54,$len($left($if($eql(%band%,Various),%artist% - %title%,%title%),54))))%_length%)
$loopend())

$loopend()))) Ertellt am: %_date% $repeat( ,$sub(44,$len(mit %_app%)))mit %_app%

```

Kleine Erklärung:

Bei Alben mit mehreren CD's soll das ganze so aussehen das im Kopf die Unterteilung mit Track# | Interpret - Titel | Dauer anfängt und darunter das Album mit CD#. Anschliessend nochmals darunter die Trackliste  
 ![](https://community.mp3tag.de/uploads/default/original/1X/6ffb0b2a78bd92b4705f61bf59ea49a967321480.jpg)

Bei Alben mit nur 1 CD, Track# | Interpret - Titel | Dauer und dann darunter die Trackliste.  
Das tut es aber nicht ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:")  
 ![](https://community.mp3tag.de/uploads/default/original/1X/002cce875f4ef6382ff2e5983a78eb7d8f22edb3.jpg)

Bei Hörbüchern und -spielen soll der Kopf und die Trackliste nicht angezeigt werden.

Wo liegt der Fehler? Für mich im Moment nicht ersichtlich, oder liegt es an $less?

Edit: PS: Gibt es ein deutsches Tutorial wie ich mit Textpad richtig arbeite?

![](https://community.mp3tag.de/uploads/default/original/1X/6ffb0b2a78bd92b4705f61bf59ea49a967321480.jpg)

![](https://community.mp3tag.de/uploads/default/original/1X/002cce875f4ef6382ff2e5983a78eb7d8f22edb3.jpg)

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 3, 2009, 7:06am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/2 "2009-10-03T07:06:00Z")

</div>

> [@Ponscho](#):
>
> ... Wo liegt der Fehler? ...

Ich habe deine mte Datei verkürzt und etwas geändert ('Various' =\> 'VA'), so dass sie bei mir funktioniert ...  
[20091003.Ponscho.mte](https://community.mp3tag.de/uploads/default/original/2X/9/90fb2ab6627e7173cd7bd672225d161952a23c63.mte) (1.19 KB)  
... und erhalte damit das Ergebnis ...  
2 CD: [20091003.Ponscho.txt](https://community.mp3tag.de/uploads/default/original/2X/0/08326a9ddd5fbea3c4ed2b702fa737b108a979f0.txt) (2.94 KB)  
1 CD: [20091003.Ponscho.txt](https://community.mp3tag.de/uploads/default/original/2X/c/c77b53100cd53200d63b0b1c78d512ab6e751e63.txt) (1.46 KB)  
Vielleicht hilft es dir weiter.

DD.20091003.1121.CEST

[20091003.Ponscho.txt](https://community.mp3tag.de/uploads/default/original/2X/0/08326a9ddd5fbea3c4ed2b702fa737b108a979f0.txt) (2.94 KB)

[20091003.Ponscho.txt](https://community.mp3tag.de/uploads/default/original/2X/c/c77b53100cd53200d63b0b1c78d512ab6e751e63.txt) (1.46 KB)

[20091003.Ponscho.mte](https://community.mp3tag.de/uploads/default/original/2X/9/90fb2ab6627e7173cd7bd672225d161952a23c63.mte) (1.19 KB)

---

<div class="post-metadata">

### Author: ![Ponscho](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@Ponscho](https://community.mp3tag.de/u/Ponscho)
#### Post date: [October 3, 2009, 7:32am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/3 "2009-10-03T07:32:07Z")

</div>

> [@DetlevD](#):
>
> 1 CD: [20091003.Ponscho.txt](https://community.mp3tag.de/uploads/default/original/2X/c/c77b53100cd53200d63b0b1c78d512ab6e751e63.txt) (1.46 KB)

Danke und guten Morgen Detlev!

genau da liegt mein Problem, bei Alben mit nur 1CD, soll nur der Kopf (Track# | Interpret - Titel | Dauer) und darunter gleich die Trackliste ohne 'Album (CD#)'

Weisst Du wie ich's mein?

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 3, 2009, 7:42am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/4 "2009-10-03T07:42:18Z")

</div>

Hi Ponscho, du willst die Zeile mit dem Namen des Albums nicht ausgeben, wenn das Album nur eine CD umfasst?

DD.20091003.1140.CEST

---

<div class="post-metadata">

### Author: ![Ponscho](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@Ponscho](https://community.mp3tag.de/u/Ponscho)
#### Post date: [October 3, 2009, 7:43am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/5 "2009-10-03T07:43:23Z")

</div>

Genau!

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 3, 2009, 8:00am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/6 "2009-10-03T08:00:06Z")

</div>

Hmm ... was fällt mir dazu ein?

- Vor dem Loop über die Tracks der CD(s) die Gesamtanzahl der CD(s) zählen, und dann entscheiden, was zu tun ist.

- Was ist mit einem Feld "TotalCDs" oder "DISCTOTAL" oder so, was man abfragen kann?

Ich benutze DISCNUMBER mit dem Inhalt z. B. "1/1" oder "1/3" ... "3/3", so dass der zweite Wert Auskunft gibt über die Anzahl der beteiligten CDs.

Mahlzeit!  
DD.20091003.1200.CEST

---

<div class="post-metadata">

### Author: ![Ponscho](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@Ponscho](https://community.mp3tag.de/u/Ponscho)
#### Post date: [October 3, 2009, 8:23am UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/7 "2009-10-03T08:23:29Z")

</div>

> [@DetlevD](#):
>
> - Vor dem Loop über die Tracks der CD(s) die Gesamtanzahl der CD(s) zählen, und dann entscheiden, was zu tun ist.
> 
> - Was ist mit einem Feld "TotalCDs" oder "DISCTOTAL" oder so, was man abfragen kann?
> 
> Ich benutze DISCNUMBER mit dem Inhalt z. B. "1/1" oder "1/3" ... "3/3", so dass der zweite Wert Auskunft gibt über die Anzahl der beteiligten CDs.

Hab ich doch ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")

 ![](https://community.mp3tag.de/uploads/default/original/2X/6/6e07abf357e16b3f53831d6b84e4f741b7a8e2ef.jpg)  

 ![](https://community.mp3tag.de/uploads/default/original/2X/6/6e07abf357e16b3f53831d6b84e4f741b7a8e2ef.jpg)

---

<div class="post-metadata">

### Author: ![Ponscho](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@Ponscho](https://community.mp3tag.de/u/Ponscho)
#### Post date: [October 3, 2009, 7:59pm UTC](https://community.mp3tag.de/t/hilfe-bei-text-export/9072/8 "2009-10-03T19:59:59Z")

</div>

O.k: Fehler gefunden und gebannt

Jetzt funktionierts!

```
$if($eql($left(%genre%,4),hoer),,N$char(186) $if($eql(%band%,Various),$repeat( ,2)INTERPRET - TITEL,$repeat( ,2)TITEL) $if($eql(%band%,Various),$repeat( ,37)DAUER,$repeat( ,49)DAUER))$char(13)$char(10) $if($eql($left(%genre%,4),hoer),,$repeat(-,4) $repeat(-,54) $repeat(-,5))

$if($eql($left(%genre%,4),hoer),,$if($eql($left(%genre%,4),hoer),,$if($less(%totaldiscs%,2),,$loop(%titlesortorder%%discnumber%%album%,1) $upper(%album%[Vol. $num(%titlesortorder%,2)] '('CD $num(%discnumber%,2)')')$char(13)$char(10) $repeat(-,67)
$if($eql($left(%genre%,4),hoer),,$loop(%_path%) $num(%track%,3). $iflonger($if($eql(%band%,Various),%artist% - %title%,%title%),54,$left($if($eql(%band%,Various),%artist% - %title%,%title%),54) $repeat( ,$sub(54,$len($left($if($eql(%band%,Various),%artist% - %title%,%title%),54))))%_length%
$repeat( ,7)$mid($if($eql(%band%,Various),%artist% - %title%,%title%),55,54) $repeat( ,$sub(54,$len($mid($if($eql(%band%,Various),%artist% - %title%,%title%),55,54)))),$left($if($eql(%band%,Various),%artist% - %title%,%title%),54) $repeat( ,$sub(54,$len($left($if($eql(%band%,Various),%artist% - %title%,%title%),54))))%_length%)
$loopend())

$loopend()))) Ertellt am: %_date% $repeat( ,$sub(44,$len(mit %_app%)))mit %_app%
```
