Formatting
This commit is contained in:
2
3rdparty/discord-rpc/discord_connection.h
vendored
2
3rdparty/discord-rpc/discord_connection.h
vendored
@@ -35,7 +35,7 @@ int GetProcessId();
|
|||||||
|
|
||||||
struct BaseConnection {
|
struct BaseConnection {
|
||||||
static BaseConnection *Create();
|
static BaseConnection *Create();
|
||||||
static void Destroy(BaseConnection *&);
|
static void Destroy(BaseConnection*&);
|
||||||
bool isOpen = false;
|
bool isOpen = false;
|
||||||
bool Open();
|
bool Open();
|
||||||
bool Close();
|
bool Close();
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ int GetProcessId() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct BaseConnectionUnix : public BaseConnection {
|
struct BaseConnectionUnix : public BaseConnection {
|
||||||
int sock { -1 };
|
int sock{ -1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
static BaseConnectionUnix Connection;
|
static BaseConnectionUnix Connection;
|
||||||
static sockaddr_un PipeAddr {};
|
static sockaddr_un PipeAddr{};
|
||||||
#ifdef MSG_NOSIGNAL
|
#ifdef MSG_NOSIGNAL
|
||||||
static int MsgFlags = MSG_NOSIGNAL;
|
static int MsgFlags = MSG_NOSIGNAL;
|
||||||
#else
|
#else
|
||||||
@@ -105,7 +105,7 @@ bool BaseConnection::Open() {
|
|||||||
|
|
||||||
bool BaseConnection::Close() {
|
bool BaseConnection::Close() {
|
||||||
|
|
||||||
auto self = reinterpret_cast<BaseConnectionUnix *>(this);
|
auto self = reinterpret_cast<BaseConnectionUnix*>(this);
|
||||||
if (self->sock == -1) {
|
if (self->sock == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
12
3rdparty/discord-rpc/discord_connection_win.cpp
vendored
12
3rdparty/discord-rpc/discord_connection_win.cpp
vendored
@@ -38,7 +38,7 @@ int GetProcessId() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct BaseConnectionWin : public BaseConnection {
|
struct BaseConnectionWin : public BaseConnection {
|
||||||
HANDLE pipe { INVALID_HANDLE_VALUE };
|
HANDLE pipe{ INVALID_HANDLE_VALUE };
|
||||||
};
|
};
|
||||||
|
|
||||||
static BaseConnectionWin Connection;
|
static BaseConnectionWin Connection;
|
||||||
@@ -57,10 +57,10 @@ void BaseConnection::Destroy(BaseConnection *&c) {
|
|||||||
|
|
||||||
bool BaseConnection::Open() {
|
bool BaseConnection::Open() {
|
||||||
|
|
||||||
wchar_t pipeName[] { L"\\\\?\\pipe\\discord-ipc-0" };
|
wchar_t pipeName[]{ L"\\\\?\\pipe\\discord-ipc-0" };
|
||||||
const size_t pipeDigit = sizeof(pipeName) / sizeof(wchar_t) - 2;
|
const size_t pipeDigit = sizeof(pipeName) / sizeof(wchar_t) - 2;
|
||||||
pipeName[pipeDigit] = L'0';
|
pipeName[pipeDigit] = L'0';
|
||||||
auto self = reinterpret_cast<BaseConnectionWin *>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
self->pipe = ::CreateFileW(pipeName, GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
|
self->pipe = ::CreateFileW(pipeName, GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
|
||||||
if (self->pipe != INVALID_HANDLE_VALUE) {
|
if (self->pipe != INVALID_HANDLE_VALUE) {
|
||||||
@@ -88,7 +88,7 @@ bool BaseConnection::Open() {
|
|||||||
|
|
||||||
bool BaseConnection::Close() {
|
bool BaseConnection::Close() {
|
||||||
|
|
||||||
auto self = reinterpret_cast<BaseConnectionWin *>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
::CloseHandle(self->pipe);
|
::CloseHandle(self->pipe);
|
||||||
self->pipe = INVALID_HANDLE_VALUE;
|
self->pipe = INVALID_HANDLE_VALUE;
|
||||||
self->isOpen = false;
|
self->isOpen = false;
|
||||||
@@ -102,7 +102,7 @@ bool BaseConnection::Write(const void *data, size_t length) {
|
|||||||
if (length == 0) {
|
if (length == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
auto self = reinterpret_cast<BaseConnectionWin *>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
assert(self);
|
assert(self);
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return false;
|
return false;
|
||||||
@@ -127,7 +127,7 @@ bool BaseConnection::Read(void *data, size_t length) {
|
|||||||
if (!data) {
|
if (!data) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto self = reinterpret_cast<BaseConnectionWin *>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
assert(self);
|
assert(self);
|
||||||
if (!self) {
|
if (!self) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
6
3rdparty/discord-rpc/discord_msg_queue.h
vendored
6
3rdparty/discord-rpc/discord_msg_queue.h
vendored
@@ -34,9 +34,9 @@ namespace discord_rpc {
|
|||||||
template<typename ElementType, std::size_t QueueSize>
|
template<typename ElementType, std::size_t QueueSize>
|
||||||
class MsgQueue {
|
class MsgQueue {
|
||||||
ElementType queue_[QueueSize];
|
ElementType queue_[QueueSize];
|
||||||
std::atomic_uint nextAdd_ { 0 };
|
std::atomic_uint nextAdd_{ 0 };
|
||||||
std::atomic_uint nextSend_ { 0 };
|
std::atomic_uint nextSend_{ 0 };
|
||||||
std::atomic_uint pendingSends_ { 0 };
|
std::atomic_uint pendingSends_{ 0 };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MsgQueue() {}
|
MsgQueue() {}
|
||||||
|
|||||||
@@ -163,4 +163,3 @@ extern "C" void Discord_Register(const char *applicationId, const char *command)
|
|||||||
Discord_RegisterW(appId, wcommand);
|
Discord_RegisterW(appId, wcommand);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
68
3rdparty/discord-rpc/discord_rpc.cpp
vendored
68
3rdparty/discord-rpc/discord_rpc.cpp
vendored
@@ -40,9 +40,9 @@ static void Discord_UpdateConnection();
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr size_t MaxMessageSize { 16 * 1024 };
|
constexpr size_t MaxMessageSize{ 16 * 1024 };
|
||||||
constexpr size_t MessageQueueSize { 8 };
|
constexpr size_t MessageQueueSize{ 8 };
|
||||||
constexpr size_t JoinQueueSize { 8 };
|
constexpr size_t JoinQueueSize{ 8 };
|
||||||
|
|
||||||
struct QueuedMessage {
|
struct QueuedMessage {
|
||||||
size_t length;
|
size_t length;
|
||||||
@@ -70,24 +70,24 @@ struct User {
|
|||||||
// Rounded way up because I'm paranoid about games breaking from future changes in these sizes
|
// Rounded way up because I'm paranoid about games breaking from future changes in these sizes
|
||||||
};
|
};
|
||||||
|
|
||||||
static RpcConnection *Connection { nullptr };
|
static RpcConnection *Connection{ nullptr };
|
||||||
static DiscordEventHandlers QueuedHandlers {};
|
static DiscordEventHandlers QueuedHandlers{};
|
||||||
static DiscordEventHandlers Handlers {};
|
static DiscordEventHandlers Handlers{};
|
||||||
static std::atomic_bool WasJustConnected { false };
|
static std::atomic_bool WasJustConnected{ false };
|
||||||
static std::atomic_bool WasJustDisconnected { false };
|
static std::atomic_bool WasJustDisconnected{ false };
|
||||||
static std::atomic_bool GotErrorMessage { false };
|
static std::atomic_bool GotErrorMessage{ false };
|
||||||
static std::atomic_bool WasJoinGame { false };
|
static std::atomic_bool WasJoinGame{ false };
|
||||||
static std::atomic_bool WasSpectateGame { false };
|
static std::atomic_bool WasSpectateGame{ false };
|
||||||
static std::atomic_bool UpdatePresence { false };
|
static std::atomic_bool UpdatePresence{ false };
|
||||||
static char JoinGameSecret[256];
|
static char JoinGameSecret[256];
|
||||||
static char SpectateGameSecret[256];
|
static char SpectateGameSecret[256];
|
||||||
static int LastErrorCode { 0 };
|
static int LastErrorCode{ 0 };
|
||||||
static char LastErrorMessage[256];
|
static char LastErrorMessage[256];
|
||||||
static int LastDisconnectErrorCode { 0 };
|
static int LastDisconnectErrorCode{ 0 };
|
||||||
static char LastDisconnectErrorMessage[256];
|
static char LastDisconnectErrorMessage[256];
|
||||||
static std::mutex PresenceMutex;
|
static std::mutex PresenceMutex;
|
||||||
static std::mutex HandlerMutex;
|
static std::mutex HandlerMutex;
|
||||||
static QueuedMessage QueuedPresence {};
|
static QueuedMessage QueuedPresence{};
|
||||||
static MsgQueue<QueuedMessage, MessageQueueSize> SendQueue;
|
static MsgQueue<QueuedMessage, MessageQueueSize> SendQueue;
|
||||||
static MsgQueue<User, JoinQueueSize> JoinAskQueue;
|
static MsgQueue<User, JoinQueueSize> JoinAskQueue;
|
||||||
static User connectedUser;
|
static User connectedUser;
|
||||||
@@ -95,12 +95,12 @@ static User connectedUser;
|
|||||||
// We want to auto connect, and retry on failure, but not as fast as possible. This does expoential backoff from 0.5 seconds to 1 minute
|
// We want to auto connect, and retry on failure, but not as fast as possible. This does expoential backoff from 0.5 seconds to 1 minute
|
||||||
static Backoff ReconnectTimeMs(500, 60 * 1000);
|
static Backoff ReconnectTimeMs(500, 60 * 1000);
|
||||||
static auto NextConnect = std::chrono::system_clock::now();
|
static auto NextConnect = std::chrono::system_clock::now();
|
||||||
static int Pid { 0 };
|
static int Pid{ 0 };
|
||||||
static int Nonce { 1 };
|
static int Nonce{ 1 };
|
||||||
|
|
||||||
class IoThreadHolder {
|
class IoThreadHolder {
|
||||||
private:
|
private:
|
||||||
std::atomic_bool keepRunning { true };
|
std::atomic_bool keepRunning{ true };
|
||||||
std::mutex waitForIOMutex;
|
std::mutex waitForIOMutex;
|
||||||
std::condition_variable waitForIOActivity;
|
std::condition_variable waitForIOActivity;
|
||||||
std::thread ioThread;
|
std::thread ioThread;
|
||||||
@@ -109,14 +109,14 @@ class IoThreadHolder {
|
|||||||
void Start() {
|
void Start() {
|
||||||
keepRunning.store(true);
|
keepRunning.store(true);
|
||||||
ioThread = std::thread([&]() {
|
ioThread = std::thread([&]() {
|
||||||
const std::chrono::duration<int64_t, std::milli> maxWait { 500LL };
|
const std::chrono::duration<int64_t, std::milli> maxWait { 500LL };
|
||||||
Discord_UpdateConnection();
|
|
||||||
while (keepRunning.load()) {
|
|
||||||
std::unique_lock<std::mutex> lock(waitForIOMutex);
|
|
||||||
waitForIOActivity.wait_for(lock, maxWait);
|
|
||||||
Discord_UpdateConnection();
|
Discord_UpdateConnection();
|
||||||
}
|
while (keepRunning.load()) {
|
||||||
});
|
std::unique_lock<std::mutex> lock(waitForIOMutex);
|
||||||
|
waitForIOActivity.wait_for(lock, maxWait);
|
||||||
|
Discord_UpdateConnection();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notify() { waitForIOActivity.notify_all(); }
|
void Notify() { waitForIOActivity.notify_all(); }
|
||||||
@@ -132,7 +132,7 @@ class IoThreadHolder {
|
|||||||
~IoThreadHolder() { Stop(); }
|
~IoThreadHolder() { Stop(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
static IoThreadHolder *IoThread { nullptr };
|
static IoThreadHolder *IoThread{ nullptr };
|
||||||
|
|
||||||
static void UpdateReconnectTime() {
|
static void UpdateReconnectTime() {
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ extern "C" void Discord_RunCallbacks() {
|
|||||||
if (WasJustConnected.exchange(false)) {
|
if (WasJustConnected.exchange(false)) {
|
||||||
std::lock_guard<std::mutex> guard(HandlerMutex);
|
std::lock_guard<std::mutex> guard(HandlerMutex);
|
||||||
if (Handlers.ready) {
|
if (Handlers.ready) {
|
||||||
DiscordUser du { connectedUser.userId, connectedUser.username, connectedUser.discriminator, connectedUser.avatar };
|
DiscordUser du{ connectedUser.userId, connectedUser.username, connectedUser.discriminator, connectedUser.avatar };
|
||||||
Handlers.ready(&du);
|
Handlers.ready(&du);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -465,7 +465,7 @@ extern "C" void Discord_RunCallbacks() {
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> guard(HandlerMutex);
|
std::lock_guard<std::mutex> guard(HandlerMutex);
|
||||||
if (Handlers.joinRequest) {
|
if (Handlers.joinRequest) {
|
||||||
DiscordUser du { req->userId, req->username, req->discriminator, req->avatar };
|
DiscordUser du{ req->userId, req->username, req->discriminator, req->avatar };
|
||||||
Handlers.joinRequest(&du);
|
Handlers.joinRequest(&du);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -486,12 +486,12 @@ extern "C" void Discord_UpdateHandlers(DiscordEventHandlers *newHandlers) {
|
|||||||
|
|
||||||
if (newHandlers) {
|
if (newHandlers) {
|
||||||
#define HANDLE_EVENT_REGISTRATION(handler_name, event) \
|
#define HANDLE_EVENT_REGISTRATION(handler_name, event) \
|
||||||
if (!Handlers.handler_name && newHandlers->handler_name) { \
|
if (!Handlers.handler_name && newHandlers->handler_name) { \
|
||||||
RegisterForEvent(event); \
|
RegisterForEvent(event); \
|
||||||
} \
|
} \
|
||||||
else if (Handlers.handler_name && !newHandlers->handler_name) { \
|
else if (Handlers.handler_name && !newHandlers->handler_name) { \
|
||||||
DeregisterForEvent(event); \
|
DeregisterForEvent(event); \
|
||||||
}
|
}
|
||||||
|
|
||||||
std::lock_guard<std::mutex> guard(HandlerMutex);
|
std::lock_guard<std::mutex> guard(HandlerMutex);
|
||||||
HANDLE_EVENT_REGISTRATION(joinGame, "ACTIVITY_JOIN")
|
HANDLE_EVENT_REGISTRATION(joinGame, "ACTIVITY_JOIN")
|
||||||
|
|||||||
12
3rdparty/discord-rpc/discord_rpc_connection.h
vendored
12
3rdparty/discord-rpc/discord_rpc_connection.h
vendored
@@ -63,17 +63,17 @@ struct RpcConnection {
|
|||||||
Connected,
|
Connected,
|
||||||
};
|
};
|
||||||
|
|
||||||
BaseConnection *connection { nullptr };
|
BaseConnection *connection{ nullptr };
|
||||||
State state { State::Disconnected };
|
State state{ State::Disconnected };
|
||||||
void (*onConnect)(JsonDocument &message) { nullptr };
|
void (*onConnect)(JsonDocument &message) { nullptr };
|
||||||
void (*onDisconnect)(int errorCode, const char *message) { nullptr };
|
void (*onDisconnect)(int errorCode, const char *message) { nullptr };
|
||||||
char appId[64] {};
|
char appId[64]{};
|
||||||
int lastErrorCode { 0 };
|
int lastErrorCode{ 0 };
|
||||||
char lastErrorMessage[256] {};
|
char lastErrorMessage[256]{};
|
||||||
RpcConnection::MessageFrame sendFrame;
|
RpcConnection::MessageFrame sendFrame;
|
||||||
|
|
||||||
static RpcConnection *Create(const char *applicationId);
|
static RpcConnection *Create(const char *applicationId);
|
||||||
static void Destroy(RpcConnection *&);
|
static void Destroy(RpcConnection*&);
|
||||||
|
|
||||||
inline bool IsOpen() const { return state == State::Connected; }
|
inline bool IsOpen() const { return state == State::Connected; }
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ANALYZERBASE_H
|
#ifndef ANALYZERBASE_H
|
||||||
#define ANALYZERBASE_H
|
#define ANALYZERBASE_H
|
||||||
@@ -90,4 +90,3 @@ class AnalyzerBase : public QWidget {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // ANALYZERBASE_H
|
#endif // ANALYZERBASE_H
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ANALYZERCONTAINER_H
|
#ifndef ANALYZERCONTAINER_H
|
||||||
#define ANALYZERCONTAINER_H
|
#define ANALYZERCONTAINER_H
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "blockanalyzer.h"
|
#include "blockanalyzer.h"
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ BlockAnalyzer::BlockAnalyzer(QWidget *parent)
|
|||||||
fade_intensity_(1 << 8, 32),
|
fade_intensity_(1 << 8, 32),
|
||||||
step_(0) {
|
step_(0) {
|
||||||
|
|
||||||
setMinimumSize(kMinColumns * (kWidth + 1) - 1, kMinRows * (kHeight + 1) - 1); //-1 is padding, no drawing takes place there
|
setMinimumSize(kMinColumns * (kWidth + 1) - 1, kMinRows * (kHeight + 1) - 1); // -1 is padding, no drawing takes place there
|
||||||
setMaximumWidth(kMaxColumns * (kWidth + 1) - 1);
|
setMaximumWidth(kMaxColumns * (kWidth + 1) - 1);
|
||||||
|
|
||||||
// mxcl says null pixmaps cause crashes, so let's play it safe
|
// mxcl says null pixmaps cause crashes, so let's play it safe
|
||||||
@@ -237,7 +237,7 @@ static inline void adjustToLimits(const int b, int &f, int &amount) {
|
|||||||
* Clever contrast function
|
* Clever contrast function
|
||||||
*
|
*
|
||||||
* It will try to adjust the foreground color such that it contrasts well with
|
* It will try to adjust the foreground color such that it contrasts well with
|
||||||
*the background
|
* the background
|
||||||
* It won't modify the hue of fg unless absolutely necessary
|
* It won't modify the hue of fg unless absolutely necessary
|
||||||
* @return the adjusted form of fg
|
* @return the adjusted form of fg
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BLOCKANALYZER_H
|
#ifndef BLOCKANALYZER_H
|
||||||
#define BLOCKANALYZER_H
|
#define BLOCKANALYZER_H
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "boomanalyzer.h"
|
#include "boomanalyzer.h"
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ void BoomAnalyzer::analyze(QPainter &p, const Scope &scope, const bool new_frame
|
|||||||
bar_height_[i] = std::max(0.0, bar_height_[i]);
|
bar_height_[i] = std::max(0.0, bar_height_[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
peak_handling:
|
peak_handling:
|
||||||
|
|
||||||
if (peak_height_[i] > 0.0) {
|
if (peak_height_[i] > 0.0) {
|
||||||
peak_height_[i] -= peak_speed_[i];
|
peak_height_[i] -= peak_speed_[i];
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BOOMANALYZER_H
|
#ifndef BOOMANALYZER_H
|
||||||
#define BOOMANALYZER_H
|
#define BOOMANALYZER_H
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fht.h"
|
#include "fht.h"
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FHT_H
|
#ifndef FHT_H
|
||||||
#define FHT_H
|
#define FHT_H
|
||||||
@@ -59,10 +59,10 @@ class FHT {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Prepare transform for data sets with @f$2^n@f$ numbers, whereby @f$n@f$
|
* Prepare transform for data sets with @f$2^n@f$ numbers, whereby @f$n@f$
|
||||||
* should be at least 3. Values of more than 3 need a trigonometry table.
|
* should be at least 3. Values of more than 3 need a trigonometry table.
|
||||||
* @see makeCasTable()
|
* @see makeCasTable()
|
||||||
*/
|
*/
|
||||||
explicit FHT(uint);
|
explicit FHT(uint);
|
||||||
|
|
||||||
~FHT();
|
~FHT();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rainbowanalyzer.h"
|
#include "rainbowanalyzer.h"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RAINBOWANALYZER_H
|
#ifndef RAINBOWANALYZER_H
|
||||||
#define RAINBOWANALYZER_H
|
#define RAINBOWANALYZER_H
|
||||||
@@ -85,7 +85,7 @@ class RainbowAnalyzer : public AnalyzerBase {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// "constants" that get initialized in the constructor
|
// "constants" that get initialized in the constructor
|
||||||
float band_scale_[kRainbowBands] {};
|
float band_scale_[kRainbowBands]{};
|
||||||
QPen colors_[kRainbowBands];
|
QPen colors_[kRainbowBands];
|
||||||
|
|
||||||
// Rainbow Nyancat & Dash
|
// Rainbow Nyancat & Dash
|
||||||
@@ -96,7 +96,7 @@ class RainbowAnalyzer : public AnalyzerBase {
|
|||||||
int frame_;
|
int frame_;
|
||||||
|
|
||||||
// The y positions of each point on the rainbow.
|
// The y positions of each point on the rainbow.
|
||||||
float history_[kHistorySize * kRainbowBands] {};
|
float history_[kHistorySize * kRainbowBands]{};
|
||||||
|
|
||||||
// A cache of the last frame's rainbow,
|
// A cache of the last frame's rainbow,
|
||||||
// so it can be used in the next frame.
|
// so it can be used in the next frame.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SONOGRAMANALYZER_H
|
#ifndef SONOGRAMANALYZER_H
|
||||||
#define SONOGRAMANALYZER_H
|
#define SONOGRAMANALYZER_H
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ void TurbineAnalyzer::analyze(QPainter &p, const Scope &scope, const bool new_fr
|
|||||||
bar_height_[i] = std::max(0.0, bar_height_[i]);
|
bar_height_[i] = std::max(0.0, bar_height_[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
peak_handling:
|
peak_handling:
|
||||||
if (peak_height_[i] > 0.0) {
|
if (peak_height_[i] > 0.0) {
|
||||||
peak_height_[i] -= peak_speed_[i];
|
peak_height_[i] -= peak_speed_[i];
|
||||||
peak_speed_[i] *= F_peakSpeed_; // 1.12
|
peak_speed_[i] *= F_peakSpeed_; // 1.12
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TURBINEANALYZER_H
|
#ifndef TURBINEANALYZER_H
|
||||||
#define TURBINEANALYZER_H
|
#define TURBINEANALYZER_H
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|||||||
@@ -331,4 +331,3 @@ class CollectionBackend : public CollectionBackendInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // COLLECTIONBACKEND_H
|
#endif // COLLECTIONBACKEND_H
|
||||||
|
|
||||||
|
|||||||
@@ -135,4 +135,3 @@ class CollectionFilterWidget : public QWidget {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // COLLECTIONFILTERWIDGET_H
|
#endif // COLLECTIONFILTERWIDGET_H
|
||||||
|
|
||||||
|
|||||||
@@ -58,4 +58,3 @@ class CollectionPlaylistItem : public PlaylistItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // COLLECTIONPLAYLISTITEM_H
|
#endif // COLLECTIONPLAYLISTITEM_H
|
||||||
|
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ void CollectionQuery::AddCompilationRequirement(const bool compilation) {
|
|||||||
QString CollectionQuery::GetInnerQuery() const {
|
QString CollectionQuery::GetInnerQuery() const {
|
||||||
return duplicates_only_
|
return duplicates_only_
|
||||||
? QStringLiteral(" INNER JOIN (select * from duplicated_songs) dsongs "
|
? QStringLiteral(" INNER JOIN (select * from duplicated_songs) dsongs "
|
||||||
"ON (%songs_table.artist = dsongs.dup_artist "
|
"ON (%songs_table.artist = dsongs.dup_artist "
|
||||||
"AND %songs_table.album = dsongs.dup_album "
|
"AND %songs_table.album = dsongs.dup_album "
|
||||||
"AND %songs_table.title = dsongs.dup_title) ")
|
"AND %songs_table.title = dsongs.dup_title) ")
|
||||||
: QString();
|
: QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef APPEARANCESETTINGS_H
|
#ifndef APPEARANCESETTINGS_H
|
||||||
#define APPEARANCESETTINGS_H
|
#define APPEARANCESETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BACKENDSETTINGS_H
|
#ifndef BACKENDSETTINGS_H
|
||||||
#define BACKENDSETTINGS_H
|
#define BACKENDSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BEHAVIOURSETTINGS_H
|
#ifndef BEHAVIOURSETTINGS_H
|
||||||
#define BEHAVIOURSETTINGS_H
|
#define BEHAVIOURSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024-2025, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024-2025, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COLLECTIONSETTINGS_H
|
#ifndef COLLECTIONSETTINGS_H
|
||||||
#define COLLECTIONSETTINGS_H
|
#define COLLECTIONSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONTEXTSETTINGS_H
|
#ifndef CONTEXTSETTINGS_H
|
||||||
#define CONTEXTSETTINGS_H
|
#define CONTEXTSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVERSSETTINGS_H
|
#ifndef COVERSSETTINGS_H
|
||||||
#define COVERSSETTINGS_H
|
#define COVERSSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FILEFILTERCONSTANTS_H
|
#ifndef FILEFILTERCONSTANTS_H
|
||||||
#define FILEFILTERCONSTANTS_H
|
#define FILEFILTERCONSTANTS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FILENAMECONSTANTS_H
|
#ifndef FILENAMECONSTANTS_H
|
||||||
#define FILENAMECONSTANTS_H
|
#define FILENAMECONSTANTS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2025, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2025, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef FILESYSTEMCONSTANTS_H
|
#ifndef FILESYSTEMCONSTANTS_H
|
||||||
#define FILESYSTEMCONSTANTS_H
|
#define FILESYSTEMCONSTANTS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GLOBALSHORTCUTSSETTINGS_H
|
#ifndef GLOBALSHORTCUTSSETTINGS_H
|
||||||
#define GLOBALSHORTCUTSSETTINGS_H
|
#define GLOBALSHORTCUTSSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LYRICSSETTINGS_H
|
#ifndef LYRICSSETTINGS_H
|
||||||
#define LYRICSSETTINGS_H
|
#define LYRICSSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAINWINDOWSETTINGS_H
|
#ifndef MAINWINDOWSETTINGS_H
|
||||||
#define MAINWINDOWSETTINGS_H
|
#define MAINWINDOWSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MOODBARSETTINGS_H
|
#ifndef MOODBARSETTINGS_H
|
||||||
#define MOODBARSETTINGS_H
|
#define MOODBARSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NETWORKPROXYSETTINGS_H
|
#ifndef NETWORKPROXYSETTINGS_H
|
||||||
#define NETWORKPROXYSETTINGS_H
|
#define NETWORKPROXYSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NOTIFICATIONSSETTINGS_H
|
#ifndef NOTIFICATIONSSETTINGS_H
|
||||||
#define NOTIFICATIONSSETTINGS_H
|
#define NOTIFICATIONSSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PLAYLISTSETTINGS_H
|
#ifndef PLAYLISTSETTINGS_H
|
||||||
#define PLAYLISTSETTINGS_H
|
#define PLAYLISTSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef QOBUZSETTINGS_H
|
#ifndef QOBUZSETTINGS_H
|
||||||
#define QOBUZSETTINGS_H
|
#define QOBUZSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SCROBBLERSETTINGS_H
|
#ifndef SCROBBLERSETTINGS_H
|
||||||
#define SCROBBLERSETTINGS_H
|
#define SCROBBLERSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SPOTIFYSETTINGS_H
|
#ifndef SPOTIFYSETTINGS_H
|
||||||
#define SPOTIFYSETTINGS_H
|
#define SPOTIFYSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef SUBSONICETTINGS_H
|
#ifndef SUBSONICETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TIDALSETTINGS_H
|
#ifndef TIDALSETTINGS_H
|
||||||
#define TIDALSETTINGS_H
|
#define TIDALSETTINGS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it wiLL be useful,
|
* Strawberry is distributed in the hope that it wiLL be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TIMECONSTANTS_H
|
#ifndef TIMECONSTANTS_H
|
||||||
#define TIMECONSTANTS_H
|
#define TIMECONSTANTS_H
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2024, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it wiLL be useful,
|
* Strawberry is distributed in the hope that it wiLL be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef TRANSCODERSETTINGS_H
|
#ifndef TRANSCODERSETTINGS_H
|
||||||
@@ -26,4 +26,3 @@ constexpr char kSettingsGroup[] = "Transcoder";
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // TRANSCODERSETTINGS_H
|
#endif // TRANSCODERSETTINGS_H
|
||||||
|
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ using namespace std::chrono_literals;
|
|||||||
|
|
||||||
class ApplicationImpl {
|
class ApplicationImpl {
|
||||||
public:
|
public:
|
||||||
explicit ApplicationImpl(Application *app) :
|
explicit ApplicationImpl(Application *app)
|
||||||
tagreader_client_([app](){
|
: tagreader_client_([app](){
|
||||||
TagReaderClient *client = new TagReaderClient();
|
TagReaderClient *client = new TagReaderClient();
|
||||||
app->MoveToNewThread(client);
|
app->MoveToNewThread(client);
|
||||||
return client;
|
return client;
|
||||||
@@ -264,7 +264,7 @@ Application::Application(QObject *parent)
|
|||||||
|
|
||||||
Application::~Application() {
|
Application::~Application() {
|
||||||
|
|
||||||
qLog(Debug) << "Terminating application";
|
qLog(Debug) << "Terminating application";
|
||||||
|
|
||||||
for (QThread *thread : std::as_const(threads_)) {
|
for (QThread *thread : std::as_const(threads_)) {
|
||||||
thread->quit();
|
thread->quit();
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ constexpr char kMagicAllSongsTables[] = "%allsongstables";
|
|||||||
int Database::sNextConnectionId = 1;
|
int Database::sNextConnectionId = 1;
|
||||||
QMutex Database::sNextConnectionIdMutex;
|
QMutex Database::sNextConnectionIdMutex;
|
||||||
|
|
||||||
Database::Database(SharedPtr<TaskManager> task_manager, QObject *parent, const QString &database_name) :
|
Database::Database(SharedPtr<TaskManager> task_manager, QObject *parent, const QString &database_name)
|
||||||
QObject(parent),
|
: QObject(parent),
|
||||||
task_manager_(task_manager),
|
task_manager_(task_manager),
|
||||||
injected_database_name_(database_name),
|
injected_database_name_(database_name),
|
||||||
query_hash_(0),
|
query_hash_(0),
|
||||||
@@ -134,7 +134,7 @@ QSqlDatabase Database::Connect() {
|
|||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
db.setConnectOptions(u"QSQLITE_BUSY_TIMEOUT=30000"_s);
|
db.setConnectOptions(u"QSQLITE_BUSY_TIMEOUT=30000"_s);
|
||||||
//qLog(Debug) << "Opened database with connection id" << connection_id;
|
// qLog(Debug) << "Opened database with connection id" << connection_id;
|
||||||
|
|
||||||
if (injected_database_name_.isNull()) {
|
if (injected_database_name_.isNull()) {
|
||||||
db.setDatabaseName(directory_ + u'/' + QLatin1String(kDatabaseFilename));
|
db.setDatabaseName(directory_ + u'/' + QLatin1String(kDatabaseFilename));
|
||||||
@@ -210,7 +210,7 @@ void Database::Close() {
|
|||||||
QSqlDatabase db = QSqlDatabase::database(connection_id);
|
QSqlDatabase db = QSqlDatabase::database(connection_id);
|
||||||
if (db.isOpen()) {
|
if (db.isOpen()) {
|
||||||
db.close();
|
db.close();
|
||||||
//qLog(Debug) << "Closed database with connection id" << connection_id;
|
// qLog(Debug) << "Closed database with connection id" << connection_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QSqlDatabase::removeDatabase(connection_id);
|
QSqlDatabase::removeDatabase(connection_id);
|
||||||
@@ -594,8 +594,7 @@ void Database::BackupFile(const QString &filename) {
|
|||||||
ret = sqlite3_backup_step(backup, 16);
|
ret = sqlite3_backup_step(backup, 16);
|
||||||
const int page_count = sqlite3_backup_pagecount(backup);
|
const int page_count = sqlite3_backup_pagecount(backup);
|
||||||
task_manager_->SetTaskProgress(task_id, static_cast<quint64>(page_count - sqlite3_backup_remaining(backup)), static_cast<quint64>(page_count));
|
task_manager_->SetTaskProgress(task_id, static_cast<quint64>(page_count - sqlite3_backup_remaining(backup)), static_cast<quint64>(page_count));
|
||||||
}
|
} while (ret == SQLITE_OK);
|
||||||
while (ret == SQLITE_OK);
|
|
||||||
|
|
||||||
if (ret != SQLITE_DONE) {
|
if (ret != SQLITE_DONE) {
|
||||||
qLog(Error) << "Database backup failed";
|
qLog(Error) << "Database backup failed";
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "enginemetadata.h"
|
#include "enginemetadata.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ENGINEMETADATA_H
|
#ifndef ENGINEMETADATA_H
|
||||||
#define ENGINEMETADATA_H
|
#define ENGINEMETADATA_H
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ QNetworkReply *HttpBaseRequest::CreateGetRequest(const QUrl &url, const QUrlQuer
|
|||||||
QObject::connect(reply, &QNetworkReply::sslErrors, this, &HttpBaseRequest::HandleSSLErrors);
|
QObject::connect(reply, &QNetworkReply::sslErrors, this, &HttpBaseRequest::HandleSSLErrors);
|
||||||
replies_ << reply;
|
replies_ << reply;
|
||||||
|
|
||||||
//qLog(Debug) << service_name() << "Sending get request" << request_url;
|
// qLog(Debug) << service_name() << "Sending get request" << request_url;
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ QNetworkReply *HttpBaseRequest::CreatePostRequest(const QUrl &url, const QByteAr
|
|||||||
QObject::connect(reply, &QNetworkReply::sslErrors, this, &HttpBaseRequest::HandleSSLErrors);
|
QObject::connect(reply, &QNetworkReply::sslErrors, this, &HttpBaseRequest::HandleSSLErrors);
|
||||||
replies_ << reply;
|
replies_ << reply;
|
||||||
|
|
||||||
//qLog(Debug) << service_name() << "Sending post request" << url << data;
|
// qLog(Debug) << service_name() << "Sending post request" << url << data;
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
|
|
||||||
|
|||||||
@@ -155,11 +155,7 @@ void LocalRedirectServer::WriteTemplate() const {
|
|||||||
|
|
||||||
QBuffer image_buffer;
|
QBuffer image_buffer;
|
||||||
if (image_buffer.open(QIODevice::ReadWrite)) {
|
if (image_buffer.open(QIODevice::ReadWrite)) {
|
||||||
QApplication::style()
|
QApplication::style()->standardIcon(QStyle::SP_DialogOkButton).pixmap(16).toImage().save(&image_buffer, "PNG");
|
||||||
->standardIcon(QStyle::SP_DialogOkButton)
|
|
||||||
.pixmap(16)
|
|
||||||
.toImage()
|
|
||||||
.save(&image_buffer, "PNG");
|
|
||||||
page_data.replace("@IMAGE_DATA@"_L1, QString::fromUtf8(image_buffer.data().toBase64()));
|
page_data.replace("@IMAGE_DATA@"_L1, QString::fromUtf8(image_buffer.data().toBase64()));
|
||||||
image_buffer.close();
|
image_buffer.close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
@@ -257,7 +257,7 @@ static QString ParsePrettyFunction(const char *pretty_function) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
static T CreateLogger(Level level, const QString &class_name, int line, const char *category) {
|
static T CreateLogger(Level level, const QString &class_name, int line, const char *category) {
|
||||||
|
|
||||||
// Map the level to a string
|
// Map the level to a string
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LOGGING_H
|
#ifndef LOGGING_H
|
||||||
#define LOGGING_H
|
#define LOGGING_H
|
||||||
@@ -67,10 +67,10 @@ enum Level {
|
|||||||
Level_Debug,
|
Level_Debug,
|
||||||
};
|
};
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void SetLevels(const QString &levels);
|
void SetLevels(const QString &levels);
|
||||||
|
|
||||||
void DumpStackTrace();
|
void DumpStackTrace();
|
||||||
|
|
||||||
QDebug CreateLoggerFatal(const int line, const char *pretty_function, const char *category);
|
QDebug CreateLoggerFatal(const int line, const char *pretty_function, const char *category);
|
||||||
QDebug CreateLoggerError(const int line, const char *pretty_function, const char *category);
|
QDebug CreateLoggerError(const int line, const char *pretty_function, const char *category);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
using namespace Qt::Literals::StringLiterals;
|
using namespace Qt::Literals::StringLiterals;
|
||||||
|
|
||||||
MemoryDatabase::MemoryDatabase(SharedPtr<TaskManager> task_manager, QObject *parent)
|
MemoryDatabase::MemoryDatabase(SharedPtr<TaskManager> task_manager, QObject *parent)
|
||||||
: Database(task_manager, parent, u":memory:"_s) {}
|
: Database(task_manager, parent, u":memory:"_s) {}
|
||||||
|
|
||||||
MemoryDatabase::~MemoryDatabase() {
|
MemoryDatabase::~MemoryDatabase() {
|
||||||
// Make sure Qt doesn't reuse the same database
|
// Make sure Qt doesn't reuse the same database
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
#include "mimedata.h"
|
#include "mimedata.h"
|
||||||
|
|
||||||
MimeData::MimeData(const bool clear, const bool play_now, const bool enqueue, const bool enqueue_next_now, const bool open_in_new_playlist, QObject *parent)
|
MimeData::MimeData(const bool clear, const bool play_now, const bool enqueue, const bool enqueue_next_now, const bool open_in_new_playlist, QObject *parent)
|
||||||
: override_user_settings_(false),
|
: override_user_settings_(false),
|
||||||
clear_first_(clear),
|
clear_first_(clear),
|
||||||
play_now_(play_now),
|
play_now_(play_now),
|
||||||
enqueue_now_(enqueue),
|
enqueue_now_(enqueue),
|
||||||
enqueue_next_now_(enqueue_next_now),
|
enqueue_next_now_(enqueue_next_now),
|
||||||
open_in_new_playlist_(open_in_new_playlist),
|
open_in_new_playlist_(open_in_new_playlist),
|
||||||
from_doubleclick_(false) {
|
from_doubleclick_(false) {
|
||||||
|
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class MusicStorage {
|
|||||||
Transcode_Unsupported = 3,
|
Transcode_Unsupported = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
using ProgressFunction = std::function<void(float progress)>;
|
using ProgressFunction = std::function<void (float progress)>;
|
||||||
|
|
||||||
struct CopyJob {
|
struct CopyJob {
|
||||||
CopyJob() : overwrite_(false), remove_original_(false), albumcover_(false) {}
|
CopyJob() : overwrite_(false), remove_original_(false), albumcover_(false) {}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ScopedNSAutoreleasePool {
|
|||||||
// no longer needed.
|
// no longer needed.
|
||||||
void Recycle();
|
void Recycle();
|
||||||
private:
|
private:
|
||||||
NSAutoreleasePool* autorelease_pool_;
|
NSAutoreleasePool *autorelease_pool_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(ScopedNSAutoreleasePool);
|
Q_DISABLE_COPY(ScopedNSAutoreleasePool);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ QModelIndex SimpleTreeModel<T>::ItemToIndex(T *item) const {
|
|||||||
return createIndex(item->row, 0, item);
|
return createIndex(item->row, 0, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template<typename T>
|
||||||
int SimpleTreeModel<T>::columnCount(const QModelIndex&) const {
|
int SimpleTreeModel<T>::columnCount(const QModelIndex&) const {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -720,17 +720,17 @@ bool Song::write_tags_supported() const {
|
|||||||
bool Song::additional_tags_supported() const {
|
bool Song::additional_tags_supported() const {
|
||||||
|
|
||||||
return d->filetype_ == FileType::FLAC ||
|
return d->filetype_ == FileType::FLAC ||
|
||||||
d->filetype_ == FileType::WavPack ||
|
d->filetype_ == FileType::WavPack ||
|
||||||
d->filetype_ == FileType::OggFlac ||
|
d->filetype_ == FileType::OggFlac ||
|
||||||
d->filetype_ == FileType::OggVorbis ||
|
d->filetype_ == FileType::OggVorbis ||
|
||||||
d->filetype_ == FileType::OggOpus ||
|
d->filetype_ == FileType::OggOpus ||
|
||||||
d->filetype_ == FileType::OggSpeex ||
|
d->filetype_ == FileType::OggSpeex ||
|
||||||
d->filetype_ == FileType::MPEG ||
|
d->filetype_ == FileType::MPEG ||
|
||||||
d->filetype_ == FileType::MP4 ||
|
d->filetype_ == FileType::MP4 ||
|
||||||
d->filetype_ == FileType::MPC ||
|
d->filetype_ == FileType::MPC ||
|
||||||
d->filetype_ == FileType::APE ||
|
d->filetype_ == FileType::APE ||
|
||||||
d->filetype_ == FileType::WAV ||
|
d->filetype_ == FileType::WAV ||
|
||||||
d->filetype_ == FileType::AIFF;
|
d->filetype_ == FileType::AIFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -745,16 +745,16 @@ bool Song::composer_supported() const {
|
|||||||
bool Song::performer_supported() const {
|
bool Song::performer_supported() const {
|
||||||
|
|
||||||
return d->filetype_ == FileType::FLAC ||
|
return d->filetype_ == FileType::FLAC ||
|
||||||
d->filetype_ == FileType::WavPack ||
|
d->filetype_ == FileType::WavPack ||
|
||||||
d->filetype_ == FileType::OggFlac ||
|
d->filetype_ == FileType::OggFlac ||
|
||||||
d->filetype_ == FileType::OggVorbis ||
|
d->filetype_ == FileType::OggVorbis ||
|
||||||
d->filetype_ == FileType::OggOpus ||
|
d->filetype_ == FileType::OggOpus ||
|
||||||
d->filetype_ == FileType::OggSpeex ||
|
d->filetype_ == FileType::OggSpeex ||
|
||||||
d->filetype_ == FileType::MPEG ||
|
d->filetype_ == FileType::MPEG ||
|
||||||
d->filetype_ == FileType::MPC ||
|
d->filetype_ == FileType::MPC ||
|
||||||
d->filetype_ == FileType::APE ||
|
d->filetype_ == FileType::APE ||
|
||||||
d->filetype_ == FileType::WAV ||
|
d->filetype_ == FileType::WAV ||
|
||||||
d->filetype_ == FileType::AIFF;
|
d->filetype_ == FileType::AIFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -773,18 +773,18 @@ bool Song::compilation_supported() const {
|
|||||||
bool Song::rating_supported() const {
|
bool Song::rating_supported() const {
|
||||||
|
|
||||||
return d->filetype_ == FileType::FLAC ||
|
return d->filetype_ == FileType::FLAC ||
|
||||||
d->filetype_ == FileType::WavPack ||
|
d->filetype_ == FileType::WavPack ||
|
||||||
d->filetype_ == FileType::OggFlac ||
|
d->filetype_ == FileType::OggFlac ||
|
||||||
d->filetype_ == FileType::OggVorbis ||
|
d->filetype_ == FileType::OggVorbis ||
|
||||||
d->filetype_ == FileType::OggOpus ||
|
d->filetype_ == FileType::OggOpus ||
|
||||||
d->filetype_ == FileType::OggSpeex ||
|
d->filetype_ == FileType::OggSpeex ||
|
||||||
d->filetype_ == FileType::MPEG ||
|
d->filetype_ == FileType::MPEG ||
|
||||||
d->filetype_ == FileType::MP4 ||
|
d->filetype_ == FileType::MP4 ||
|
||||||
d->filetype_ == FileType::ASF ||
|
d->filetype_ == FileType::ASF ||
|
||||||
d->filetype_ == FileType::MPC ||
|
d->filetype_ == FileType::MPC ||
|
||||||
d->filetype_ == FileType::APE ||
|
d->filetype_ == FileType::APE ||
|
||||||
d->filetype_ == FileType::WAV ||
|
d->filetype_ == FileType::WAV ||
|
||||||
d->filetype_ == FileType::AIFF;
|
d->filetype_ == FileType::AIFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -824,12 +824,12 @@ bool Song::titlesort_supported() const {
|
|||||||
bool Song::save_embedded_cover_supported(const FileType filetype) {
|
bool Song::save_embedded_cover_supported(const FileType filetype) {
|
||||||
|
|
||||||
return filetype == FileType::FLAC ||
|
return filetype == FileType::FLAC ||
|
||||||
filetype == FileType::OggVorbis ||
|
filetype == FileType::OggVorbis ||
|
||||||
filetype == FileType::OggOpus ||
|
filetype == FileType::OggOpus ||
|
||||||
filetype == FileType::MPEG ||
|
filetype == FileType::MPEG ||
|
||||||
filetype == FileType::MP4 ||
|
filetype == FileType::MP4 ||
|
||||||
filetype == FileType::WAV ||
|
filetype == FileType::WAV ||
|
||||||
filetype == FileType::AIFF;
|
filetype == FileType::AIFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1444,7 +1444,7 @@ Song::FileType Song::FiletypeByExtension(const QString &ext) {
|
|||||||
if (ext.compare("ape"_L1, Qt::CaseInsensitive) == 0) return FileType::APE;
|
if (ext.compare("ape"_L1, Qt::CaseInsensitive) == 0) return FileType::APE;
|
||||||
if (ext.compare("mod"_L1, Qt::CaseInsensitive) == 0 ||
|
if (ext.compare("mod"_L1, Qt::CaseInsensitive) == 0 ||
|
||||||
ext.compare("module"_L1, Qt::CaseInsensitive) == 0 ||
|
ext.compare("module"_L1, Qt::CaseInsensitive) == 0 ||
|
||||||
ext.compare("nst"_L1, Qt::CaseInsensitive) == 0||
|
ext.compare("nst"_L1, Qt::CaseInsensitive) == 0 ||
|
||||||
ext.compare("wow"_L1, Qt::CaseInsensitive) == 0) return FileType::MOD;
|
ext.compare("wow"_L1, Qt::CaseInsensitive) == 0) return FileType::MOD;
|
||||||
if (ext.compare("s3m"_L1, Qt::CaseInsensitive) == 0) return FileType::S3M;
|
if (ext.compare("s3m"_L1, Qt::CaseInsensitive) == 0) return FileType::S3M;
|
||||||
if (ext.compare("xm"_L1, Qt::CaseInsensitive) == 0) return FileType::XM;
|
if (ext.compare("xm"_L1, Qt::CaseInsensitive) == 0) return FileType::XM;
|
||||||
@@ -1689,7 +1689,7 @@ void Song::InitFromItdb(Itdb_Track *track, const QString &prefix) {
|
|||||||
|
|
||||||
d->bitrate_ = track->bitrate;
|
d->bitrate_ = track->bitrate;
|
||||||
d->samplerate_ = track->samplerate;
|
d->samplerate_ = track->samplerate;
|
||||||
d->bitdepth_ = -1; //track->bitdepth;
|
d->bitdepth_ = -1; // track->bitdepth;
|
||||||
|
|
||||||
d->source_ = Source::Device;
|
d->source_ = Source::Device;
|
||||||
QString filename = QString::fromLocal8Bit(track->ipod_path);
|
QString filename = QString::fromLocal8Bit(track->ipod_path);
|
||||||
@@ -2150,4 +2150,3 @@ QString Song::GetNameForNewPlaylist(const SongList &songs) {
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -667,9 +667,9 @@ void SongLoader::EndOfStreamReached() {
|
|||||||
// Do the magic on the data we have already
|
// Do the magic on the data we have already
|
||||||
MagicReady();
|
MagicReady();
|
||||||
if (state_ == State::Finished) break;
|
if (state_ == State::Finished) break;
|
||||||
// It looks like a playlist, so parse it
|
// It looks like a playlist, so parse it
|
||||||
|
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case State::WaitingForData:
|
case State::WaitingForData:
|
||||||
// It's a playlist and we've got all the data - finish and parse it
|
// It's a playlist and we've got all the data - finish and parse it
|
||||||
StopTypefindAsync(true);
|
StopTypefindAsync(true);
|
||||||
@@ -784,4 +784,3 @@ void SongLoader::CleanupPipeline() {
|
|||||||
state_ = State::Finished;
|
state_ = State::Finished;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,4 +41,3 @@ class SongMimeData : public MimeData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // SONGMIMEDATA_H
|
#endif // SONGMIMEDATA_H
|
||||||
|
|
||||||
|
|||||||
@@ -383,30 +383,30 @@ void StyleHelper::drawCornerImage(const QImage &img, QPainter *painter, const QR
|
|||||||
const qreal bottomDIP = bottom * imagePixelRatio;
|
const qreal bottomDIP = bottom * imagePixelRatio;
|
||||||
|
|
||||||
const QSize size = img.size();
|
const QSize size = img.size();
|
||||||
if (top > 0) { //top
|
if (top > 0) { // top
|
||||||
painter->drawImage(QRectF(rect.left() + left, rect.top(), rect.width() - right - left, top), img, QRectF(leftDIP, 0, size.width() - rightDIP - leftDIP, topDIP));
|
painter->drawImage(QRectF(rect.left() + left, rect.top(), rect.width() - right - left, top), img, QRectF(leftDIP, 0, size.width() - rightDIP - leftDIP, topDIP));
|
||||||
if (left > 0) { //top-left
|
if (left > 0) { // top-left
|
||||||
painter->drawImage(QRectF(rect.left(), rect.top(), left, top), img, QRectF(0, 0, leftDIP, topDIP));
|
painter->drawImage(QRectF(rect.left(), rect.top(), left, top), img, QRectF(0, 0, leftDIP, topDIP));
|
||||||
}
|
}
|
||||||
if (right > 0) { //top-right
|
if (right > 0) { // top-right
|
||||||
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top(), right, top), img, QRectF(size.width() - rightDIP, 0, rightDIP, topDIP));
|
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top(), right, top), img, QRectF(size.width() - rightDIP, 0, rightDIP, topDIP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//left
|
// left
|
||||||
if (left > 0) {
|
if (left > 0) {
|
||||||
painter->drawImage(QRectF(rect.left(), rect.top() + top, left, rect.height() - top - bottom), img, QRectF(0, topDIP, leftDIP, size.height() - bottomDIP - topDIP));
|
painter->drawImage(QRectF(rect.left(), rect.top() + top, left, rect.height() - top - bottom), img, QRectF(0, topDIP, leftDIP, size.height() - bottomDIP - topDIP));
|
||||||
}
|
}
|
||||||
//center
|
// center
|
||||||
painter->drawImage(QRectF(rect.left() + left, rect.top() + top, rect.width() - right - left, rect.height() - bottom - top), img, QRectF(leftDIP, topDIP, size.width() - rightDIP - leftDIP, size.height() - bottomDIP - topDIP));
|
painter->drawImage(QRectF(rect.left() + left, rect.top() + top, rect.width() - right - left, rect.height() - bottom - top), img, QRectF(leftDIP, topDIP, size.width() - rightDIP - leftDIP, size.height() - bottomDIP - topDIP));
|
||||||
if (right > 0) { //right
|
if (right > 0) { // right
|
||||||
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top() + top, right, rect.height() - top - bottom), img, QRectF(size.width() - rightDIP, topDIP, rightDIP, size.height() - bottomDIP - topDIP));
|
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top() + top, right, rect.height() - top - bottom), img, QRectF(size.width() - rightDIP, topDIP, rightDIP, size.height() - bottomDIP - topDIP));
|
||||||
}
|
}
|
||||||
if (bottom > 0) { //bottom
|
if (bottom > 0) { // bottom
|
||||||
painter->drawImage(QRectF(rect.left() + left, rect.top() + rect.height() - bottom, rect.width() - right - left, bottom), img, QRectF(leftDIP, size.height() - bottomDIP, size.width() - rightDIP - leftDIP, bottomDIP));
|
painter->drawImage(QRectF(rect.left() + left, rect.top() + rect.height() - bottom, rect.width() - right - left, bottom), img, QRectF(leftDIP, size.height() - bottomDIP, size.width() - rightDIP - leftDIP, bottomDIP));
|
||||||
if (left > 0) { //bottom-left
|
if (left > 0) { // bottom-left
|
||||||
painter->drawImage(QRectF(rect.left(), rect.top() + rect.height() - bottom, left, bottom), img, QRectF(0, size.height() - bottomDIP, leftDIP, bottomDIP));
|
painter->drawImage(QRectF(rect.left(), rect.top() + rect.height() - bottom, left, bottom), img, QRectF(0, size.height() - bottomDIP, leftDIP, bottomDIP));
|
||||||
}
|
}
|
||||||
if (right > 0) { //bottom-right
|
if (right > 0) { // bottom-right
|
||||||
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), img, QRectF(size.width() - rightDIP, size.height() - bottomDIP, rightDIP, bottomDIP));
|
painter->drawImage(QRectF(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), img, QRectF(size.width() - rightDIP, size.height() - bottomDIP, rightDIP, bottomDIP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef THREAD_H
|
#ifndef THREAD_H
|
||||||
#define THREAD_H
|
#define THREAD_H
|
||||||
|
|||||||
@@ -53,4 +53,3 @@ UrlHandler::LoadResult::LoadResult(const QUrl &media_url, const Type type, const
|
|||||||
bit_depth_(-1),
|
bit_depth_(-1),
|
||||||
length_nanosec_(-1),
|
length_nanosec_(-1),
|
||||||
error_(error) {}
|
error_(error) {}
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ QString AlbumCoverChoiceController::GetInitialPathForFileDialog(const Song &song
|
|||||||
// Art automatic is first to show user which cover the album may be using now;
|
// Art automatic is first to show user which cover the album may be using now;
|
||||||
// The song is using it if there's no manual path but we cannot use manual path here because it can contain cached paths
|
// The song is using it if there's no manual path but we cannot use manual path here because it can contain cached paths
|
||||||
if (song.art_automatic_is_valid()) {
|
if (song.art_automatic_is_valid()) {
|
||||||
return song.art_automatic().toLocalFile();
|
return song.art_automatic().toLocalFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no automatic art, start in the song's folder
|
// If no automatic art, start in the song's folder
|
||||||
@@ -757,7 +757,7 @@ bool AlbumCoverChoiceController::IsKnownImageExtension(const QString &suffix) {
|
|||||||
|
|
||||||
if (!sImageExtensions) {
|
if (!sImageExtensions) {
|
||||||
sImageExtensions = new QSet<QString>();
|
sImageExtensions = new QSet<QString>();
|
||||||
(*sImageExtensions) << u"png"_s << u"jpg"_s << u"jpeg"_s << u"bmp"_s << u"gif"_s << u"xpm"_s << u"pbm"_s << u"pgm"_s << u"ppm"_s << u"xbm"_s;
|
(*sImageExtensions) << u"png"_s << u"jpg"_s << u"jpeg"_s << u"bmp"_s << u"gif"_s << u"xpm"_s << u"pbm"_s << u"pgm"_s << u"ppm"_s << u"xbm"_s;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sImageExtensions->contains(suffix);
|
return sImageExtensions->contains(suffix);
|
||||||
@@ -806,14 +806,14 @@ void AlbumCoverChoiceController::SaveCover(Song *song, const QDropEvent *e) {
|
|||||||
QUrl AlbumCoverChoiceController::SaveCoverAutomatic(Song *song, const AlbumCoverImageResult &result) {
|
QUrl AlbumCoverChoiceController::SaveCoverAutomatic(Song *song, const AlbumCoverImageResult &result) {
|
||||||
|
|
||||||
QUrl cover_url;
|
QUrl cover_url;
|
||||||
switch(get_save_album_cover_type()) {
|
|
||||||
case CoverOptions::CoverType::Embedded:{
|
case CoverOptions::CoverType::Embedded:{
|
||||||
|
switch (get_save_album_cover_type()) {
|
||||||
if (song->save_embedded_cover_supported()) {
|
if (song->save_embedded_cover_supported()) {
|
||||||
SaveCoverEmbeddedToCollectionSongs(*song, result);
|
SaveCoverEmbeddedToCollectionSongs(*song, result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case CoverOptions::CoverType::Cache:
|
case CoverOptions::CoverType::Cache:
|
||||||
case CoverOptions::CoverType::Album:{
|
case CoverOptions::CoverType::Album:{
|
||||||
cover_url = SaveCoverToFileAutomatic(song, result);
|
cover_url = SaveCoverToFileAutomatic(song, result);
|
||||||
|
|||||||
@@ -75,4 +75,3 @@ class AlbumCoverExporter : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVEREXPORTER_H
|
#endif // ALBUMCOVEREXPORTER_H
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
class AlbumCoverImageResult {
|
class AlbumCoverImageResult {
|
||||||
public:
|
public:
|
||||||
explicit AlbumCoverImageResult(const QUrl &_cover_url = QUrl(), const QString &_mime_type = QString(), const QByteArray &_image_data = QByteArray(), const QImage &_image = QImage())
|
explicit AlbumCoverImageResult(const QUrl &_cover_url = QUrl(), const QString &_mime_type = QString(), const QByteArray &_image_data = QByteArray(), const QImage &_image = QImage())
|
||||||
: cover_url(_cover_url),
|
: cover_url(_cover_url),
|
||||||
mime_type(_mime_type),
|
mime_type(_mime_type),
|
||||||
image_data(_image_data),
|
image_data(_image_data),
|
||||||
image(_image) {}
|
image(_image) {}
|
||||||
explicit AlbumCoverImageResult(const QImage &_image) : image(_image) {}
|
explicit AlbumCoverImageResult(const QImage &_image) : image(_image) {}
|
||||||
|
|
||||||
QUrl cover_url;
|
QUrl cover_url;
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2018-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "albumcoverloaderoptions.h"
|
#include "albumcoverloaderoptions.h"
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ class AlbumCoverLoaderResult {
|
|||||||
const AlbumCoverImageResult &_album_cover = AlbumCoverImageResult(),
|
const AlbumCoverImageResult &_album_cover = AlbumCoverImageResult(),
|
||||||
const QImage &_image_scaled = QImage(),
|
const QImage &_image_scaled = QImage(),
|
||||||
const QUrl &_art_manual_updated = QUrl(),
|
const QUrl &_art_manual_updated = QUrl(),
|
||||||
const QUrl &_art_automatic_updated = QUrl()) :
|
const QUrl &_art_automatic_updated = QUrl())
|
||||||
success(_success),
|
: success(_success),
|
||||||
type(_type),
|
type(_type),
|
||||||
album_cover(_album_cover),
|
album_cover(_album_cover),
|
||||||
image_scaled(_image_scaled),
|
image_scaled(_image_scaled),
|
||||||
art_manual_updated(_art_manual_updated),
|
art_manual_updated(_art_manual_updated),
|
||||||
art_automatic_updated(_art_automatic_updated) {}
|
art_automatic_updated(_art_automatic_updated) {}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
Type type;
|
Type type;
|
||||||
|
|||||||
@@ -604,10 +604,7 @@ void AlbumCoverManager::AlbumCoverFetched(const quint64 id, const AlbumCoverImag
|
|||||||
|
|
||||||
void AlbumCoverManager::UpdateStatusText() {
|
void AlbumCoverManager::UpdateStatusText() {
|
||||||
|
|
||||||
QString message = tr("Got %1 covers out of %2 (%3 failed)")
|
QString message = tr("Got %1 covers out of %2 (%3 failed)").arg(fetch_statistics_.chosen_images_).arg(jobs_).arg(fetch_statistics_.missing_images_);
|
||||||
.arg(fetch_statistics_.chosen_images_)
|
|
||||||
.arg(jobs_)
|
|
||||||
.arg(fetch_statistics_.missing_images_);
|
|
||||||
|
|
||||||
if (fetch_statistics_.bytes_transferred_ > 0) {
|
if (fetch_statistics_.bytes_transferred_ > 0) {
|
||||||
message += ", "_L1 + tr("%1 transferred").arg(Utilities::PrettySize(fetch_statistics_.bytes_transferred_));
|
message += ", "_L1 + tr("%1 transferred").arg(Utilities::PrettySize(fetch_statistics_.bytes_transferred_));
|
||||||
@@ -1083,10 +1080,7 @@ void AlbumCoverManager::UpdateExportStatus(const int exported, const int skipped
|
|||||||
|
|
||||||
progress_bar_->setValue(exported);
|
progress_bar_->setValue(exported);
|
||||||
|
|
||||||
QString message = tr("Exported %1 covers out of %2 (%3 skipped)")
|
QString message = tr("Exported %1 covers out of %2 (%3 skipped)").arg(exported).arg(max).arg(skipped);
|
||||||
.arg(exported)
|
|
||||||
.arg(max)
|
|
||||||
.arg(skipped);
|
|
||||||
statusBar()->showMessage(message);
|
statusBar()->showMessage(message);
|
||||||
|
|
||||||
// End of the current process
|
// End of the current process
|
||||||
@@ -1131,4 +1125,3 @@ void AlbumCoverManager::SaveEmbeddedCoverFinished(TagReaderReplyPtr reply, Album
|
|||||||
LoadAlbumCoverAsync(album_item);
|
LoadAlbumCoverAsync(album_item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,19 +45,18 @@ CoverSearchStatisticsDialog::CoverSearchStatisticsDialog(QWidget *parent)
|
|||||||
details_layout_ = new QVBoxLayout(ui_->details);
|
details_layout_ = new QVBoxLayout(ui_->details);
|
||||||
details_layout_->setSpacing(0);
|
details_layout_->setSpacing(0);
|
||||||
|
|
||||||
setStyleSheet(
|
setStyleSheet(u"#details {"
|
||||||
u"#details {"
|
" background-color: palette(base);"
|
||||||
" background-color: palette(base);"
|
"}"
|
||||||
"}"
|
"#details QLabel[type=\"label\"] {"
|
||||||
"#details QLabel[type=\"label\"] {"
|
" border: 2px solid transparent;"
|
||||||
" border: 2px solid transparent;"
|
" border-right: 2px solid palette(midlight);"
|
||||||
" border-right: 2px solid palette(midlight);"
|
" margin-right: 10px;"
|
||||||
" margin-right: 10px;"
|
"}"
|
||||||
"}"
|
"#details QLabel[type=\"value\"] {"
|
||||||
"#details QLabel[type=\"value\"] {"
|
" font-weight: bold;"
|
||||||
" font-weight: bold;"
|
" max-width: 100px;"
|
||||||
" max-width: 100px;"
|
"}"_s);
|
||||||
"}"_s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoverSearchStatisticsDialog::~CoverSearchStatisticsDialog() { delete ui_; }
|
CoverSearchStatisticsDialog::~CoverSearchStatisticsDialog() { delete ui_; }
|
||||||
@@ -67,10 +66,7 @@ void CoverSearchStatisticsDialog::Show(const CoverSearchStatistics &statistics)
|
|||||||
QStringList providers(statistics.total_images_by_provider_.keys());
|
QStringList providers(statistics.total_images_by_provider_.keys());
|
||||||
std::sort(providers.begin(), providers.end());
|
std::sort(providers.begin(), providers.end());
|
||||||
|
|
||||||
ui_->summary->setText(tr("Got %1 covers out of %2 (%3 failed)")
|
ui_->summary->setText(tr("Got %1 covers out of %2 (%3 failed)").arg(statistics.chosen_images_).arg(statistics.chosen_images_ + statistics.missing_images_).arg(statistics.missing_images_));
|
||||||
.arg(statistics.chosen_images_)
|
|
||||||
.arg(statistics.chosen_images_ + statistics.missing_images_)
|
|
||||||
.arg(statistics.missing_images_));
|
|
||||||
|
|
||||||
for (const QString &provider : std::as_const(providers)) {
|
for (const QString &provider : std::as_const(providers)) {
|
||||||
AddLine(tr("Covers from %1").arg(provider), QString::number(statistics.chosen_images_by_provider_[provider]));
|
AddLine(tr("Covers from %1").arg(provider), QString::number(statistics.chosen_images_by_provider_[provider]));
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ bool MusixmatchCoverProvider::StartSearch(const QString &artist, const QString &
|
|||||||
QNetworkReply *reply = CreateGetRequest(QUrl(QStringLiteral("https://www.musixmatch.com/album/%1/%2").arg(artist_stripped, album_stripped)));
|
QNetworkReply *reply = CreateGetRequest(QUrl(QStringLiteral("https://www.musixmatch.com/album/%1/%2").arg(artist_stripped, album_stripped)));
|
||||||
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, album]() { HandleSearchReply(reply, id, artist, album); });
|
QObject::connect(reply, &QNetworkReply::finished, this, [this, reply, id, artist, album]() { HandleSearchReply(reply, id, artist, album); });
|
||||||
|
|
||||||
//qLog(Debug) << "Musixmatch: Sending request for" << artist_stripped << album_stripped << url;
|
// qLog(Debug) << "Musixmatch: Sending request for" << artist_stripped << album_stripped << url;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
@@ -138,4 +138,3 @@ void CDDADevice::SongLoadingFinished() {
|
|||||||
WatchForDiscChanges(true);
|
WatchForDiscChanges(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -227,13 +227,12 @@ void DeviceDatabaseBackend::SetDeviceOptions(const int id, const QString &friend
|
|||||||
QSqlDatabase db(db_->Connect());
|
QSqlDatabase db(db_->Connect());
|
||||||
|
|
||||||
SqlQuery q(db);
|
SqlQuery q(db);
|
||||||
q.prepare(QStringLiteral(
|
q.prepare(QStringLiteral("UPDATE devices"
|
||||||
"UPDATE devices"
|
" SET friendly_name=:friendly_name,"
|
||||||
" SET friendly_name=:friendly_name,"
|
" icon=:icon_name,"
|
||||||
" icon=:icon_name,"
|
" transcode_mode=:transcode_mode,"
|
||||||
" transcode_mode=:transcode_mode,"
|
" transcode_format=:transcode_format"
|
||||||
" transcode_format=:transcode_format"
|
" WHERE ROWID=:id"));
|
||||||
" WHERE ROWID=:id"));
|
|
||||||
q.BindValue(u":friendly_name"_s, friendly_name);
|
q.BindValue(u":friendly_name"_s, friendly_name);
|
||||||
q.BindValue(u":icon_name"_s, icon_name);
|
q.BindValue(u":icon_name"_s, icon_name);
|
||||||
q.BindValue(u":transcode_mode"_s, static_cast<int>(mode));
|
q.BindValue(u":transcode_mode"_s, static_cast<int>(mode));
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class GPodDevice : public ConnectedDevice, public virtual MusicStorage {
|
|||||||
bool WriteDatabase(QString &error_text);
|
bool WriteDatabase(QString &error_text);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const SharedPtr <TaskManager> task_manager_;
|
const SharedPtr<TaskManager> task_manager_;
|
||||||
GPodLoader *loader_;
|
GPodLoader *loader_;
|
||||||
QThread *loader_thread_;
|
QThread *loader_thread_;
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ MtpConnection::~MtpConnection() {
|
|||||||
|
|
||||||
QString MtpConnection::ErrorString(const LIBMTP_error_number_t error_number) {
|
QString MtpConnection::ErrorString(const LIBMTP_error_number_t error_number) {
|
||||||
|
|
||||||
switch(error_number) {
|
switch (error_number) {
|
||||||
case LIBMTP_ERROR_NO_DEVICE_ATTACHED:
|
case LIBMTP_ERROR_NO_DEVICE_ATTACHED:
|
||||||
return u"No Devices have been found."_s;
|
return u"No Devices have been found."_s;
|
||||||
case LIBMTP_ERROR_CONNECTING:
|
case LIBMTP_ERROR_CONNECTING:
|
||||||
|
|||||||
@@ -411,10 +411,7 @@ Udisks2Lister::PartitionData Udisks2Lister::ReadPartitionData(const QDBusObjectP
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString Udisks2Lister::PartitionData::unique_id() const {
|
QString Udisks2Lister::PartitionData::unique_id() const {
|
||||||
return u"Udisks2/%1/%2/%3/%4/%5"_s
|
return u"Udisks2/%1/%2/%3/%4/%5"_s.arg(serial, vendor, model).arg(capacity).arg(uuid);
|
||||||
.arg(serial, vendor, model)
|
|
||||||
.arg(capacity)
|
|
||||||
.arg(uuid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Udisks2Lister::Udisks2Job::Udisks2Job() : is_mount(true) {}
|
Udisks2Lister::Udisks2Job::Udisks2Job() : is_mount(true) {}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "ui_saveplaylistsdialog.h"
|
#include "ui_saveplaylistsdialog.h"
|
||||||
|
|
||||||
class SavePlaylistsDialog : public QDialog {
|
class SavePlaylistsDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SavePlaylistsDialog(const QStringList &types, const QString &default_extension, QWidget *parent = nullptr);
|
explicit SavePlaylistsDialog(const QStringList &types, const QString &default_extension, QWidget *parent = nullptr);
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ void EBUR128State::AddFrames(const char *data, size_t size) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<EBUR128Measures> EBUR128State::Finalize(EBUR128State&& state) {
|
std::optional<EBUR128Measures> EBUR128State::Finalize(EBUR128State &&state) {
|
||||||
|
|
||||||
ebur128_state *ebur128 = &*state.st;
|
ebur128_state *ebur128 = &*state.st;
|
||||||
|
|
||||||
@@ -419,10 +419,9 @@ std::optional<EBUR128Measures> EBUR128AnalysisImpl::Compute(const Song &song) {
|
|||||||
// Connect the elements
|
// Connect the elements
|
||||||
gst_element_link_many(src, decode, nullptr);
|
gst_element_link_many(src, decode, nullptr);
|
||||||
|
|
||||||
GstStaticCaps static_caps = GST_STATIC_CAPS(
|
GstStaticCaps static_caps = GST_STATIC_CAPS("audio/x-raw,"
|
||||||
"audio/x-raw,"
|
"format = (string) { S16LE, S32LE, F32LE, F64LE },"
|
||||||
"format = (string) { S16LE, S32LE, F32LE, F64LE },"
|
"layout = (string) interleaved");
|
||||||
"layout = (string) interleaved");
|
|
||||||
|
|
||||||
GstCaps *caps = gst_static_caps_get(&static_caps);
|
GstCaps *caps = gst_static_caps_get(&static_caps);
|
||||||
// Place a queue before the sink. It really does matter for performance.
|
// Place a queue before the sink. It really does matter for performance.
|
||||||
|
|||||||
@@ -50,14 +50,14 @@ class EngineBase : public QObject {
|
|||||||
public:
|
public:
|
||||||
~EngineBase() override;
|
~EngineBase() override;
|
||||||
|
|
||||||
// State:
|
// State:
|
||||||
// Playing when playing,
|
// Playing when playing,
|
||||||
// Paused when paused
|
// Paused when paused
|
||||||
// Idle when you still have a URL loaded (ie you have not been told to stop())
|
// Idle when you still have a URL loaded (ie you have not been told to stop())
|
||||||
// Empty when you have been told to stop(),
|
// Empty when you have been told to stop(),
|
||||||
// Error when an error occurred and you stopped yourself
|
// Error when an error occurred and you stopped yourself
|
||||||
//
|
//
|
||||||
// It is vital to be Idle just after the track has ended!
|
// It is vital to be Idle just after the track has ended!
|
||||||
|
|
||||||
enum class State {
|
enum class State {
|
||||||
Empty,
|
Empty,
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "enginedevice.h"
|
#include "enginedevice.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Strawberry Music Player
|
* Strawberry Music Player
|
||||||
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
* Copyright 2021-2023, Jonas Kvinge <jonas@jkvinge.net>
|
||||||
*
|
*
|
||||||
* Strawberry is free software: you can redistribute it and/or modify
|
* Strawberry is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Strawberry is distributed in the hope that it will be useful,
|
* Strawberry is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
* along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ENGINEDEVICE_H
|
#ifndef ENGINEDEVICE_H
|
||||||
#define ENGINEDEVICE_H
|
#define ENGINEDEVICE_H
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU General Public License as published by *
|
* it under the terms of the GNU General Public License as published by *
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU General Public License for more details. *
|
* GNU General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU General Public License *
|
* You should have received a copy of the GNU General Public License *
|
||||||
* along with this program; if not, write to the *
|
* along with this program; if not, write to the *
|
||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
* 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@@ -674,7 +674,7 @@ void GstEngine::HandlePipelineError(const int pipeline_id, const int domain, con
|
|||||||
|
|
||||||
void GstEngine::NewMetaData(const int pipeline_id, const EngineMetadata &engine_metadata) {
|
void GstEngine::NewMetaData(const int pipeline_id, const EngineMetadata &engine_metadata) {
|
||||||
|
|
||||||
if (!current_pipeline_|| current_pipeline_->id() != pipeline_id) return;
|
if (!current_pipeline_ || current_pipeline_->id() != pipeline_id) return;
|
||||||
Q_EMIT MetaData(engine_metadata);
|
Q_EMIT MetaData(engine_metadata);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1064,8 +1064,7 @@ void GstEngine::UpdateScope(const int chunk_length) {
|
|||||||
buffer_format_.startsWith("S24LE"_L1) ||
|
buffer_format_.startsWith("S24LE"_L1) ||
|
||||||
buffer_format_.startsWith("S24_32LE"_L1) ||
|
buffer_format_.startsWith("S24_32LE"_L1) ||
|
||||||
buffer_format_.startsWith("S32LE"_L1) ||
|
buffer_format_.startsWith("S32LE"_L1) ||
|
||||||
buffer_format_.startsWith("F32LE"_L1)
|
buffer_format_.startsWith("F32LE"_L1)) {
|
||||||
) {
|
|
||||||
memcpy(dest, source, bytes);
|
memcpy(dest, source, bytes);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
* Copyright (C) 2003-2005 by Mark Kretschmann <markey@web.de> *
|
||||||
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
* Copyright (C) 2005 by Jakub Stachowski <qbast@go2.pl> *
|
||||||
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
* Copyright (C) 2006 Paul Cifarelli <paul@cifarelli.net> *
|
||||||
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
* Copyright (C) 2017-2024 Jonas Kvinge <jonas@jkvinge.net> *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU General Public License as published by *
|
* it under the terms of the GNU General Public License as published by *
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU General Public License for more details. *
|
* GNU General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU General Public License *
|
* You should have received a copy of the GNU General Public License *
|
||||||
* along with this program; if not, write to the *
|
* along with this program; if not, write to the *
|
||||||
* Free Software Foundation, Inc., *
|
* Free Software Foundation, Inc., *
|
||||||
* 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
* 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef GSTENGINE_H
|
#ifndef GSTENGINE_H
|
||||||
#define GSTENGINE_H
|
#define GSTENGINE_H
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ static void gst_strawberry_fastspectrum_alloc_channel_data(GstStrawberryFastSpec
|
|||||||
fastspectrum->fft_input = reinterpret_cast<double*>(fftw_malloc(sizeof(double) * nfft));
|
fastspectrum->fft_input = reinterpret_cast<double*>(fftw_malloc(sizeof(double) * nfft));
|
||||||
fastspectrum->fft_output = reinterpret_cast<fftw_complex*>(fftw_malloc(sizeof(fftw_complex) * (nfft / 2 + 1)));
|
fastspectrum->fft_output = reinterpret_cast<fftw_complex*>(fftw_malloc(sizeof(fftw_complex) * (nfft / 2 + 1)));
|
||||||
|
|
||||||
fastspectrum->spect_magnitude = new double[bands] {};
|
fastspectrum->spect_magnitude = new double[bands]{};
|
||||||
|
|
||||||
GstStrawberryFastSpectrumClass *klass = reinterpret_cast<GstStrawberryFastSpectrumClass*>(G_OBJECT_GET_CLASS(fastspectrum));
|
GstStrawberryFastSpectrumClass *klass = reinterpret_cast<GstStrawberryFastSpectrumClass*>(G_OBJECT_GET_CLASS(fastspectrum));
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -147,4 +147,3 @@ PulseDeviceFinder::~PulseDeviceFinder() {
|
|||||||
pa_mainloop_free(mainloop_);
|
pa_mainloop_free(mainloop_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class Equalizer : public QDialog {
|
|||||||
bool operator!=(const Params &other) const;
|
bool operator!=(const Params &other) const;
|
||||||
|
|
||||||
int preamp;
|
int preamp;
|
||||||
int gain[kBands] {};
|
int gain[kBands]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
bool is_equalizer_enabled() const;
|
bool is_equalizer_enabled() const;
|
||||||
@@ -98,7 +98,7 @@ class Equalizer : public QDialog {
|
|||||||
QString last_preset_;
|
QString last_preset_;
|
||||||
|
|
||||||
EqualizerSlider *preamp_;
|
EqualizerSlider *preamp_;
|
||||||
EqualizerSlider *gain_[kBands] {};
|
EqualizerSlider *gain_[kBands]{};
|
||||||
|
|
||||||
QMap<QString, Params> presets_;
|
QMap<QString, Params> presets_;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,4 +68,3 @@ int EqualizerSlider::value() const {
|
|||||||
void EqualizerSlider::set_value(const int value) {
|
void EqualizerSlider::set_value(const int value) {
|
||||||
ui_->slider->setValue(value);
|
ui_->slider->setValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,4 +34,3 @@ class FilterParserIntEqComparator : public FilterParserSearchTermComparator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // FILTERPARSERINTEQCOMPARATOR_H
|
#endif // FILTERPARSERINTEQCOMPARATOR_H
|
||||||
|
|
||||||
|
|||||||
@@ -34,4 +34,3 @@ class FilterParserIntGeComparator : public FilterParserSearchTermComparator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // FILTERPARSERINTGECOMPARATOR_H
|
#endif // FILTERPARSERINTGECOMPARATOR_H
|
||||||
|
|
||||||
|
|||||||
@@ -34,4 +34,3 @@ class FilterParserIntNeComparator : public FilterParserSearchTermComparator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // FILTERPARSERINTNECOMPARATOR_H
|
#endif // FILTERPARSERINTNECOMPARATOR_H
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LAZY_H
|
#ifndef LAZY_H
|
||||||
#define LAZY_H
|
#define LAZY_H
|
||||||
@@ -37,7 +37,7 @@ class Lazy {
|
|||||||
// Convenience constructor that will lazily default construct the object.
|
// Convenience constructor that will lazily default construct the object.
|
||||||
Lazy() : init_([]() { return new T; }) {}
|
Lazy() : init_([]() { return new T; }) {}
|
||||||
|
|
||||||
T* get() const {
|
T *get() const {
|
||||||
CheckInitialized();
|
CheckInitialized();
|
||||||
return ptr_.get();
|
return ptr_.get();
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ class Lazy {
|
|||||||
private:
|
private:
|
||||||
void CheckInitialized() const {
|
void CheckInitialized() const {
|
||||||
if (!ptr_) {
|
if (!ptr_) {
|
||||||
ptr_ = SharedPtr<T>(init_(), [](T*obj) { qLog(Debug) << obj << "deleted"; delete obj; });
|
ptr_ = SharedPtr<T>(init_(), [](T *obj) { qLog(Debug) << obj << "deleted"; delete obj; });
|
||||||
qLog(Debug) << &*ptr_ << "created";
|
qLog(Debug) << &*ptr_ << "created";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
template <typename T, typename D = std::default_delete<T>>
|
template<typename T, typename D = std::default_delete<T>>
|
||||||
using ScopedPtr = std::unique_ptr<T, D>;
|
using ScopedPtr = std::unique_ptr<T, D>;
|
||||||
|
|
||||||
#endif // SCOPED_PTR_H
|
#endif // SCOPED_PTR_H
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ QString HtmlLyricsProvider::ParseLyricsFromHTML(const QString &content, const QR
|
|||||||
start_idx = rematch_end_tag.capturedEnd();
|
start_idx = rematch_end_tag.capturedEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} while (tags > 0 && (rematch_start_tag.hasMatch() || rematch_end_tag.hasMatch()));
|
||||||
while (tags > 0 && (rematch_start_tag.hasMatch() || rematch_end_tag.hasMatch()));
|
|
||||||
|
|
||||||
if (end_lyrics_idx != -1 && start_lyrics_idx < end_lyrics_idx) {
|
if (end_lyrics_idx != -1 && start_lyrics_idx < end_lyrics_idx) {
|
||||||
if (!lyrics.isEmpty()) {
|
if (!lyrics.isEmpty()) {
|
||||||
@@ -163,8 +162,7 @@ QString HtmlLyricsProvider::ParseLyricsFromHTML(const QString &content, const QR
|
|||||||
lyrics.append(content.mid(start_lyrics_idx, end_lyrics_idx - start_lyrics_idx).remove(u'\r').remove(u'\n'));
|
lyrics.append(content.mid(start_lyrics_idx, end_lyrics_idx - start_lyrics_idx).remove(u'\r').remove(u'\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} while (start_idx > 0 && multiple);
|
||||||
while (start_idx > 0 && multiple);
|
|
||||||
|
|
||||||
for (auto it = regex_removes.cbegin(); it != regex_removes.cend(); it++) {
|
for (auto it = regex_removes.cbegin(); it != regex_removes.cend(); it++) {
|
||||||
lyrics.remove(*it);
|
lyrics.remove(*it);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user