add station metadata

This commit is contained in:
Jonas Heinrich 2017-08-06 23:23:26 +02:00
parent ff27e5ba4c
commit 04b1bbf49c
5 changed files with 57 additions and 5 deletions

35
CHANGELOG.md Normal file
View File

@ -0,0 +1,35 @@
## 0.6.0 2017-09-20
### Added
- Display station metadata
[#1523](https://github.com/owncloud/mail/pull/1523) @tahaalibra
### Changed
- Minimum server is Nextcloud 10/ownCloud 9.1
[#84](https://github.com/nextcloud/mail/pull/84) @ChristophWurst
- Use session storage instead of local storage for client-side cache
[#1612](https://github.com/owncloud/mail/pull/1612) @ChristophWurst
- When deleting the current message, the next one is selected immediatelly
[#1585](https://github.com/owncloud/mail/pull/1585) @ChristophWurst
### Fixed
- Client error while composing a new message
[#1609](https://github.com/owncloud/mail/pull/1609) @ChristophWurst
- Delay app start until page has finished loading
[#1634](https://github.com/owncloud/mail/pull/1634) @ChristophWurst
- Auto-redirection of HTML mail links
[#1603](https://github.com/owncloud/mail/pull/1603) @ChristophWurst
- Update folder counters when reading/deleting messages
[#1585](https://github.com/owncloud/mail/pull/1585)
### Removed
- Removed old API
### Deprecated
- Deprecated new API
### Security
- Fixed XXE in xml upload
## 0.5.0 2017-08-06
### Added
- First release

View File

@ -3,9 +3,13 @@
<id>radio</id>
<name>Radio</name>
<description>Listening to your favorite radio stations in Nextcloud</description>
<version>0.4</version>
<licence>MIT</licence>
<version>0.5.0</version>
<licence>agpl</licence>
<author>Jonas Heinrich</author>
<bugs>https://git.project-insanity.org/onny/nextcloud-app-radio/issues</bugs>
<website>https://git.project-insanity.org/onny/nextcloud-app-radio</website>
<category>multimedia</category>
<screenshot>https://onny.project-insanity.org/files/radio-app.png</screenshot>
<dependencies>
<owncloud min-version="9.1" max-version="9.2"/>
<nextcloud min-version="10" max-version="12"/>

View File

@ -15,6 +15,10 @@
margin-left: 10px;
}
#station_metadata{
margin: 15px;
}
.play{background: url('../img/play.png') no-repeat;}
.pause{background: url('../img/pause.png') no-repeat;}

View File

@ -23,11 +23,11 @@ $(function(){
/===============*/
function action_favorite(stationid){
var baseUrl = OC.generateUrl('/apps/radio');
var removed = false;
var removed = false;
var stations = []
var baseUrl = OC.generateUrl('/apps/radio');
$.get(baseUrl + '/stations', function ( data ) {
for (var station in data) {
if (data[station]["stationid"] == stationid){
@ -60,6 +60,15 @@ $(function(){
};
function action_play(stationid){
$.ajax({
method: "GET",
url: "https://onny.project-insanity.org/getmetadata/"+stationid,
dataType: 'json',
success: function(data){
var title = data['metadata'];
$("#station_metadata").html(title);
}
});
$.ajax({
method: "GET",
url: "https://www.radio-browser.info/webservice/v2/json/url/"+stationid,
@ -69,7 +78,6 @@ $(function(){
$("#player").attr("src", sourceUrl);
$('#player').trigger('play');
$('#playbutton').attr("class", "pause");
return true;
}
});
};

View File

@ -27,6 +27,7 @@
<audio id="player" src=""></audio>
<button id="playbutton" class="play"></button>
<div id="volumeslider"></div>
<p id="station_metadata">Test</p>
</div>
</div>
<div id="app-content">