mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
url_rewrite
This commit is contained in:
parent
b83b7fa5c8
commit
31c4849566
1 changed files with 6 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue