From 5d232586cf114ea7a726b1b596bf3edc2509c5b3 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 18 Oct 2020 16:47:38 +0200 Subject: [PATCH] radio-browser.info api: count click api --- src/components/Main.vue | 9 ++++++++- src/components/Player.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Main.vue b/src/components/Main.vue index 5314fba..6e77222 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -50,12 +50,19 @@ export default { audioPlayer.fade(100, 0, 500) // FIXME persistent volume state audioPlayer.unload() // FIXME do unload after fadeout } + this.$jquery.get('http://de1.api.radio-browser.info/json/url/' + station.stationuuid, + { + 'User-Agent': 'Nextcloud Radio/1.0.0', // FIXME global version, doesnt seem to work + }) audioPlayer = new Howl({ src: [station.url_resolved], volume: 0, }) audioPlayer.play() audioPlayer.fade(0, 100, 500) // FIXME persistent volume state + + const stationMetadata = document.getElementById('stationMetadata') + stationMetadata.textContent = station.name }, loadStations() { const vm = this @@ -65,7 +72,7 @@ export default { order: 'clickcount', reverse: true, offset: vm.offset, - 'User-Agent': 'Nextcloud Radio/1.0.0', // FIXME global version + 'User-Agent': 'Nextcloud Radio/1.0.0', // FIXME global version, doesnt seem to work }) .done(function(data) { vm.tableData = vm.tableData.concat(data) diff --git a/src/components/Player.vue b/src/components/Player.vue index a25943a..552ed55 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -3,7 +3,7 @@