various fix thanks to eslint
This commit is contained in:
parent
4e19b6304e
commit
3d0ac08488
3 changed files with 9 additions and 5 deletions
|
@ -9,5 +9,7 @@
|
||||||
"ecmaVersion": "latest",
|
"ecmaVersion": "latest",
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"rules": {}
|
"rules": {
|
||||||
|
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ class Radio {
|
||||||
class RadioStreaming {
|
class RadioStreaming {
|
||||||
constructor(sources) {
|
constructor(sources) {
|
||||||
this.sources = sources.sort(
|
this.sources = sources.sort(
|
||||||
(a, b) => this.getPriority(a) < this.getPriority(a),
|
(a, b) => this.getPriority(a) < this.getPriority(b),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ class RadioStreaming {
|
||||||
* @param {Object} options options. Currenly unused
|
* @param {Object} options options. Currenly unused
|
||||||
* @return {Radio}
|
* @return {Radio}
|
||||||
*/
|
*/
|
||||||
async function get(siteurl, options) {
|
async function get(siteurl, _options) {
|
||||||
let resp = await fetch(getManifestUrl(siteurl));
|
let resp = await fetch(getManifestUrl(siteurl));
|
||||||
let text = await resp.text();
|
let text = await resp.text();
|
||||||
|
|
||||||
|
|
6
ui.js
6
ui.js
|
@ -1,12 +1,14 @@
|
||||||
|
/* global radiomanifest */
|
||||||
// const radiomanifest = require('radiomanifest.js')
|
// const radiomanifest = require('radiomanifest.js')
|
||||||
|
|
||||||
function updateNow(radio) {
|
function updateNow(radio) {
|
||||||
var box = document.querySelector("#now-info");
|
var box = document.querySelector("#now-info");
|
||||||
const show = radio.getSchedule().getNowShow();
|
const show = radio.getSchedule().getNowShow();
|
||||||
|
var showText;
|
||||||
try {
|
try {
|
||||||
var showText = show.getName() + "\nfeed: " + show.getWebsite();
|
showText = show.getName() + "\nfeed: " + show.getWebsite();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
var showText = String(show);
|
showText = String(show);
|
||||||
}
|
}
|
||||||
var text =
|
var text =
|
||||||
radio.getName() + " - " + radio.getDescription() + " -- " + showText;
|
radio.getName() + " - " + radio.getDescription() + " -- " + showText;
|
||||||
|
|
Loading…
Reference in a new issue