refactor(metadata): move cover resolution to extensions

This commit is contained in:
zarzet
2026-08-19 13:12:29 +07:00
parent bdb10a2ae6
commit ea63291db8
49 changed files with 42 additions and 579 deletions
@@ -81,7 +81,6 @@ Map<String, dynamic> buildBatchReEnrichRequest({
final request = <String, dynamic>{
'file_path': item.filePath,
'cover_url': '',
'max_quality': true,
'embed_lyrics': settings.embedLyrics,
'lyrics_mode': settings.lyricsMode,
'artist_tag_mode': settings.artistTagMode,
-1
View File
@@ -37,7 +37,6 @@ class CoverDownloadService {
final download = await PlatformBridge.downloadCoverToFile(
normalizedUrl,
tempPath,
maxQuality: true,
);
final error = download['error']?.toString().trim() ?? '';
if (error.isNotEmpty) throw StateError(error);
@@ -18,7 +18,6 @@ class DownloadRequestPayload {
final bool embedMetadata;
final String artistTagMode;
final bool embedLyrics;
final bool embedMaxQualityCover;
final bool embedReplayGain;
final bool postProcessingEnabled;
final String tidalHighFormat;
@@ -80,7 +79,6 @@ class DownloadRequestPayload {
this.embedMetadata = true,
this.artistTagMode = 'joined',
this.embedLyrics = true,
this.embedMaxQualityCover = true,
this.embedReplayGain = false,
this.postProcessingEnabled = false,
this.tidalHighFormat = 'mp3_320',
@@ -144,7 +142,6 @@ class DownloadRequestPayload {
'embed_metadata': embedMetadata,
'artist_tag_mode': artistTagMode,
'embed_lyrics': embedLyrics,
'embed_max_quality_cover': embedMaxQualityCover,
'embed_replaygain': embedReplayGain,
'post_processing_enabled': postProcessingEnabled,
'tidal_high_format': tidalHighFormat,
@@ -212,7 +209,6 @@ class DownloadRequestPayload {
embedMetadata: embedMetadata,
artistTagMode: artistTagMode,
embedLyrics: embedLyrics,
embedMaxQualityCover: embedMaxQualityCover,
embedReplayGain: embedReplayGain,
postProcessingEnabled: postProcessingEnabled,
tidalHighFormat: tidalHighFormat,
+2 -4
View File
@@ -899,13 +899,11 @@ class PlatformBridge {
static Future<Map<String, dynamic>> downloadCoverToFile(
String coverUrl,
String outputPath, {
bool maxQuality = true,
}) {
String outputPath,
) {
return _invokeMap('downloadCoverToFile', {
'cover_url': coverUrl,
'output_path': outputPath,
'max_quality': maxQuality,
});
}