feat: add AAC lossy target and toggle for Apple Music eLRC word sync

The HIGH-quality lossy format picker can now produce an AAC/M4A 320 kbps output alongside MP3 and Opus. FFmpegService.convertM4aToLossy/convertAudioFormat, the Dart queue pipeline, the Kotlin finalizer, and the library database format helper all route .m4a through a unified aac codec path and tag the resulting file with the M4A metadata writer. The Lossy Format setting gains a new option, and the track metadata convert dialog lists AAC next to the other targets.

Apple Music lyrics gain a 'eLRC word sync' switch (default off). When disabled the pax-to-LRC formatter strips inline word timestamps, producing line-synced LRC that is safer for players that choke on eLRC; enabling it restores the previous word-by-word behaviour. The change propagates through SetLyricsFetchOptions and invalidates the global lyrics cache on toggle.

Broad l10n migration: roughly 400 previously hardcoded English strings across queue, settings, track metadata, repo, audio analysis, setup and extension screens now live in the ARB catalog, with matching plural/placeholder forms. No behaviour change beyond localisation. Existing and new unit tests (lyrics eLRC toggle and Dart settings round-trip) pass.
This commit is contained in:
zarzet
2026-05-12 02:23:04 +07:00
parent 7845ac8be5
commit 2a2d817314
47 changed files with 6428 additions and 277 deletions
+6 -7
View File
@@ -182,7 +182,9 @@ class _AudioAnalysisCardState extends State<AudioAnalysisCard> {
await _clearCache(widget.filePath);
}
final cached = forceRefresh ? null : await _loadFromCache(widget.filePath);
final cached = forceRefresh
? null
: await _loadFromCache(widget.filePath);
AudioAnalysisData data;
bool fromCache = false;
@@ -571,10 +573,7 @@ class _AudioAnalysisCardState extends State<AudioAnalysisCard> {
tooltip: l10n.audioAnalysisRescan,
visualDensity: VisualDensity.compact,
padding: EdgeInsets.zero,
constraints: const BoxConstraints(
minWidth: 32,
minHeight: 32,
),
constraints: const BoxConstraints(minWidth: 32, minHeight: 32),
color: cs.onErrorContainer,
onPressed: () => _analyze(forceRefresh: true),
),
@@ -904,9 +903,9 @@ class _AudioInfoCard extends StatelessWidget {
icon: Icons.surround_sound,
label: context.l10n.audioAnalysisChannels,
value: data.channels == 2
? 'Stereo'
? context.l10n.audioAnalysisStereo
: data.channels == 1
? 'Mono'
? context.l10n.audioAnalysisMono
: '${data.channels}',
cs: cs,
),
+6 -6
View File
@@ -380,7 +380,7 @@ class _ServiceHealthDot extends StatelessWidget {
Widget build(BuildContext context) {
final color = _serviceHealthColor(status);
return Tooltip(
message: _serviceHealthTooltip(status),
message: _serviceHealthTooltip(context, status),
child: Container(
width: 8,
height: 8,
@@ -404,16 +404,16 @@ Color _serviceHealthColor(String status) {
}
}
String _serviceHealthTooltip(String status) {
String _serviceHealthTooltip(BuildContext context, String status) {
switch (status) {
case 'online':
return 'Service online';
return context.l10n.extensionHealthServiceOnline;
case 'degraded':
return 'Service degraded';
return context.l10n.extensionHealthServiceDegraded;
case 'offline':
return 'Service offline';
return context.l10n.extensionHealthServiceOffline;
default:
return 'Service status unknown';
return context.l10n.extensionHealthServiceUnknown;
}
}
+7 -3
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:spotiflac_android/l10n/l10n.dart';
import 'package:spotiflac_android/utils/app_bar_layout.dart';
class PrioritySettingsScaffold extends StatelessWidget {
@@ -6,7 +7,7 @@ class PrioritySettingsScaffold extends StatelessWidget {
final String title;
final String description;
final String infoText;
final String saveLabel;
final String? saveLabel;
final EdgeInsetsGeometry descriptionPadding;
final List<Widget> slivers;
final Future<void> Function() onSave;
@@ -21,7 +22,7 @@ class PrioritySettingsScaffold extends StatelessWidget {
required this.slivers,
required this.onSave,
required this.onConfirmDiscard,
this.saveLabel = 'Save',
this.saveLabel,
this.descriptionPadding = const EdgeInsets.fromLTRB(16, 4, 16, 8),
});
@@ -67,7 +68,10 @@ class PrioritySettingsScaffold extends StatelessWidget {
),
actions: [
if (hasChanges)
TextButton(onPressed: onSave, child: Text(saveLabel)),
TextButton(
onPressed: onSave,
child: Text(saveLabel ?? context.l10n.dialogSave),
),
],
flexibleSpace: LayoutBuilder(
builder: (context, constraints) {