diff options
Diffstat (limited to 'internal/app/view_helpers.go')
| -rw-r--r-- | internal/app/view_helpers.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/app/view_helpers.go b/internal/app/view_helpers.go index b023d62..9613d63 100644 --- a/internal/app/view_helpers.go +++ b/internal/app/view_helpers.go @@ -15,11 +15,11 @@ func videoRow(v video) table.Row { duration = formatDuration(v.Duration) } age := humanizeAge(v.ModTime) - path := trimPath(v.Path) + tags := formatTags(v.Tags) if v.Err != nil { duration = "!" + v.Err.Error() } - return table.Row{v.Name, duration, age, path} + return table.Row{v.Name, duration, age, tags} } func renderProgressBar(done, total, width int) string { @@ -78,3 +78,10 @@ func trimPath(path string) string { } return path } + +func formatTags(tags []string) string { + if len(tags) == 0 { + return "--" + } + return strings.Join(tags, ", ") +} |
