Add option not to remove "Remastered", etc from song titles

This commit is contained in:
Jonas Kvinge
2025-10-18 19:57:38 +02:00
parent 8bfc3bc41c
commit d61adeb595
18 changed files with 69 additions and 21 deletions

View File

@@ -1115,7 +1115,9 @@ void SpotifyRequest::ParseSong(Song &song, const QJsonObject &json_obj, const Ar
QUrl url(uri);
title = Song::TitleRemoveMisc(title);
if (service_->remove_remastered()) {
title = Song::TitleRemoveMisc(title);
}
song.set_source(Song::Source::Spotify);
song.set_song_id(song_id);

View File

@@ -86,6 +86,7 @@ SpotifyService::SpotifyService(const SharedPtr<TaskManager> task_manager,
songssearchlimit_(1),
fetchalbums_(true),
download_album_covers_(true),
remove_remastered_(true),
pending_search_id_(0),
next_pending_search_id_(1),
pending_search_type_(SearchType::Artists),
@@ -204,6 +205,7 @@ void SpotifyService::ReloadSettings() {
songssearchlimit_ = s.value(SpotifySettings::kSongsSearchLimit, 10).toInt();
fetchalbums_ = s.value(SpotifySettings::kFetchAlbums, false).toBool();
download_album_covers_ = s.value(SpotifySettings::kDownloadAlbumCovers, true).toBool();
remove_remastered_ = s.value(SpotifySettings::kRemoveRemastered, true).toBool();
s.endGroup();

View File

@@ -73,6 +73,7 @@ class SpotifyService : public StreamingService {
int songssearchlimit() const { return songssearchlimit_; }
bool fetchalbums() const { return fetchalbums_; }
bool download_album_covers() const { return download_album_covers_; }
bool remove_remastered() const { return remove_remastered_; }
bool authenticated() const override;
QByteArray authorization_header() const;
@@ -150,6 +151,7 @@ class SpotifyService : public StreamingService {
int songssearchlimit_;
bool fetchalbums_;
bool download_album_covers_;
bool remove_remastered_;
int pending_search_id_;
int next_pending_search_id_;