Adding tag support for RRS podcast steam

This commit is contained in:
Dawson Jeane 2025-11-28 22:08:01 -06:00
parent e19d31466e
commit f6a3c89b2e
2 changed files with 10 additions and 2 deletions

View file

@ -1547,13 +1547,21 @@ class HttpCli(object):
iurl = html_escape("%s%s" % (baseurl, i["rp"]), True, True)
fn_title = unquotep(i["rp"].split("?")[0].split("/")[-1])
fn_title = html_escape(fn_title, True, True)
self.log("tags: %s" % (i["tags"],), 7)
tag_t = str(i["tags"].get("title") or "")
tag_track = str(i["tags"].get(".tn") or "")
tag_a = str(i["tags"].get("artist") or "")
title = html_escape(tag_t, True, True) if tag_t else fn_title
desc = "%s - %s" % (tag_a, tag_t) if tag_t and tag_a else (tag_t or tag_a)
if tag_track:
desc = "%s - %s - %s" % (tag_a,tag_track, tag_t) if tag_t and tag_a and tag_track else (tag_t or tag_a)
else:
desc = "%s - %s" % (tag_a, tag_t) if tag_t and tag_a else (tag_t or tag_a)
desc = html_escape(desc, True, True) if desc else fn_title
mime = html_escape(guess_mime(title, ap))
lmod = formatdate(max(0, i["ts"]))
tag_date = i["tags"].get("date")
zsa = (iurl, iurl, title, desc, lmod, iurl, mime, i["sz"])
zs = (
"""\

View file

@ -470,7 +470,7 @@ MAGIC_MAP = {"jpeg": "jpg"}
DEF_EXP = "self.ip self.ua self.uname self.host cfg.name cfg.logout vf.scan vf.thsize hdr.cf-ipcountry srv.itime srv.htime"
DEF_MTE = ".files,circle,album,.tn,artist,title,.bpm,key,.dur,.q,.vq,.aq,vc,ac,fmt,res,.fps,ahash,vhash"
DEF_MTE = ".files,circle,album,.tn,artist,title,date,.bpm,key,.dur,.q,.vq,.aq,vc,ac,fmt,res,.fps,ahash,vhash"
DEF_MTH = ".vq,.aq,vc,ac,fmt,res,.fps"