Browse Source

url_rewrite

283
ThomasV 10 years ago
parent
commit
31c4849566
  1. 8
      lib/commands.py

8
lib/commands.py

@ -516,8 +516,12 @@ class Commands:
'expiration': v.get('expiration'), 'expiration': v.get('expiration'),
} }
if v.get('path'): if v.get('path'):
p = self.config.get('url_prefix', 'file://') url = 'file://' + v.get('path')
URI = 'bitcoin:?r=' + p + v.get('path') r = self.config.get('url_rewrite')
if r:
a, b = r
url = url.replace(a, b)
URI = 'bitcoin:?r=' + url
out['url'] = URI out['url'] = URI
return out return out

Loading…
Cancel
Save