diff --git a/spradio.liq b/spradio.liq index 69ffadb..33a8384 100644 --- a/spradio.liq +++ b/spradio.liq @@ -63,7 +63,7 @@ def next_song() = log = log(label="next_song") log("Requesting the next song from #{url_next}") - if string.contains(prefix='https') then + if string.contains(prefix='https', url_next) then let (status, _, data) = https.get(headers=api_headers_next, url_next) else let (status, _, data) = http.get(headers=api_headers_next, url_next) @@ -103,7 +103,7 @@ def just_played(m) = if m["req_id"] != "" then log('Letting server know we played request ID #{m["req_id"]} here: #{url_played}') played_song = json_of(compact=true, [("song_request", int_of_string(m["req_id"]))]) - if string.contains(prefix='https') then + if string.contains(prefix='https', url_played) then let (status, _, data) = https.post(headers=api_headers_played, data=played_song, url_played) else let (status, _, data) = http.post(headers=api_headers_played, data=played_song, url_played)