Remove external tagreader

This commit is contained in:
Jonas Kvinge
2024-09-15 23:17:14 +02:00
parent 3cb0f60900
commit daaacf4663
104 changed files with 3524 additions and 4634 deletions

View File

@@ -33,11 +33,11 @@
#include "core/application.h"
#include "core/taskmanager.h"
#include "core/database.h"
#include "core/tagreaderclient.h"
#include "core/thread.h"
#include "core/song.h"
#include "core/logging.h"
#include "core/settings.h"
#include "tagreader/tagreaderclient.h"
#include "utilities/threadutils.h"
#include "collection.h"
#include "collectionwatcher.h"
@@ -216,7 +216,7 @@ void SCollection::SyncPlaycountAndRatingToFiles() {
void SCollection::SongsPlaycountChanged(const SongList &songs, const bool save_tags) {
if (save_tags || save_playcounts_to_files_) {
app_->tag_reader_client()->SaveSongsPlaycount(songs);
app_->tag_reader_client()->SaveSongsPlaycountAsync(songs);
}
}
@@ -224,7 +224,7 @@ void SCollection::SongsPlaycountChanged(const SongList &songs, const bool save_t
void SCollection::SongsRatingChanged(const SongList &songs, const bool save_tags) {
if (save_tags || save_ratings_to_files_) {
app_->tag_reader_client()->SaveSongsRating(songs);
app_->tag_reader_client()->SaveSongsRatingAsync(songs);
}
}

View File

@@ -26,7 +26,7 @@
#include "core/logging.h"
#include "collectionplaylistitem.h"
#include "core/tagreaderclient.h"
#include "tagreader/tagreaderclient.h"
class SqlRow;
@@ -42,9 +42,9 @@ QUrl CollectionPlaylistItem::Url() const { return song_.url(); }
void CollectionPlaylistItem::Reload() {
const TagReaderClient::Result result = TagReaderClient::Instance()->ReadFileBlocking(song_.url().toLocalFile(), &song_);
const TagReaderResult result = TagReaderClient::Instance()->ReadFileBlocking(song_.url().toLocalFile(), &song_);
if (!result.success()) {
qLog(Error) << "Could not reload file" << song_.url() << result.error;
qLog(Error) << "Could not reload file" << song_.url() << result.error_string();
return;
}
UpdateTemporaryMetadata(song_);

View File

@@ -47,11 +47,11 @@
#include "core/filesystemwatcherinterface.h"
#include "core/logging.h"
#include "core/tagreaderclient.h"
#include "core/taskmanager.h"
#include "core/settings.h"
#include "utilities/imageutils.h"
#include "utilities/timeconstants.h"
#include "tagreader/tagreaderclient.h"
#include "collectiondirectory.h"
#include "collectionbackend.h"
#include "collectionwatcher.h"
@@ -866,7 +866,7 @@ void CollectionWatcher::UpdateNonCueAssociatedSong(const QString &file,
}
Song song_on_disk(source_);
const TagReaderClient::Result result = TagReaderClient::Instance()->ReadFileBlocking(file, &song_on_disk);
const TagReaderResult result = TagReaderClient::Instance()->ReadFileBlocking(file, &song_on_disk);
if (result.success() && song_on_disk.is_valid()) {
song_on_disk.set_source(source_);
song_on_disk.set_directory_id(t->dir());
@@ -919,7 +919,7 @@ SongList CollectionWatcher::ScanNewFile(const QString &file, const QString &path
}
else { // It's a normal media file
Song song(source_);
const TagReaderClient::Result result = TagReaderClient::Instance()->ReadFileBlocking(file, &song);
const TagReaderResult result = TagReaderClient::Instance()->ReadFileBlocking(file, &song);
if (result.success() && song.is_valid()) {
song.set_source(source_);
PerformEBUR128Analysis(song);