From ad50f946ad3720818b0cc087bc61abecf2fc525f Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Tue, 8 Apr 2025 02:00:48 +0300 Subject: [PATCH] Use poster as logo in all.m3u --- server/web/api/m3u.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/web/api/m3u.go b/server/web/api/m3u.go index 726ad83..f856e53 100644 --- a/server/web/api/m3u.go +++ b/server/web/api/m3u.go @@ -40,7 +40,11 @@ func allPlayList(c *gin.Context) { hash := "" // fn=file.m3u fix forkplayer bug with end .m3u in link for _, tr := range torrs { - list += "#EXTINF:0 type=\"playlist\"," + tr.Title + "\n" + list += "#EXTINF:0" + if tr.Poster != "" { + list += " tvg-logo=\"" + tr.Poster + "\"" + } + list += " type=\"playlist\"," + tr.Title + "\n" list += host + "/stream/" + url.PathEscape(tr.Title) + ".m3u?link=" + tr.TorrentSpec.InfoHash.HexString() + "&m3u&fn=file.m3u\n" hash += tr.Hash().HexString() }