# Line Break Between Each Disc Tracklist

**URL:** <https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598>\
**Category:** Support\
**Created:** [June 22, 2021, 4:15pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598 "2021-06-22T16:15:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 4:15pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/1 "2021-06-22T16:15:01Z")

</div>

Sorry if this was mentioned before but I've been looking for a way to break tracklist based on disc number like this:

> **Example**
>
> Disc 1  
> 01 Track  
> 02 Track
> 
> Disc 2  
> 01 Track  
> 02 Track

and if it possible to make the numbering continuous like this:

> **Example**
>
> Disc 1  
> 01 Track  
> 02 Track
> 
> Disc 2  
> 03 Track  
> 04 Track

Thanks.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 22, 2021, 4:25pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/2 "2021-06-22T16:25:54Z")

</div>

Where?  
In the file list?  
In an export?  
In the track numbering assistant?

---

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 4:27pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/3 "2021-06-22T16:27:23Z")

</div>

Ah sorry, export  
I want to implant it here

$filename(%\_folderpath%%album%.txt,utf-8)  
Album: %album%  
YEAR: %year%  
TRACKS: %\_total\_files% (Track)  
PLAYTIME: %\_total\_time%

**Track List:** $loop(%\_folderpath%)  
$if(%discnumber%,$num(%discnumber%,1)-,)$num(%track%,2) - %artist% - %title%$loopend()

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 22, 2021, 6:16pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/4 "2021-06-22T18:16:30Z")

</div>

If you want to sort by album, then discnumber, then track number, you need $loop() statements for each grouping and sorted field.  
So probably, it is not really necessary to $loop(%\_folderpath%) as you do not need the filename as criterion.The Track List would probably have these statements:  
$loop(%artist%%album%)$loop(%discnumber%)Disc %discnumber%  
$loop(%track%)$if(%discnumber%,$num(%discnumber%,1)-,)$num(%track%,2) - %artist% - %title%$loopend()$loopend()$loopend()

---

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 6:31pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/5 "2021-06-22T18:31:15Z")

</div>

Thank you for replying but I still not quite familiar with export commands  
so it would be appreciated if you simplify it

what goes after "Track List:" to show tracks like this?

Disc 1  
01 Track  
02 Track

Disc 2  
01 Track  
02 Track

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 22, 2021, 6:37pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/6 "2021-06-22T18:37:28Z")

</div>

I think  
`$loop(%artist%%album%)$loop(%discnumber%)Disc %discnumber%`  
`$loop(%track%)$if(%discnumber%,$num(%discnumber%,1)-,)$num(%track%,2) - %artist% - %title%$loopend()$loopend()$loopend()`

If you think of $loop() as sorting command then it should be fairly straightforward:  
First sort by ARTIST and ALBUM, then by DISCNUMBER, there output the Discnumber, then sort by TRACK and output all the required data for that track, here the number, artist and title.

---

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 6:56pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/7 "2021-06-22T18:56:17Z")

</div>

No luck, it does split tracks by Disc number just not in a proper list

> **Export Output**
>
> Track List:  
> Disc 1  
> 1-01 - Test Artist - 01 Track1-02 - Test Artist - 02 Track1-03 - Test Artist - 03 Track1-04 - Test Artist - 04 Track1-05 - Test Artist - 05 Track1-06 - Test Artist - 06 Track1-07 - Test Artist - 07 Track1-08 - Test Artist - 08 Track1-09 - Test Artist - 09 Track1-10 - Test Artist - 10 Track1-11 - Test Artist - 11 Track1-12 - Test Artist - 12 Track1-13 - Test Artist - 13 Track1-14 - Test Artist - 14 Track1-15 - Test Artist - 15 Track1-16 - Test Artist - 16 Track1-17 - Test Artist - 17 Track1-18 - Test Artist - 18 Track1-19 - Test Artist - 19 Track1-20 - Test Artist - 20 Track1-21 - Test Artist - 21 Track1-22 - Test Artist - 22 Track1-23 - Test Artist - 23 Track1-24 - Test Artist - 24 Track1-25 - Test Artist - 25 Track1-26 - Test Artist - 26 Track1-27 - Test Artist - 27 Track1-28 - Test Artist - 28 Track1-29 - Test Artist - 29 TrackDisc 2  
> 2-30 - Test Artist - 30 Track2-31 - Test Artist - 31 Track2-32 - Test Artist - 32 Track2-33 - Test Artist - 33 Track2-34 - Test Artist - 34 Track2-35 - Test Artist - 35 Track2-36 - Test Artist - 36 Track2-37 - Test Artist - 37 Track2-38 - Test Artist - 38 Track2-39 - Test Artist - 39 Track2-40 - Test Artist - 40 Track2-41 - Test Artist - 41 Track2-42 - Test Artist - 42 Track2-43 - Test Artist - 43 Track2-44 - Test Artist - 44 Track2-45 - Test Artist - 45 Track2-46 - Test Artist - 46 Track2-47 - Test Artist - 47 Track2-48 - Test Artist - 48 Track2-49 - Test Artist - 49 Track2-50 - Test Artist - 50 Track2-51 - Test Artist - 51 Track2-52 - Test Artist - 52 Track2-53 - Test Artist - 53 Track

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 22, 2021, 7:00pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/8 "2021-06-22T19:00:02Z")

</div>

The stange bit about the export scripts is that the line formatting in the script is also applied to the output.  
So experiment a little with added line breaks between the individual statements until the output looks ok.  
e.g.  
`$loop(%artist%%album%)$loop(%discnumber%)Disc %discnumber%`  
`$loop(%track%)$if(%discnumber%,$num(%discnumber%,1)-,)$num(%track%,2) - %artist% - %title%`  
`$loopend()$loopend()$loopend()`

---

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 7:26pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/9 "2021-06-22T19:26:18Z")

</div>

That worked! after I modified it a bit

> **Code**
>
> Track List:  
> $loop(%discnumber%)Disc %discnumber%
> 
> $loop(%track%)$num(%discnumber%)$num(%track%,2) %title%  
> $loopend()$loopend()

> **Output**
>
> Track List:  
> Disc 1
> 
> 01 Track  
> 02 Track  
> Disc 2
> 
> 03 Track  
> 04 Track

Just one little detail, how to put line break here:  
"02 Track  
Disc 2"?

so it becomes

02 Track

Disc 2

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 22, 2021, 7:27pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/10 "2021-06-22T19:27:55Z")

</div>

Add an empty line after the last $loopend()

---

<div class="post-metadata">

**Author:** ![ASSASSIN21](https://community.mp3tag.de/user_avatar/community.mp3tag.de/assassin21/32/8058_2.png) [@ASSASSIN21](https://community.mp3tag.de/u/ASSASSIN21)\
**Post date:** [June 22, 2021, 8:30pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/11 "2021-06-22T20:30:48Z")

</div>

Perfect now, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [July 22, 2021, 8:31pm UTC](https://community.mp3tag.de/t/line-break-between-each-disc-tracklist/53598/12 "2021-07-22T20:31:42Z")

</div>

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