AV-98-fork

A fork of https://tildegit.org/solderpunk/AV-98
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit d37eaae7062bc767ebad48ab666f7ed7657b3160
parent 1ba4ec5768df4f98a0f31b41e99cdf49facadcd2
Author: Solderpunk <solderpunk@sdf.org>
Date:   Sun, 11 Aug 2019 23:24:37 +0300

Don't include default ports in URL.

Diffstat:
Mav98.py | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/av98.py b/av98.py @@ -130,9 +130,11 @@ def fix_ipv6_url(url): def geminiitem_to_url(gi): if gi and gi.host: - return ("gemini://%s:%d%s%s" % ( - gi.host, int(gi.port), "" if gi.path.startswith("/") else "/", - gi.path)) + return ("gemini://%s%s%s" % ( + gi.host, + "" if gi.port == 1965 else ":%d" % gi.port, + gi.path if gi.path.startswith("/") else "/"+gi.path, + )) elif gi: return gi.path else: