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'),
}
if v.get('path'):
p = self.config.get('url_prefix', 'file://')
URI = 'bitcoin:?r=' + p + v.get('path')
url = 'file://' + 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
return out