fix subs file id

This commit is contained in:
YouROK
2021-03-16 09:27:43 +03:00
parent 1d63286d3e
commit 4b270d47aa

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(f.Id) + "&play\n"
m3u += "#EXTVLCOPT:sub-file=" + 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"