This returns a paginated list of all templates that are available to you.

By default a page contains 20 entries. To override this value append the GET parameter page_size with the desired number of entries per page (max 100).

Note: To get all your templates including your private ones you must authenticate yourself as described in the API root.

GET /api/v2/templates/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 10,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "https://yadg.cc/api/v2/templates/1/",
            "id": 1,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "BBCode (generic)",
            "nameFormatted": "BBCode (generic)",
            "code": "[size=4][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{{ main_artists|wrap(\"%s\",\", \", \" & \") }}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"%s\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}{{ labelId.label }}{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {{ data.genres|join(\", \") }}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {{ data.styles|join(\", \") }}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}\r\n{% if data.discs.length == 1 %}[size=3][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=3][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"%s\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"%s\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
            "isUtility": false,
            "default": true,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/776/",
            "id": 776,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "D3Si",
            "nameFormatted": "D3Si",
            "code": "{% set gazelle_url=\"https://d3si.net\" %}[size=5][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}[url={{ gazelle_url }}/torrents.php?recordlabel={{ labelId.label|url_encode }}]{{ labelId.label }}[/url]{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url={{ gazelle_url }}/torrents.php?taglist={{ g|replace(\"\\s+\",'.','g')|url_encode }}]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url={{ gazelle_url }}/torrents.php?taglist={{ s|replace(\"\\s+\",'.','g')|url_encode }}]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}\r\n{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
            "isUtility": false,
            "default": false,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/6/",
            "id": 6,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "Desi.cd",
            "nameFormatted": "Desi.cd",
            "code": "{% set gazelle_url=\"https://desi.cd\" %}{% include \"template_2\" %}\r\n{% include \"template_3\" %}",
            "isUtility": false,
            "default": false,
            "dependencies": {
                "template_3": "{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
                "template_2": "[size=5][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}[url={{ gazelle_url }}/torrents.php?recordlabel={{ labelId.label|url_encode }}]{{ labelId.label }}[/url]{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url={{ gazelle_url }}/torrents.php?taglist={{ g|replace(\"\\s+\",'.','g')|url_encode }}]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url={{ gazelle_url }}/torrents.php?taglist={{ s|replace(\"\\s+\",'.','g')|url_encode }}]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}"
            }
        },
        {
            "url": "https://yadg.cc/api/v2/templates/2/",
            "id": 2,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "Gazelle: Generic Header",
            "nameFormatted": "Gazelle: Generic Header",
            "code": "[size=5][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}[url={{ gazelle_url }}/torrents.php?recordlabel={{ labelId.label|url_encode }}]{{ labelId.label }}[/url]{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url={{ gazelle_url }}/torrents.php?taglist={{ g|replace(\"\\s+\",'.','g')|url_encode }}]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url={{ gazelle_url }}/torrents.php?taglist={{ s|replace(\"\\s+\",'.','g')|url_encode }}]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}",
            "isUtility": true,
            "default": false,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/3/",
            "id": 3,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "Gazelle: Generic Tracks",
            "nameFormatted": "Gazelle: Generic Tracks",
            "code": "{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
            "isUtility": true,
            "default": false,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/7/",
            "id": 7,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "plain",
            "nameFormatted": "plain",
            "code": "{% set main_artists=data.artists|artistsbytype(\"main\") %}{{ main_artists|wrap(\"%s\",\", \", \" & \") }}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"%s\",\", \", \" & \") }}{% endif %} – {{ data.title }}\r\n\r\n{% if data.labelIds.length > 0 %}Label/Cat#: {% for labelId in data.labelIds %}{{ labelId.label }}{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}Country: {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}Year: {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}Genre: {{ data.genres|join(\", \") }}\r\n{% endif %}{% if data.styles.length > 0  %}Style: {{ data.styles|join(\", \") }}\r\n{% endif %}{% if data.format %}Format: {{ data.format }}\r\n{% endif %}\r\n{% if data.discs.length == 1 %}Tracklist\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}Disc {{ disc.number }}{% if disc.title %}: {{ disc.title }}{% endif %}{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}\r\n{% endif %}{% for track in disc.tracks %}{{ track.number }}{% if track.number|isdigit %}.{% else %} –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"%s\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"%s\",\", \", \" & \") }}){% endif %}{% if track.length %} ({{ track.length|formatseconds(true) }}){% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\nTotal length: {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: {{ data.url }}{% endif %}",
            "isUtility": false,
            "default": false,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/9/",
            "id": 9,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "Waffles",
            "nameFormatted": "Waffles",
            "code": "[size=4][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap('[artist=\"%s\"][/artist]',\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap('[artist=\"%s\"]',\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}{{ labelId.label }}{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url=https://www.waffles.fm/tags.php?tag=\"{{ g|lower|url_encode }}\"]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url=https://www.waffles.fm/tags.php?tag=\"{{ s|lower|url_encode }}\"]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}\r\n{% include \"template_8\" %}",
            "isUtility": false,
            "default": false,
            "dependencies": {
                "template_8": "{% if data.discs.length == 1 %}[size=3][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=3][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap('[artist=\"%s\"][/artist]',\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap('[artist=\"%s\"][/artist]',\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}"
            }
        },
        {
            "url": "https://yadg.cc/api/v2/templates/8/",
            "id": 8,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "Waffles (Tracks only)",
            "nameFormatted": "Waffles (Tracks only)",
            "code": "{% if data.discs.length == 1 %}[size=3][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=3][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap('[artist=\"%s\"][/artist]',\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap('[artist=\"%s\"][/artist]',\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
            "isUtility": false,
            "default": false,
            "dependencies": {}
        },
        {
            "url": "https://yadg.cc/api/v2/templates/4/",
            "id": 4,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "What",
            "nameFormatted": "What",
            "code": "{% set gazelle_url=\"https://what.cd\" %}{% include \"template_2\" %}\r\n{% include \"template_3\" %}",
            "isUtility": false,
            "default": false,
            "dependencies": {
                "template_3": "{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
                "template_2": "[size=5][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}[url={{ gazelle_url }}/torrents.php?recordlabel={{ labelId.label|url_encode }}]{{ labelId.label }}[/url]{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url={{ gazelle_url }}/torrents.php?taglist={{ g|replace(\"\\s+\",'.','g')|url_encode }}]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url={{ gazelle_url }}/torrents.php?taglist={{ s|replace(\"\\s+\",'.','g')|url_encode }}]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}"
            }
        },
        {
            "url": "https://yadg.cc/api/v2/templates/5/",
            "id": 5,
            "owner": "Slack",
            "ownedByYou": false,
            "name": "What (Tracks only)",
            "nameFormatted": "What (Tracks only)",
            "code": "{% include \"template_3\" %}",
            "isUtility": false,
            "default": false,
            "dependencies": {
                "template_3": "{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}"
            }
        }
    ]
}