subtitles m3u fix for future VLC update

sub-file dont support HTTP sourse.
input-slave support .mks. With .srt and .ass problem. but it will fix eventually.
https://code.videolan.org/videolan/vlc/-/issues/25549#note_256112
This commit is contained in:
PiRomant
2021-03-27 12:55:39 +07:00
committed by GitHub
parent 2b24085be2
commit a576f4c932

View File

@@ -101,7 +101,7 @@ func getM3uList(tor *state.TorrentStatus, host string, fromLast bool) string {
subs := findSubs(tor.FileStats, f)
if subs != nil {
sname := filepath.Base(subs.Path)
m3u += "#EXTVLCOPT:sub-file=" + host + "/stream/" + url.PathEscape(sname) + "?link=" + tor.Hash + "&index=" + fmt.Sprint(subs.Id) + "&play\n"
m3u += "#EXTVLCOPT:input-slave=" + host + "/stream/" + url.PathEscape(sname) + "?link=" + tor.Hash + "&index=" + fmt.Sprint(subs.Id) + "&play\n"
}
name := filepath.Base(f.Path)
m3u += host + "/stream/" + url.PathEscape(name) + "?link=" + tor.Hash + "&index=" + fmt.Sprint(f.Id) + "&play\n"