From 09b6d939f5ea1b15823c5c8d9157037944770921 Mon Sep 17 00:00:00 2001 From: YanceyChiew <35898533+YanceyChiew@users.noreply.github.com> Date: Sat, 1 Oct 2022 14:28:50 +0800 Subject: [PATCH] dlna: add support for more external subtitle --- cmd/serve/dlna/cds.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/serve/dlna/cds.go b/cmd/serve/dlna/cds.go index f3daf0cd8..f7cd77d1f 100644 --- a/cmd/serve/dlna/cds.go +++ b/cmd/serve/dlna/cds.go @@ -158,7 +158,9 @@ func mediaWithResources(nodes vfs.Nodes) (vfs.Nodes, map[vfs.Node]vfs.Nodes) { for _, node := range nodes { baseName, ext := splitExt(strings.ToLower(node.Name())) switch ext { - case ".srt": + case ".srt", ".ass", ".ssa", ".sub", ".idx", ".sup", ".jss", ".txt", ".usf", ".cue", ".vtt", ".css": + // .idx should be with .sub, .css should be with vtt otherwise they should be culled, + // and their mimeTypes are not consistent, but anyway these negatives don't throw errors. subtitlesByName[baseName] = node default: mediaByName[baseName] = append(mediaByName[baseName], node)