Skip to content

Commit

Permalink
add line break to nfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Izumiko committed Feb 19, 2024
1 parent b6d038f commit a18d36c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ func WriteNfo(vi api.VideoInfo) (title string, path string, err error) {
if err != nil {
return "", "", err
}

// add <br> to description
detailInfo.Description = strings.ReplaceAll(detailInfo.Description, "\n", "<br/>\n")

path = prepareFolder(detailInfo.Author)
titleSafe, _ := filenamify.Filenamify(detailInfo.VideoName, filenamify.Options{Replacement: "_", MaxLength: 64})
filename := filepath.Join(path, titleSafe+"-"+vi.Id+".nfo")
Expand Down

0 comments on commit a18d36c

Please sign in to comment.