added installation instructions to README.md, added data-src and data-id attributes to tr element

This commit is contained in:
Jonas Heinrich 2017-01-06 09:59:20 +01:00
parent c8de955c6c
commit 7bb389d210
3 changed files with 9 additions and 3 deletions

View File

@ -6,6 +6,12 @@ This experimental app uses the radio-browser.info api and offers radio stations
## Maintainers
* [Jonas Heinrich](https://github.com/onny)
## Installation
* **Using git:** In your `nextcloud/apps/` directory, run `git clone https://git.project-insanity.org/onny/nextcloud-app-radio.git radio`. Then go to the Apps manager tab in your Nextcloud web interface, and enable the Radio app.
* **Using the zip archive:** Download the latest [tar.bz2 archive](https://git.project-insanity.org/onny/nextcloud-app-radio/repository/archive.tar.bz2?ref=master), extract the directory inside your `nextcloud/apps/` directory, and rename it to `radio`. For stable releases, you can also download one of the [releases](https://git.project-insanity.org/onny/nextcloud-app-radio/) tar.bz2 archives. Then go to the Apps manager tab in your Nextcloud web interface, and enable the Radio app.
* **Using package manager:** For ArchLinux, there is an [AUR package](https://aur.archlinux.org/packages/nextcloud-app-radio-git/) available.
## Testing
Can be easily tested using Docker:
```

View File

@ -2,7 +2,7 @@
<info>
<id>radio</id>
<name>Radio</name>
<description>Listening to your favorite radio stations in NextCloud</description>
<description>Listening to your favorite radio stations in Nextcloud</description>
<version>0.2</version>
<licence>MIT</licence>
<author>Jonas Heinrich</author>

View File

@ -1,7 +1,7 @@
$(window).on('load', function(){
$('body').on('click', 'tr', function() {
var sourceUrl = $(this).attr('src');
var sourceUrl = $(this).attr('data-src');
$("#player").attr("src", sourceUrl);
$('#player').trigger('play');
});
@ -9,7 +9,7 @@ $(window).on('load', function(){
function show_result(data){
$("tbody > tr").remove();
$.each(data, function(i, station) {
$('tbody').append('<tr src='+station['url']+'>\
$('tbody').append('<tr data-src='+station['url']+' data-id='+station['id']+'>\
<td class="filename">\
<a href="#" class="action action-favorite" data-original-title="" title="">\
<span class="icon icon-star"></span>\