url_rewrite

This commit is contained in:
ThomasV 2015-06-02 10:41:36 +02:00
parent b83b7fa5c8
commit 31c4849566

View file

@ -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