Compare commits

..

15 Commits
1.2.8 ... 1.2.9

Author SHA1 Message Date
Jonas Kvinge
3b560e4e4f Release 1.2.9 2025-04-08 23:52:00 +02:00
Jonas Kvinge
9e327c9556 Update Changelog 2025-04-08 23:52:00 +02:00
Jonas Kvinge
1ec640e088 LastFMImport: Fix progress 2025-04-08 23:05:44 +02:00
Jonas Kvinge
463aaf6942 Update Changelog 2025-04-08 21:19:29 +02:00
Jonas Kvinge
71287dd77e Add option to turn off playbin3 2025-04-08 21:19:29 +02:00
dependabot[bot]
b66c0f5573 Bump vmactions/openbsd-vm from 1.1.6 to 1.1.7
Bumps [vmactions/openbsd-vm](https://github.com/vmactions/openbsd-vm) from 1.1.6 to 1.1.7.
- [Release notes](https://github.com/vmactions/openbsd-vm/releases)
- [Commits](https://github.com/vmactions/openbsd-vm/compare/v1.1.6...v1.1.7)

---
updated-dependencies:
- dependency-name: vmactions/openbsd-vm
  dependency-version: 1.1.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 20:53:01 +02:00
Jonas Kvinge
a9f2c384fa RichPresence: Use class for activity 2025-04-08 20:52:34 +02:00
Jonas Kvinge
ae9584c213 Rename is_enabled to enabled 2025-04-08 20:33:54 +02:00
Jonas Kvinge
4db1c5ceb8 AlbumCoverFetcherSearch: Add debug for results 2025-04-08 20:33:27 +02:00
Jonas Kvinge
1738259467 SubsonicBaseRequest: Fix parsing
Fixes #1719
2025-04-08 20:18:54 +02:00
Jonas Kvinge
fcee02edc1 DeezerCoverProvider: Fix parsing
Fixes #1716
2025-04-08 20:04:02 +02:00
dependabot[bot]
4fff5820c5 Bump vmactions/freebsd-vm from 1.1.9 to 1.2.0
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.1.9 to 1.2.0.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v1.1.9...v1.2.0)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 19:32:24 +02:00
Jonas Kvinge
9aa6da2faf Mpris2: Ignore -Warray-bounds 2025-04-05 19:10:28 +02:00
Jonas Kvinge
279934411c Add Ubuntu Plucky 2025-04-05 18:31:08 +02:00
Jonas Kvinge
fd829551e8 Turn on git revision 2025-04-05 18:13:40 +02:00
23 changed files with 113 additions and 47 deletions

View File

@@ -538,7 +538,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'noble', 'oracular' ]
ubuntu_version: [ 'noble', 'oracular', 'plucky' ]
container:
image: ubuntu:${{matrix.ubuntu_version}}
steps:
@@ -631,7 +631,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ubuntu_version: [ 'noble', 'oracular' ]
ubuntu_version: [ 'noble', 'oracular', 'plucky' ]
container:
image: ubuntu:${{matrix.ubuntu_version}}
steps:
@@ -733,7 +733,7 @@ jobs:
submodules: recursive
- name: Build FreeBSD
id: build-freebsd
uses: vmactions/freebsd-vm@v1.1.9
uses: vmactions/freebsd-vm@v1.2.0
with:
usesh: true
mem: 4096
@@ -758,7 +758,7 @@ jobs:
submodules: recursive
- name: Build OpenBSD
id: build-openbsd
uses: vmactions/openbsd-vm@v1.1.6
uses: vmactions/openbsd-vm@v1.1.7
with:
usesh: true
mem: 4096

View File

@@ -2,6 +2,17 @@ Strawberry Music Player
=======================
ChangeLog
Version 1.2.9 (2025.04.08):
Bugfixes:
* Fixed subsonic parse error (#1719).
* Fixed Deezer cover provider parse error (#1716).
* Fixed last.fm import progress.
* (Windows|MinGW) Switched from winpthreads to win32 threads, winpthreads are no longer working with Qt as of version 6.9 (QTBUG-131892).
Enhancements:
* Added option to disable playbin3.
Version 1.2.8 (2025.04.05):
Bugfixes:

View File

@@ -1,6 +1,6 @@
set(STRAWBERRY_VERSION_MAJOR 1)
set(STRAWBERRY_VERSION_MINOR 2)
set(STRAWBERRY_VERSION_PATCH 8)
set(STRAWBERRY_VERSION_PATCH 9)
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
set(INCLUDE_GIT_REVISION OFF)

View File

@@ -51,6 +51,7 @@
</screenshots>
<update_contact>eclipseo@fedoraproject.org</update_contact>
<releases>
<release version="1.2.9" date="2025-04-08"/>
<release version="1.2.8" date="2025-04-05"/>
<release version="1.2.7" date="2025-01-31"/>
<release version="1.2.6" date="2025-01-17"/>

View File

@@ -33,6 +33,7 @@ constexpr char kOutputU[] = "Output";
constexpr char kDevice[] = "device";
constexpr char kDeviceU[] = "Device";
constexpr char kALSAPlugin[] = "alsaplugin";
constexpr char kPlaybin3[] = "playbin3";
constexpr char kExclusiveMode[] = "exclusive_mode";
constexpr char kVolumeControl[] = "volume_control";
constexpr char kChannelsEnabled[] = "channels_enabled";

View File

@@ -98,7 +98,7 @@ void AlbumCoverFetcherSearch::Start(SharedPtr<CoverProviders> cover_providers) {
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
if (!provider->is_enabled()) continue;
if (!provider->enabled()) continue;
// Skip any provider that requires authentication but is not authenticated.
if (provider->authentication_required() && !provider->authenticated()) {
@@ -249,6 +249,8 @@ void AlbumCoverFetcherSearch::ProviderSearchFinished(const int id, const CoverPr
void AlbumCoverFetcherSearch::AllProvidersFinished() {
qLog(Debug) << "Search finished, got" << results_.count() << "results";
if (cancel_requested_) {
return;
}

View File

@@ -41,7 +41,7 @@ class CoverProvider : public JsonBaseRequest {
explicit CoverProvider(const QString &name, const bool enabled, const bool authentication_required, const float quality, const bool batch, const bool allow_missing_album, const SharedPtr<NetworkAccessManager> network, QObject *parent);
QString name() const { return name_; }
bool is_enabled() const { return enabled_; }
bool enabled() const { return enabled_; }
int order() const { return order_; }
float quality() const { return quality_; }
bool batch() const { return batch_; }

View File

@@ -55,7 +55,7 @@ void CoverProviders::ReloadSettings() {
QMap<int, QString> all_providers;
QList<CoverProvider*> old_providers = cover_providers_.keys();
for (CoverProvider *provider : std::as_const(old_providers)) {
if (!provider->is_enabled()) continue;
if (!provider->enabled()) continue;
all_providers.insert(provider->order(), provider->name());
}

View File

@@ -158,16 +158,16 @@ void DeezerCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
}
const QJsonObject &json_object = json_object_result.json_object;
if (!json_object.isEmpty()) {
if (json_object.isEmpty()) {
return;
}
QJsonArray array_data;
if (json_object.contains("data"_L1) && json_object["DATA"_L1].isArray()) {
if (json_object.contains("data"_L1) && json_object["data"_L1].isArray()) {
array_data = json_object["data"_L1].toArray();
}
else if (json_object.contains("DATA"_L1) && json_object["DATA"_L1].isArray()) {
array_data = json_object["data"_L1].toArray();
array_data = json_object["DATA"_L1].toArray();
}
else {
Error(u"Json reply object is missing data."_s, json_object);
@@ -180,23 +180,23 @@ void DeezerCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
QMap<QUrl, CoverProviderSearchResult> cover_results;
int i = 0;
for (const QJsonValue &json_value : std::as_const(array_data)) {
for (const QJsonValue &value_entry : std::as_const(array_data)) {
if (!json_value.isObject()) {
if (!value_entry.isObject()) {
Error(u"Invalid Json reply, data array value is not a object."_s);
continue;
}
const QJsonObject value_object = json_value.toObject();
const QJsonObject object_entry = value_entry.toObject();
QJsonObject object_album;
if (value_object.contains("album"_L1) && value_object["album"_L1].isObject()) { // Song search, so extract the album.
object_album = value_object["album"_L1].toObject();
if (object_entry.contains("album"_L1) && object_entry["album"_L1].isObject()) { // Song search, so extract the album.
object_album = object_entry["album"_L1].toObject();
}
else {
object_album = value_object;
object_album = object_entry;
}
if (!value_object.contains("id"_L1) || !object_album.contains("id"_L1)) {
Error(u"Invalid Json reply, data array value object is missing ID."_s, value_object);
if (!object_entry.contains("id"_L1) || !object_album.contains("id"_L1)) {
Error(u"Invalid Json reply, data array value object is missing ID."_s, object_entry);
continue;
}
@@ -210,11 +210,11 @@ void DeezerCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
continue;
}
if (!json_object.contains("artist"_L1)) {
Error(u"Invalid Json reply, data array value object is missing artist."_s, json_object);
if (!object_entry.contains("artist"_L1)) {
Error(u"Invalid Json reply, data array value object is missing artist."_s, object_entry);
continue;
}
const QJsonValue value_artist = json_object["artist"_L1];
const QJsonValue value_artist = object_entry["artist"_L1];
if (!value_artist.isObject()) {
Error(u"Invalid Json reply, data array value artist is not a object."_s, value_artist);
continue;
@@ -242,12 +242,12 @@ void DeezerCoverProvider::HandleSearchReply(QNetworkReply *reply, const int id)
<< qMakePair(u"cover_big"_s, QSize(500, 500));
for (const QPair<QString, QSize> &cover_size : cover_sizes) {
if (!object_album.contains(cover_size.first)) continue;
QString cover = object_album[cover_size.first].toString();
const QString cover = object_album[cover_size.first].toString();
if (!have_cover) {
have_cover = true;
++i;
}
QUrl url(cover);
const QUrl url(cover);
if (!cover_results.contains(url)) {
cover_result.image_url = url;
cover_result.image_size = cover_size.second;

View File

@@ -49,7 +49,6 @@ RichPresence::RichPresence(const SharedPtr<Player> player,
: QObject(parent),
player_(player),
playlist_manager_(playlist_manager),
activity_({ {}, {}, {}, 0, 0, 0 }),
send_presence_timestamp_(0),
enabled_(false) {

View File

@@ -58,14 +58,17 @@ class RichPresence : public QObject {
const SharedPtr<Player> player_;
const SharedPtr<PlaylistManager> playlist_manager_;
struct {
class Activity {
public:
explicit Activity() : start_timestamp(0), length_secs(0), seek_secs(0) {}
QString title;
QString artist;
QString album;
qint64 start_timestamp;
qint64 length_secs;
qint64 seek_secs;
} activity_;
};
Activity activity_;
qint64 send_presence_timestamp_;
bool enabled_;
};

View File

@@ -46,6 +46,7 @@ using namespace Qt::Literals::StringLiterals;
EngineBase::EngineBase(QObject *parent)
: QObject(parent),
playbin3_enabled_(true),
exclusive_mode_(false),
volume_control_(true),
volume_(100),
@@ -156,6 +157,8 @@ void EngineBase::ReloadSettings() {
device_ = s.value(BackendSettings::kDevice);
}
playbin3_enabled_ = s.value(BackendSettings::kPlaybin3, true).toBool();
exclusive_mode_ = s.value(BackendSettings::kExclusiveMode, false).toBool();
volume_control_ = s.value(BackendSettings::kVolumeControl, true).toBool();

View File

@@ -176,6 +176,7 @@ class EngineBase : public QObject {
void Finished();
protected:
bool playbin3_enabled_;
bool exclusive_mode_;
bool volume_control_;
uint volume_;

View File

@@ -899,6 +899,7 @@ GstEnginePipelinePtr GstEngine::CreatePipeline() {
GstEnginePipelinePtr pipeline = GstEnginePipelinePtr(new GstEnginePipeline);
pipeline->set_output_device(output_, device_);
pipeline->set_playbin3_enabled(playbin3_enabled_);
pipeline->set_exclusive_mode(exclusive_mode_);
pipeline->set_volume_enabled(volume_control_);
pipeline->set_stereo_balancer_enabled(stereo_balancer_enabled_);

View File

@@ -103,6 +103,7 @@ GstEnginePipeline::GstEnginePipeline(QObject *parent)
id_(sId++),
playbin3_support_(false),
volume_full_range_support_(false),
playbin3_enabled_(true),
exclusive_mode_(false),
volume_enabled_(true),
fading_enabled_(false),
@@ -221,6 +222,10 @@ void GstEnginePipeline::set_output_device(const QString &output, const QVariant
}
void GstEnginePipeline::set_playbin3_enabled(const bool playbin3_enabled) {
playbin3_enabled_ = playbin3_enabled;
}
void GstEnginePipeline::set_exclusive_mode(const bool exclusive_mode) {
exclusive_mode_ = exclusive_mode;
}
@@ -450,7 +455,9 @@ bool GstEnginePipeline::InitFromUrl(const QUrl &media_url, const QUrl &stream_ur
end_offset_nanosec_ = end_offset_nanosec;
ebur128_loudness_normalizing_gain_db_ = ebur128_loudness_normalizing_gain_db;
pipeline_ = CreateElement(playbin3_support_ ? u"playbin3"_s : u"playbin"_s, u"pipeline"_s, nullptr, error);
const QString playbin_name = playbin3_support_ && playbin3_enabled_ ? u"playbin3"_s : u"playbin"_s;
qLog(Debug) << "Using" << playbin_name << "for pipeline";
pipeline_ = CreateElement(playbin_name, u"pipeline"_s, nullptr, error);
if (!pipeline_) return false;
pad_added_cb_id_ = CHECKED_GCONNECT(G_OBJECT(pipeline_), "pad-added", &PadAddedCallback, this);

View File

@@ -65,6 +65,7 @@ class GstEnginePipeline : public QObject {
// Call these setters before Init
void set_output_device(const QString &output, const QVariant &device);
void set_playbin3_enabled(const bool playbin3_enabled);
void set_exclusive_mode(const bool exclusive_mode);
void set_volume_enabled(const bool enabled);
void set_stereo_balancer_enabled(const bool enabled);
@@ -219,6 +220,8 @@ class GstEnginePipeline : public QObject {
bool playbin3_support_;
bool volume_full_range_support_;
bool playbin3_enabled_;
// General settings for the pipeline
QString output_;
QVariant device_;

View File

@@ -57,11 +57,20 @@
#include "covermanager/currentalbumcoverloader.h"
#include "covermanager/albumcoverloaderresult.h"
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
#include "mpris2_player.h"
#include "mpris2_playlists.h"
#include "mpris2_root.h"
#include "mpris2_tracklist.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
using namespace Qt::Literals::StringLiterals;
QDBusArgument &operator<<(QDBusArgument &arg, const MprisPlaylist &playlist) {

View File

@@ -60,12 +60,21 @@ using MprisPlaylistList = QList<MprisPlaylist>;
Q_DECLARE_METATYPE(MprisPlaylist)
Q_DECLARE_METATYPE(MprisPlaylistList)
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
struct MaybePlaylist {
bool valid;
MprisPlaylist playlist;
};
Q_DECLARE_METATYPE(MaybePlaylist)
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
QDBusArgument &operator<<(QDBusArgument &arg, const MprisPlaylist &playlist);
const QDBusArgument &operator>>(const QDBusArgument &arg, MprisPlaylist &playlist);

View File

@@ -197,7 +197,7 @@ void LastFMImport::ImportData(const bool lastplayed, const bool playcount) {
void LastFMImport::FlushRequests() {
if (!recent_tracks_requests_.isEmpty()) {
if (!recent_tracks_requests_.isEmpty() && (!playcount_ || (playcount_total_ > 0 || top_tracks_requests_.isEmpty()))) {
SendGetRecentTracksRequest(recent_tracks_requests_.dequeue());
return;
}
@@ -519,8 +519,7 @@ void LastFMImport::GetTopTracksRequestFinished(QNetworkReply *reply, const int p
void LastFMImport::UpdateTotalCheck() {
if ((!playcount_ || playcount_total_ > 0) && (!lastplayed_ || lastplayed_total_ > 0))
Q_EMIT UpdateTotal(lastplayed_total_, playcount_total_);
Q_EMIT UpdateTotal(lastplayed_total_, playcount_total_);
}

View File

@@ -178,6 +178,8 @@ void BackendSettingsPage::Load() {
ui_->checkbox_bs2b->setChecked(s.value(kBS2B, false).toBool());
ui_->checkbox_playbin3->setChecked(s.value(kPlaybin3, true).toBool());
ui_->checkbox_http2->setChecked(s.value(kHTTP2, false).toBool());
ui_->checkbox_strict_ssl->setChecked(s.value(kStrictSSL, false).toBool());
@@ -440,6 +442,8 @@ void BackendSettingsPage::Save() {
s.setValue(kBS2B, ui_->checkbox_bs2b->isChecked());
s.setValue(kPlaybin3, ui_->checkbox_playbin3->isChecked());
s.setValue(kHTTP2, ui_->checkbox_http2->isChecked());
s.setValue(kStrictSSL, ui_->checkbox_strict_ssl->isChecked());

View File

@@ -132,7 +132,7 @@
<item>
<spacer name="spacer_alsaplugin">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -173,7 +173,7 @@
<item>
<spacer name="spacer_exclusive_mode">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -265,7 +265,7 @@
<item>
<spacer name="spacer_channels">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -285,6 +285,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkbox_playbin3">
<property name="text">
<string>Use playbin3 when available</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkbox_http2">
<property name="toolTip">
@@ -379,7 +386,7 @@
<item row="2" column="2">
<spacer name="spacer_buffer_3">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -392,7 +399,7 @@
<item row="1" column="2">
<spacer name="spacer_buffer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -405,7 +412,7 @@
<item row="0" column="2">
<spacer name="spacer_buffer_1">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -429,7 +436,7 @@
<item>
<spacer name="spacer_buffer_defaults">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -545,7 +552,7 @@
<number>600</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sticky_center" stdset="0">
<number>600</number>
@@ -578,7 +585,7 @@
<number>600</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sticky_center" stdset="0">
<number>600</number>
@@ -664,7 +671,7 @@
<number>-230</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sticky_center" stdset="0">
<number>-230</number>
@@ -769,7 +776,7 @@
<item>
<spacer name="spacer_fading_1">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -820,7 +827,7 @@
<item>
<spacer name="spacer_fading_duration_1">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -838,7 +845,7 @@
<item>
<spacer name="spacer_bottom">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -873,6 +880,7 @@
<tabstop>checkbox_channels</tabstop>
<tabstop>spinbox_channels</tabstop>
<tabstop>checkbox_bs2b</tabstop>
<tabstop>checkbox_playbin3</tabstop>
<tabstop>checkbox_http2</tabstop>
<tabstop>checkbox_strict_ssl</tabstop>
<tabstop>spinbox_bufferduration</tabstop>

View File

@@ -107,8 +107,8 @@ void CoversSettingsPage::Load() {
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
QListWidgetItem *item = new QListWidgetItem(ui_->providers);
item->setText(provider->name());
item->setCheckState(provider->is_enabled() ? Qt::Checked : Qt::Unchecked);
item->setForeground(provider->is_enabled() ? palette().color(QPalette::Active, QPalette::Text) : palette().color(QPalette::Disabled, QPalette::Text));
item->setCheckState(provider->enabled() ? Qt::Checked : Qt::Unchecked);
item->setForeground(provider->enabled() ? palette().color(QPalette::Active, QPalette::Text) : palette().color(QPalette::Disabled, QPalette::Text));
}
Settings s;

View File

@@ -158,7 +158,12 @@ JsonBaseRequest::JsonObjectResult SubsonicBaseRequest::ParseJsonObject(QNetworkR
}
}
else {
result.json_object = json_document.object();
if (json_object.contains("subsonic-response"_L1) && json_object["subsonic-response"_L1].isObject()) {
result.json_object = json_object["subsonic-response"_L1].toObject();
}
else {
result.json_object = json_object;
}
}
}
else {