From 30b3eb16c0fda7d9dc9d991cc52229c3efa4f512 Mon Sep 17 00:00:00 2001 From: Niels Date: Sat, 7 Jun 2025 18:07:47 +0200 Subject: [PATCH] Found the bloody aarch64 bug!!!! Should be fixed?! --- qml/items/RadioPlayer.qml | 53 +++++++++++++++++-------------- qml/pages/AllRadio.qml | 10 +++--- qml/pages/CountryStationsPage.qml | 4 +-- qml/pages/RadioPlayerPage.qml | 4 +-- 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/qml/items/RadioPlayer.qml b/qml/items/RadioPlayer.qml index 61dfcb3..c409330 100644 --- a/qml/items/RadioPlayer.qml +++ b/qml/items/RadioPlayer.qml @@ -11,7 +11,7 @@ MediaPlayer { property string _stationuuid: "" property string _name: "" property string _favicon: "" - property string _countrycode: "" + property string _cc: "" property string _tags: "" property string _codec: "" property string _bitrate: "" @@ -55,7 +55,10 @@ MediaPlayer { onPlaying: if (!playerPageOpen) pageStack.push("../pages/RadioPlayerPage.qml") + on_CcChanged: console.log(_cc) + onMetaInfoChanged: { + console.log( " *** MetaInfo") if (metaInfo.search(" - ") > -1) { var res = metaInfo.split(" - ") radioArtist = res[0] @@ -67,6 +70,7 @@ MediaPlayer { } onStationOkChanged: { + console.log(" *** StationOk "+stationOk) if (stationOk === 1) { setStationClick() getStationFavorite(_stationuuid) @@ -78,7 +82,8 @@ MediaPlayer { } on_StationuuidChanged: { - radioCountryName = radioBrowser.getCountryName(_countrycode) + console.log(" *** StationuuidChanged: "+_cc) + radioCountryName = radioBrowser.getCountryName(_cc) stop() source = "" radioVideo = false @@ -186,7 +191,7 @@ MediaPlayer { _stationuuid = "" _name = "" _favicon = "" - _countrycode = "" + _cc = "" _tags = "" _codec = "" _bitrate = "" @@ -238,7 +243,7 @@ MediaPlayer { function setStationClick() { - Favorites.setStationClicked(JsFunctions.getTimeStamp(),_stationuuid,_name,_countrycode,_homepage,_url_resolved,_favicon,_tags,_codec,_bitrate,_hls,_favorite) + Favorites.setStationClicked(JsFunctions.getTimeStamp(),_stationuuid,_name,_cc,_homepage,_url_resolved,_favicon,_tags,_codec,_bitrate,_hls,_favorite) } function setStationFavorite(stationuuid,name,countrycode,homepage,url_resolved,favicon,tags,codec,bitrate,hls,favorite) { @@ -262,7 +267,7 @@ MediaPlayer { if (playlist.get(playlistIndex).url_resolved) { _favicon = playlist.get(playlistIndex).favicon _name = playlist.get(playlistIndex).name - _countrycode = playlist.get(playlistIndex).countrycode + _cc = playlist.get(playlistIndex).countrycode _tags = playlist.get(playlistIndex).tags _codec = playlist.get(playlistIndex).codec//getCodec(model.codec) _bitrate = playlist.get(playlistIndex).bitrate //getBitrate(model.bitrate) @@ -280,23 +285,25 @@ MediaPlayer { } function loadRecentPlay(){ - if (playHistory.get(0).url_resolved) { - _favicon = playHistory.get(0).favicon - _name = playHistory.get(0).name - _countrycode = playHistory.get(0).countrycode - _tags = playHistory.get(0).tags - _codec = playHistory.get(0).codec//getCodec(model.codec) - _bitrate = playHistory.get(0).bitrate //getBitrate(model.bitrate) - _hls = playHistory.get(0).hls - _url_resolved = playHistory.get(0).url_resolved - _homepage = playHistory.get(0).homepage - _stationuuid = playHistory.get(0).stationuuid - _favorite = playHistory.get(0).favorite - isPlaying = false - isPaused = true - ///if (_favorite) playlistCount = Favorites.getSetting("playlistIndex",-1) - //playlistIndex = allradioSettings.value("currentFavorite",-1) - // pageStack.push("RadioPlayerPage.qml") + if (playHistory.count > 0) { + if (playHistory.get(0).url_resolved) { + _favicon = playHistory.get(0).favicon + _name = playHistory.get(0).name + _cc = playHistory.get(0).countrycode + _tags = playHistory.get(0).tags + _codec = playHistory.get(0).codec//getCodec(model.codec) + _bitrate = playHistory.get(0).bitrate //getBitrate(model.bitrate) + _hls = playHistory.get(0).hls + _url_resolved = playHistory.get(0).url_resolved + _homepage = playHistory.get(0).homepage + _stationuuid = playHistory.get(0).stationuuid + _favorite = playHistory.get(0).favorite + isPlaying = false + isPaused = true + ///if (_favorite) playlistCount = Favorites.getSetting("playlistIndex",-1) + //playlistIndex = allradioSettings.value("currentFavorite",-1) + // pageStack.push("RadioPlayerPage.qml") + } } } @@ -305,7 +312,7 @@ MediaPlayer { if (playlist.get(rnd).url_resolved) { _favicon = playlist.get(rnd).favicon _name = playlist.get(rnd).name - _countrycode = playlist.get(rnd).countrycode + _cc = playlist.get(rnd).countrycode _tags = playlist.get(rnd).tags _codec = playlist.get(rnd).codec//getCodec(model.codec) _bitrate = playlist.get(rnd).bitrate //getBitrate(model.bitrate) diff --git a/qml/pages/AllRadio.qml b/qml/pages/AllRadio.qml index 5442939..cea1f84 100644 --- a/qml/pages/AllRadio.qml +++ b/qml/pages/AllRadio.qml @@ -183,7 +183,7 @@ Page { onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? + radioPlayer._cc = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? radioPlayer._favicon = model.favicon radioPlayer._name = model.name radioPlayer._tags = model.tags @@ -226,7 +226,7 @@ Page { flagVisible: true onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? + radioPlayer._cc = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? radioPlayer._favicon = model.favicon radioPlayer._name = model.name radioPlayer._tags = model.tags @@ -292,7 +292,7 @@ Page { flagVisible: false onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? + radioPlayer._cc = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? radioPlayer._favicon = model.favicon radioPlayer._name = model.name radioPlayer._tags = model.tags @@ -333,7 +333,7 @@ Page { flagVisible: false onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? + radioPlayer._cc = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? radioPlayer._favicon = model.favicon radioPlayer._name = model.name radioPlayer._tags = model.tags @@ -370,7 +370,7 @@ Page { flagVisible: true onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._countrycode = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? + radioPlayer._cc = model.countrycode// THIS IS THE FUNCTION DESTROYING AARCH64?!? radioPlayer._favicon = model.favicon radioPlayer._name = model.name radioPlayer._tags = model.tags diff --git a/qml/pages/CountryStationsPage.qml b/qml/pages/CountryStationsPage.qml index eb870be..c499e8b 100644 --- a/qml/pages/CountryStationsPage.qml +++ b/qml/pages/CountryStationsPage.qml @@ -190,9 +190,9 @@ Page { delegate: StationsDelegate{ onClicked: { if (model.url_resolved !== radioPlayer._url_resolved) { - radioPlayer._favicon = model.favicon + radioPlayer._cc = model.countrycode radioPlayer._name = model.name - radioPlayer._countrycode = model.countrycode + radioPlayer._favicon = model.favicon radioPlayer._tags = model.tags radioPlayer._codec = model.codec radioPlayer._bitrate = model.bitrate diff --git a/qml/pages/RadioPlayerPage.qml b/qml/pages/RadioPlayerPage.qml index bdee41b..f7e3f1e 100644 --- a/qml/pages/RadioPlayerPage.qml +++ b/qml/pages/RadioPlayerPage.qml @@ -63,7 +63,7 @@ Page { height: countryName.height * 0.9 fillMode: Image.PreserveAspectFit smooth: false - source: radioPlayer._countrycode === "" ? "../images/bycountry_t.png" : "../flags/"+radioPlayer._countrycode.toLowerCase()+".png" + source: radioPlayer._cc === "" ? "../images/bycountry_t.png" : "../flags/"+radioPlayer._cc.toLowerCase()+".png" } } Label { @@ -282,7 +282,7 @@ Page { anchors.fill: parent onClicked: { radioPlayer._favorite ? radioPlayer._favorite = false : radioPlayer._favorite = true - radioPlayer.setStationFavorite(radioPlayer._stationuuid,radioPlayer._name,radioPlayer._countrycode,radioPlayer._homepage,radioPlayer._url_resolved,radioPlayer._favicon,radioPlayer._tags,radioPlayer._codec,radioPlayer._bitrate,radioPlayer._hls,radioPlayer._favorite) + radioPlayer.setStationFavorite(radioPlayer._stationuuid,radioPlayer._name,radioPlayer._cc,radioPlayer._homepage,radioPlayer._url_resolved,radioPlayer._favicon,radioPlayer._tags,radioPlayer._codec,radioPlayer._bitrate,radioPlayer._hls,radioPlayer._favorite) } } }