Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develmaster: Commits for v0.3.1-rc2 #36

Merged
merged 11 commits into from
Feb 4, 2024
9 changes: 5 additions & 4 deletions .github/workflows/build-on-pull_req.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI on PRs with SDK for 2.2.0 (i486)
name: CI on PRs with SDK for 3.0.2 (i486)

env:
RELEASE: 2.2.0.29
RELEASE: 3.0.2.8
ARCH: i486
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 3 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
Expand Down Expand Up @@ -50,13 +50,14 @@ jobs:
- name: Build ${{ env.ARCH }}
uses: coderus/github-sfos-build@old-stable
with:
# Solely builds for i486 on 2.2.0, because of https://github.com/sailfishos-patches/patchmanager/pull/437#issuecomment-1615317003
# Solely builds for i486 on 3.0.2, because of https://github.com/sailfishos-patches/patchmanager/pull/437#issuecomment-1615317003
# and https://github.com/sailfishos-applications/filecase/issues/45
release: ${{ env.RELEASE }}
arch: ${{ env.ARCH }}

- name: Upload build result
uses: actions/upload-artifact@v3
with:
name: RPM-build-results_${{ github.base_ref }}-${{ env.ARCH }}-SFOS2.2.0+
name: RPM-build-results_${{ github.base_ref }}-${{ env.ARCH }}-SFOS${{ env.RELEASE }}+
path: RPMS/

51 changes: 47 additions & 4 deletions .github/workflows/build-on-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,54 @@ jobs:
path: RPMS/


SDK-310:
SDK-302:
runs-on: ubuntu-22.04
env:
# For the available docker images, see https://github.com/CODeRUS/docker-sailfishos-platform-sdk
RELEASE: 3.1.0.12
RELEASE: 3.0.2.8
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 10 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
steps:

- name: Checkout
uses: actions/checkout@v3

# Caching Docker images is not ready yet, see
# https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md
#- name: Cache Docker images of the Sailfish-SDK
# id: cache-sdk
# uses: actions/cache@v3
# with:
# path: $GITHUB_WORKSPACE/…
# key: cache

- name: Prepare
run: mkdir RPMS

- name: Build armv7hl on ${{ env.RELEASE }}
uses: coderus/github-sfos-build@old-stable
with:
release: ${{ env.RELEASE }}
arch: armv7hl

- name: Build i486 on ${{ env.RELEASE }}
uses: coderus/github-sfos-build@old-stable
with:
release: ${{ env.RELEASE }}
arch: i486

- name: Upload build results
uses: actions/upload-artifact@v3
with:
name: RPM-build-results_SFOS${{ env.RELEASE }}+
path: RPMS/


SDK-320:
runs-on: ubuntu-22.04
env:
# For the available docker images, see https://github.com/CODeRUS/docker-sailfishos-platform-sdk
RELEASE: 3.2.0.12
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 10 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
steps:
Expand Down Expand Up @@ -158,11 +201,11 @@ jobs:
path: RPMS/


SDK-440:
SDK-430:
runs-on: ubuntu-22.04
env:
# For the available docker images, see https://github.com/CODeRUS/docker-sailfishos-platform-sdk
RELEASE: 4.4.0.68
RELEASE: 4.3.0.12
# Do not wait up to the default of 10 minutes for network timeouts in a workflow which runs ca. 10 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
steps:
Expand Down
1 change: 1 addition & 0 deletions FlowPlayer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TARGET = flowplayer

QT += core network sql xml

DEFINES += VERSION=\\\"$${VERSION}\\\"

