mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-04 01:00:44 +02:00
feat(metadata): limit embedded cover resolution
This commit is contained in:
@@ -81,6 +81,7 @@ Map<String, dynamic> buildBatchReEnrichRequest({
|
||||
final request = <String, dynamic>{
|
||||
'file_path': item.filePath,
|
||||
'cover_url': '',
|
||||
'cover_max_dimension': settings.embeddedCoverMaxDimension,
|
||||
'embed_lyrics': settings.embedLyrics,
|
||||
'lyrics_mode': settings.lyricsMode,
|
||||
'artist_tag_mode': settings.artistTagMode,
|
||||
|
||||
@@ -12,6 +12,7 @@ class DownloadRequestPayload {
|
||||
final String albumName;
|
||||
final String albumArtist;
|
||||
final String coverUrl;
|
||||
final int coverMaxDimension;
|
||||
final String outputDir;
|
||||
final String filenameFormat;
|
||||
final String quality;
|
||||
@@ -74,6 +75,7 @@ class DownloadRequestPayload {
|
||||
required this.albumName,
|
||||
this.albumArtist = '',
|
||||
this.coverUrl = '',
|
||||
this.coverMaxDimension = 0,
|
||||
required this.outputDir,
|
||||
required this.filenameFormat,
|
||||
this.quality = 'LOSSLESS',
|
||||
@@ -138,6 +140,7 @@ class DownloadRequestPayload {
|
||||
'album_name': albumName,
|
||||
'album_artist': albumArtist,
|
||||
'cover_url': coverUrl,
|
||||
'cover_max_dimension': coverMaxDimension,
|
||||
'output_dir': outputDir,
|
||||
'filename_format': filenameFormat,
|
||||
'quality': quality,
|
||||
@@ -206,6 +209,7 @@ class DownloadRequestPayload {
|
||||
albumName: albumName,
|
||||
albumArtist: albumArtist,
|
||||
coverUrl: coverUrl,
|
||||
coverMaxDimension: coverMaxDimension,
|
||||
outputDir: outputDir,
|
||||
filenameFormat: filenameFormat,
|
||||
quality: quality,
|
||||
|
||||
@@ -956,11 +956,13 @@ class PlatformBridge {
|
||||
|
||||
static Future<Map<String, dynamic>> downloadCoverToFile(
|
||||
String coverUrl,
|
||||
String outputPath,
|
||||
) {
|
||||
String outputPath, {
|
||||
int maxDimension = 0,
|
||||
}) {
|
||||
return _invokeMap('downloadCoverToFile', {
|
||||
'cover_url': coverUrl,
|
||||
'output_path': outputPath,
|
||||
'max_dimension': maxDimension,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user