mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-12 21:22:17 +00:00
Use HTTPS when communicating with Last.fm
This commit is contained in:
parent
7cfd958eeb
commit
69c43b749b
@ -80,9 +80,9 @@ class LastFm:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if write:
|
if write:
|
||||||
r = requests.post('http://ws.audioscrobbler.com/2.0/', data = kwargs, timeout = 5)
|
r = requests.post('https://ws.audioscrobbler.com/2.0/', data = kwargs, timeout = 5)
|
||||||
else:
|
else:
|
||||||
r = requests.get('http://ws.audioscrobbler.com/2.0/', params = kwargs, timeout = 5)
|
r = requests.get('https://ws.audioscrobbler.com/2.0/', params = kwargs, timeout = 5)
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
logger.warning('Error while connecting to LastFM: ' + str(e))
|
logger.warning('Error while connecting to LastFM: ' + str(e))
|
||||||
return None
|
return None
|
||||||
|
@ -68,9 +68,9 @@
|
|||||||
<input type="text" class="form-control" id="lastfm" placeholder="Unlinked" readonly>
|
<input type="text" class="form-control" id="lastfm" placeholder="Unlinked" readonly>
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
{% if request.user.id == user.id %}
|
{% if request.user.id == user.id %}
|
||||||
<a href="http://www.last.fm/api/auth/?api_key={{ api_key }}&cb={{ request.url_root[:-(request.script_root|length+1)] + url_for('frontend.lastfm_reg', uid = 'me') }}" class="btn btn-default">Link</a>
|
<a href="https://www.last.fm/api/auth/?api_key={{ api_key }}&cb={{ request.url_root[:-(request.script_root|length+1)] + url_for('frontend.lastfm_reg', uid = 'me') }}" class="btn btn-default">Link</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="http://www.last.fm/api/auth/?api_key={{ api_key }}&cb={{ request.url_root[:-(request.script_root|length+1)] + url_for('frontend.lastfm_reg', uid = user.id) }}" class="btn btn-default">Link</a>
|
<a href="https://www.last.fm/api/auth/?api_key={{ api_key }}&cb={{ request.url_root[:-(request.script_root|length+1)] + url_for('frontend.lastfm_reg', uid = user.id) }}" class="btn btn-default">Link</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user