diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 2202c9a8..ad1b2950 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -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 = ( """\ diff --git a/copyparty/util.py b/copyparty/util.py index 3c9ed2ab..1a381037 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -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"