additions to changelog, fix radio-browser endpoint

This commit is contained in:
Jonas Heinrich 2020-10-08 22:35:57 +02:00
parent d0781e462a
commit 1bd3230c71
5 changed files with 16 additions and 41 deletions

View File

@ -1,3 +1,10 @@
## 0.7.0 - 2020-02
### Fixed
- Nextcloud 19-20 compatibility
[]() @ ()
- New Radio-Browser API endpoint
[]() @ ()
## 0.6.6 - 2020-02
### Added
- French translation

View File

@ -4,7 +4,7 @@
<id>radio</id>
<name>Radio</name>
<description>Listening to your favorite radio stations in Nextcloud</description>
<version>0.6.6</version>
<version>0.7.0</version>
<licence>agpl</licence>
<author>Jonas Heinrich</author>
<documentation>
@ -15,6 +15,6 @@
<bugs>https://git.project-insanity.org/onny/nextcloud-app-radio/issues</bugs>
<screenshot>https://git.project-insanity.org/onny/nextcloud-app-radio/raw/master/screenshot.png</screenshot>
<dependencies>
<nextcloud min-version="15" max-version="18"/>
<nextcloud min-version="19" max-version="20"/>
</dependencies>
</info>

View File

@ -1,32 +0,0 @@
<?php
/**
* ownCloud - App Template Example
*
* @author Frank Karlitschek
* @author Florian Hülsmann
* @copyright 2011 Frank Karlitschek karlitschek@kde.org
* @copyright 2012 Florian Hülsmann fh@cbix.de
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Check if we are a user
OCP\User::checkLoggedIn();
$navigationManager = \OC::$server->getNavigationManager();
$navigationManager->setActiveEntry( 'radio' );
$tmpl = new OCP\Template( 'radio', 'main', 'user' );
$tmpl->printPage();

View File

@ -2,7 +2,7 @@ var MODULE = (function (radio) {
$(document).ready(function () {
var version = "0.6.5";
var version = "0.7.0";
var current_stationid = "";
var searchTimeout = null;
var scheduled = false;
@ -106,7 +106,7 @@ var MODULE = (function (radio) {
};
$.each(data, function(i, station) {
if (typeof station['id'] == "undefined") {
if (typeof station['stationuuid'] == "undefined") {
var entry_type = "folder";
var isstarred = false;
var hashurl = window.location.hash + "/" + station['name'];
@ -114,12 +114,12 @@ var MODULE = (function (radio) {
var entry_type = "station";
var isstarred = false;
for (var fav_station in fav_stations) {
if (fav_stations[fav_station]["stationid"] == station['id']) {
if (fav_stations[fav_station]["stationid"] == station['stationuuid']) {
isstarred = true;
break;
}
};
var hashurl = '#station/'+station['id'];
var hashurl = '#station/'+station['stationuuid'];
}
radio.render_entry(entry_type, isstarred, hashurl, station['favicon'], station['name']);
});
@ -151,7 +151,7 @@ var MODULE = (function (radio) {
var station_array_new = [];
station_ids.forEach(function (station_id, idx) {
var url = "https://www.radio-browser.info/webservice/json/stations/byid/"+station_ids[idx];
var url = "https://de1.api.radio-browser.info/json/stations/byid/"+station_ids[idx];
$.getJSON( url , {"User-Agent": "Nextcloud Radio/"+radio.version }, function( data ) {
if (data.length === 0) {
@ -182,7 +182,7 @@ var MODULE = (function (radio) {
radio.radio_query = function(hashurl){
var offset = $('tbody > tr').length;
var query = "";
var api_baseurl = "https://www.radio-browser.info/webservice/json/";
var api_baseurl = "https://de1.api.radio-browser.info/json/";
switch (hashurl) {
case "#top":
var query_url = "stations/topclick";

View File

@ -56,7 +56,7 @@ var MODULE = (function (radio) {
};
$.ajax({
method: "GET",
url: "https://www.radio-browser.info/webservice/v2/json/url/"+stationid,
url: "https://de1.api.radio-browser.info/json/url/"+stationid,
dataType: 'json',
success: function(data){
var streamurl = data['url'];