Compare commits

..

2 Commits

Author SHA1 Message Date
Niels
57b978c4ec More cleaning 2025-06-07 19:05:22 +02:00
Niels
c44e84eb55 Make shure serverurl is ok! 2025-06-07 19:01:39 +02:00
2 changed files with 3 additions and 8 deletions

View File

@ -39,9 +39,9 @@ Item {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
onOnlineChanged: { onOnlineChanged: {
if (online && serverUrl !== "") { if (online && serverUrl.length > 7) {
countriesModel.source = serverUrl + "/xml/countrycodes?hidebroken=true" countriesModel.source = serverUrl + "/xml/countrycodes?hidebroken=true"
} } else getRandom()
} }
// Not used?!?!? // Not used?!?!?
/* function getServer(s,u) { /* function getServer(s,u) {
@ -102,7 +102,7 @@ Item {
tagCount = obj.tags tagCount = obj.tags
if (obj.status === "OK") {online = true} else {online = false} if (obj.status === "OK") {online = true} else {online = false}
} }
} else if (req.readyState === 4 && req.status > 299) getRandom() }
}; };
req.open("get", serverUrl+"/json/stats"); req.open("get", serverUrl+"/json/stats");
req.setRequestHeader('User-Agent',_useragent); req.setRequestHeader('User-Agent',_useragent);

View File

@ -55,10 +55,7 @@ MediaPlayer {
onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml") onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml")
on_CcChanged: console.log(_cc)
onMetaInfoChanged: { onMetaInfoChanged: {
console.log( " *** MetaInfo")
if (metaInfo.search(" - ") > -1) { if (metaInfo.search(" - ") > -1) {
var res = metaInfo.split(" - ") var res = metaInfo.split(" - ")
radioArtist = res[0] radioArtist = res[0]
@ -70,7 +67,6 @@ MediaPlayer {
} }
onStationOkChanged: { onStationOkChanged: {
console.log(" *** StationOk "+stationOk)
if (stationOk === 1) { if (stationOk === 1) {
setStationClick() setStationClick()
getStationFavorite(_stationuuid) getStationFavorite(_stationuuid)
@ -82,7 +78,6 @@ MediaPlayer {
} }
on_StationuuidChanged: { on_StationuuidChanged: {
console.log(" *** StationuuidChanged: "+_cc)
radioCountryName = radioBrowser.getCountryName(_cc) radioCountryName = radioBrowser.getCountryName(_cc)
stop() stop()
source = "" source = ""