Spotify long song names #1755
Answered
by
JanDeDobbeleer
Xiaorui-Huang
asked this question in
Troubleshoot
|
Is it possible to compare string length in the if statement to cap the maximum number of characters displayed? Or perhaps something like substring? |
Answered by
JanDeDobbeleer
Feb 14, 2022
Replies: 1 comment
|
Yes, you can make use of the trunc function in your template: |
0 replies
Answer selected by
Xiaorui-Huang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can make use of the trunc function in your template:
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ trunc 10 .Track }}{{ end }}