Merge pull request #42 from PiRomant/patch-1

subtitles m3u fix for future VLC update
This commit is contained in:
YouROK
2021-03-30 10:30:17 +03:00
committed by GitHub

View File

@@ -101,7 +101,7 @@ func getM3uList(tor *state.TorrentStatus, host string, fromLast bool) string {
subs := findSubs(tor.FileStats, f) subs := findSubs(tor.FileStats, f)
if subs != nil { if subs != nil {
sname := filepath.Base(subs.Path) 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) name := filepath.Base(f.Path)
m3u += host + "/stream/" + url.PathEscape(name) + "?link=" + tor.Hash + "&index=" + fmt.Sprint(f.Id) + "&play\n" m3u += host + "/stream/" + url.PathEscape(name) + "?link=" + tor.Hash + "&index=" + fmt.Sprint(f.Id) + "&play\n"