CONFIG += link_pkgconfig
PKGCONFIG += gstreamer-1.0 libresource libresource-glib taglib
Expand Down
4 changes: 2 additions & 2 deletions qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Page {

Label {
color: Theme.secondaryHighlightColor
text: "version 0.1-9"
text: "version " + appVersion
font.pixelSize: Theme.fontSizeSmall
}
}
Expand All @@ -58,7 +58,7 @@ Page {

Label {
color: Theme.secondaryColor
text: "(C) 2015 Matias Perez (CepiPerez)"
text: "(C) 2015-2016 Matias Perez (CepiPerez)"
font.pixelSize: Theme.fontSizeSmall
}

Expand Down
2 changes: 1 addition & 1 deletion qml/pages/AlbumListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Page {
PullDownMenu {
MenuItem {
text: qsTr("Search artist image")
enabled: artist!==qsTr("Unknown artist") && artistcount==="1"
enabled: artist!==qsTr("Unknown artist")
onClicked: {
coversearch.clearData()
pageStack.push ("CoverDownload.qml", {"artist":artist, "searchingArtist":true, "album":""})
Expand Down
10 changes: 6 additions & 4 deletions qml/pages/CoverArtList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ BackgroundItem
Connections {
target: coversearch
onImageChanged: {
if ((artist===dartist && album==dalbum) || (album===dartist && album==dalbum)) {
if ((artist===dartist && album==dalbum)
|| (album===dartist && album==dalbum)
|| (album===dartist && !dalbum)) {
console.log("Updated: " + artist + " - " + album)
reload()
}
Expand Down Expand Up @@ -113,9 +115,9 @@ BackgroundItem

Label {
id: vtext
anchors.verticalCenter: coverImg.status!=Image.Error && textvisible? undefined : parent.verticalCenter
anchors.bottom: coverImg.status!=Image.Error && textvisible? parent.bottom : undefined
anchors.bottomMargin: coverImg.status!=Image.Error && textvisible? Theme.paddingSmall : undefined
y: coverImg.status!=Image.Error && textvisible
? parent.height - height - Theme.paddingSmall
: (parent.height - height) / 2
anchors.left: parent.left
anchors.leftMargin: Theme.paddingMedium
width: parent.width - Theme.paddingMedium*2
Expand Down
5 changes: 5 additions & 0 deletions rpm/flowplayer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* Sat Feb 03 2024 olf <[email protected]> - 0.3.1
- Add missing QML dependencies (PRs #27, #28)
- Fix various ways of album cover download (PR #31) by @dcaliste (closes issue #30)
- Use version number from the RPM spec file (PR #32) by @dcaliste (closes issue #29)

* Tue Dec 05 2023 olf <[email protected]> - 0.3.0
- Create README
- Add screenshots (#3 etc.)
Expand Down
14 changes: 9 additions & 5 deletions rpm/flowplayer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Name: flowplayer

Summary: Music Player for SailfishOS
# The <version> tag must adhere to semantic versioning: Among multiple other
# reasons due to its use for `qmake5` in line 56. See https://semver.org/
Version: 0.3.0
# reasons due to its use for `qmake5` in line 104. See https://semver.org/
Version: 0.3.1
# The <release> tag comprises one of {alpha,beta,rc,release} postfixed with a
# natural number greater or equal to 1 (e.g., "beta3") and may additionally be
# postfixed with a plus character ("+"), the name of the packager and a release
Expand All @@ -21,7 +21,7 @@ Version: 0.3.0
# build at GitHub and OBS, when configured accordingly; mind the sorting
# (`adud` < `alpha`). For details and reasons, see
# https://github.com/storeman-developers/harbour-storeman/wiki/Git-tag-format
Release: rc1
Release: rc2
# The Group tag should comprise one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Applications/Multimedia
Expand All @@ -39,6 +39,10 @@ Source0: %{url}/archive/%{release}/%{version}/%{name}-%{version}.tar.gz
# https://en.opensuse.org/openSUSE:Packaging_checks#Building_Packages_in_spite_of_errors
Source99: %{name}.rpmlintrc
Requires: sailfishsilica-qt5 >= 0.10.9
Requires: qml(org.nemomobile.mpris)
Requires: qml(org.nemomobile.policy)
Requires: qml(org.nemomobile.thumbnailer)
Requires: qml(com.jolla.mediaplayer)
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
Expand Down Expand Up @@ -68,7 +72,7 @@ Categories:
- Player
- Qt
- Viewer
DeveloperName: Matias Perez (CepiPerez), olf (Olf0)
DeveloperName: Matias Perez (CepiPerez), olf (Olf0), Damien Caliste (dcaliste)
Custom:
Repo: %{url}
PackageIcon: %{url}/raw/master/flowplayer.png
Expand All @@ -85,7 +89,7 @@ Links:
Homepage: https://openrepos.net/content/olf/flowplayer
Help: %{url}/issues
Bugtracker: %{url}/issues
Donation: https://openrepos.net/donate
Donation: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WTLJLQP2CSM7S
%endif

# Define (S)RPM compression sensibly, taking compatibility into account, see
Expand Down
1 change: 1 addition & 0 deletions src/FlowPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ int main(int argc, char *argv[])
window->setTitle("FlowPlayer");

window->engine()->addImportPath("/usr/share/flowplayer/qml");
window->rootContext()->setContextProperty("appVersion", VERSION);

qmlRegisterType<Utils>("FlowPlayer", 1, 0, "Utils");
qmlRegisterType<CoverSearch>("FlowPlayer", 1, 0, "CoverSearch");
Expand Down
4 changes: 4 additions & 0 deletions src/coversearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//#include <QDeclarativeView>
#include <QDebug>
#include <QDir>
#include <QString>
#include <QStringList>
#include <QJsonDocument>
Expand Down Expand Up @@ -39,6 +40,9 @@ CoverSearch::CoverSearchPrivate::CoverSearchPrivate(CoverSearch * parent) : q(pa
//q->pepe = new WebThread();
//connect (q->pepe, SIGNAL(imgLoaded(QString,int)), parent, SLOT(paintImg(QString,int)) );

// Ensure that download destination exists.
QDir d;
d.mkpath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
}

CoverSearch::CoverSearchPrivate::~CoverSearchPrivate()
Expand Down
14 changes: 3 additions & 11 deletions src/loadwebimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ void WebThread::checkAll()
//QString url = "http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=7f338c7458e7d1a9a6204221ff904ba1";

// QUASAR
QString url = "http://coverart.katastrophos.net/index.php?";
url += "&artist="+QUrl::toPercentEncoding(artist)+"&album="+QUrl::toPercentEncoding(album)+"&search=Search";

QString url = "https://coverart.katastrophos.net/query.php?";
url += "&artist="+QUrl::toPercentEncoding(artist)+"&album="+QUrl::toPercentEncoding(album)+"&mode=imageurls&limit=1";


//AMAZON - SIMPLE
Expand Down Expand Up @@ -211,16 +210,9 @@ void WebThread::downloaded(QNetworkReply *respuesta)

QString tmp = datos1;


//QUASAR
if (tmp.contains("<ul title=\"Cover Arts\">"))
if (tmp.startsWith("http"))
{
int x = tmp.indexOf("<li><a href=\"");
tmp.remove(0,x+13);
x = tmp.indexOf("\">");
tmp.remove(x,tmp.length()-x);
tmp = tmp.trimmed();

qDebug() << "Link for" << files[0][0] << files[0][1] << tmp;

downloadImage(tmp);
Expand Down
Loading