Small changes, and fixing for chum repo
This commit is contained in:
parent
c74865f99c
commit
affe35ef35
@ -9,7 +9,7 @@ import "helpers"
|
||||
ApplicationWindow
|
||||
{
|
||||
id: allRadio
|
||||
property string _version: "2.0.20"
|
||||
property string _version: "2.0.21"
|
||||
property string _language: Qt.locale().name.slice(0,2)
|
||||
property string _country: Qt.locale().name.slice(-2)
|
||||
property int sleepTime: 0
|
||||
|
@ -21,8 +21,10 @@ Item {
|
||||
property int _tags: 0
|
||||
property int _countries: 0
|
||||
property int _c: 0
|
||||
|
||||
// Properties to be used in application -------------------------------------------------
|
||||
property ListModel serversModel : ListModel { id: serversModel }
|
||||
property ListModel serverStatsModel : ListModel { id: serverStatsModel }
|
||||
property ListModel votedModel : ListModel {id: votedModel}
|
||||
property CountryListModel countriesModel : CountryListModel {id:countriesModel}
|
||||
//property TagListModel tagsModel : TagListModel {id:tagsModel}
|
||||
@ -89,13 +91,20 @@ Item {
|
||||
getStats()
|
||||
} */
|
||||
|
||||
function connectServer(index) {
|
||||
if (serversModel.count > 0) {
|
||||
|
||||
server = serversModel.get(index).server
|
||||
if (serverUrl.length > 7 && url !== serverUrl) {loading=true;serverIndex = index;sTimer.running=false;getStats();} else {loading=true;serverIndex = index;getRandom();}
|
||||
}
|
||||
}
|
||||
// Choose a random server from available servers
|
||||
function getRandom(url) {
|
||||
if (serversModel.count > 0) {
|
||||
var random = Math.floor((Math.random() * serversModel.count) + 1) - 1
|
||||
serverUrl = serversModel.get(random).serverUrl
|
||||
server = serversModel.get(random).server
|
||||
if (serverUrl.length > 7 && url !== serverUrl) {sTimer.running=false;getStats();} else getRandom();
|
||||
if (serverUrl.length > 7 && url !== serverUrl) {sTimer.running=false;getStats();serverIndex=random} else getRandom();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ MprisPlayer {
|
||||
|
||||
identity: "AllRadio2"
|
||||
supportedUriSchemes: ["file"]
|
||||
supportedMimeTypes: ["audio/x-wav", "audio/x-vorbis+ogg", "audio/mpeg", "audio/mp4a-latm", "audio/x-aiff"]
|
||||
supportedMimeTypes: ["audio/x-wav", "audio/x-vorbis+ogg", "audio/mpeg", "audio/mp4a-latm", "audio/x-aiff", "audio/flac"]
|
||||
|
||||
canControl: true
|
||||
canGoNext: radioPlayer.playlistIndex < radioPlayer.playlist.count -1 && radioPlayer._favorite
|
||||
|
@ -223,6 +223,7 @@ MediaPlayer {
|
||||
}
|
||||
|
||||
function playStream() {
|
||||
//console.log(" ********** URL : "+_url_resolved)
|
||||
source = _url_resolved
|
||||
play()
|
||||
isPlaying = true
|
||||
|
@ -15,9 +15,9 @@ Page {
|
||||
anchors.bottomMargin: mediaPlayerPanel.visibleSize
|
||||
|
||||
property int _appStart: Favorites.getSetting("appStart",0)
|
||||
property bool _loading: radioBrowser.loading
|
||||
property bool stationOk: radioPlayer.stationOk
|
||||
property bool online: radioBrowser.online
|
||||
property bool _loading: radioBrowser.loading
|
||||
property GetCountryStations getTrending1: GetCountryStations {id: getTrending1}
|
||||
property GetCountryStations getTrending2: GetCountryStations {id: getTrending2}
|
||||
property GetCountryStations getTrendingWorld: GetCountryStations {id: getTrendingWorld}
|
||||
|
@ -61,24 +61,20 @@ Dialog {
|
||||
ComboBox {
|
||||
id: serverL
|
||||
width: parent.width
|
||||
label: qsTr("Server")
|
||||
anchors.margins: Theme.paddingLarge
|
||||
description: qsTr("Select anohter server")
|
||||
//currentIndex: Favorites.getSetting("appStart",0)
|
||||
label: qsTr("Connected to")
|
||||
description: qsTr("Available servers (just information, won't change server yet!)")
|
||||
currentIndex: radioBrowser.serverIndex
|
||||
menu : ContextMenu {
|
||||
id: contextMenu
|
||||
Column {
|
||||
Repeater {
|
||||
|
||||
model: radioBrowser.serversModel
|
||||
delegate: QtObject {
|
||||
property Item child: MenuItem {
|
||||
text: modelData
|
||||
onClicked: console.log("***")
|
||||
}
|
||||
delegate: MenuItem {
|
||||
text: server
|
||||
onClicked: radioBrowser.connectServer(currentIndex)//{radioBrowser.server = serverUrl;radioBrowser.serverIndex=currentIndex;}//console.log("***"+serverUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* menu: ContextMenu {
|
||||
|
@ -1,7 +1,7 @@
|
||||
Name: harbour-allradio
|
||||
|
||||
Summary: AllRadio
|
||||
Version: 2.0.20
|
||||
Version: 2.0.21
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
License: GPLv2
|
||||
@ -33,8 +33,11 @@ PackageName: AllRadio2
|
||||
Type: desktop-application
|
||||
PackagerName: Niels Simonsen (nesnomis)
|
||||
Categories:
|
||||
- Multimedia
|
||||
Icon: https://gitea.nesnomis.nu/nesnomis/harbour-allradio/src/branch/master/icons/128x128/harbour-allradio.png
|
||||
- Radio
|
||||
- Audio
|
||||
- Video
|
||||
- Media
|
||||
Icon: https://gitea.nesnomis.nu/nesnomis/harbour-allradio/raw/branch/master/icons/128x128/harbour-allradio.png
|
||||
Screenshots:
|
||||
- https://gitea.nesnomis.nu/nesnomis/harbour-allradio/wiki/raw/Screenshot_20250522_222021_001.png
|
||||
- https://gitea.nesnomis.nu/nesnomis/harbour-allradio/wiki/raw/Screenshot_20250522_222038_001.png
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1267,11 +1267,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Server</source>
|
||||
<source>Connected to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select anohter server</source>
|
||||
<source>Available servers (just information, won't change server yet!)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
Loading…
x
Reference in New Issue
Block a user