mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-09 14:18:11 +02:00
fix: Samsung SAF library scan, Qobuz album cover, M4A metadata save and log improvements
- Fix M4A/ALAC scan silently failing on Samsung by adding proper fallback to scanFromFilename when ReadM4ATags fails (consistent with MP3/FLAC/Ogg) - Propagate displayNameHint to all format scanners so fd numbers (214, 207) no longer appear as track names when /proc/self/fd/ paths are used - Cache /proc/self/fd/ readability in Kotlin to skip failed attempts after first failure, reducing error log noise and improving scan speed on Samsung - Fix Qobuz download returning wrong album cover when track exists on multiple albums by preferring req.CoverURL over API default - Fix FFmpeg M4A metadata save failing with 'codec not currently supported in container' by forcing mp4 muxer instead of ipod when cover art present - Clean up FLAC SAF temp file after metadata write-back (was leaking) - Update LRC lyrics tag to credit Paxsenix API - Remove log message truncation, defer to UI preview truncation instead
This commit is contained in:
@@ -519,7 +519,7 @@ class _LogEntryTile extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
entry.message,
|
||||
entry.previewMessage,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontFamily: 'monospace',
|
||||
@@ -527,10 +527,10 @@ class _LogEntryTile extends StatelessWidget {
|
||||
height: 1.4,
|
||||
),
|
||||
),
|
||||
if (entry.error != null) ...[
|
||||
if (entry.previewError != null) ...[
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
entry.error!,
|
||||
entry.previewError!,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontFamily: 'monospace',
|
||||
|
||||
@@ -1158,8 +1158,11 @@ class FFmpegService {
|
||||
// For M4A/MP4, cover art is mapped as a video stream and stored in the
|
||||
// 'covr' atom automatically by FFmpeg. The '-disposition attached_pic'
|
||||
// flag is only valid for Matroska/WebM containers and must NOT be used here.
|
||||
// Force the mp4 muxer when cover art is present because the default ipod
|
||||
// muxer (auto-selected for .m4a) does not register a codec tag for mjpeg,
|
||||
// causing "codec not currently supported in container" on FFmpeg 8.0+.
|
||||
if (hasCover) {
|
||||
cmdBuffer.write('-map 1:v -c:v copy ');
|
||||
cmdBuffer.write('-map 1:v -c:v copy -f mp4 ');
|
||||
}
|
||||
|
||||
cmdBuffer.write('-c:a copy ');
|
||||
|
||||
@@ -89,6 +89,10 @@ class LogEntry {
|
||||
return '$h:$m:$s.$ms';
|
||||
}
|
||||
|
||||
String get previewMessage => _truncateLogText(message);
|
||||
|
||||
String? get previewError => error == null ? null : _truncateLogText(error!);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
final errorPart = error != null ? ' | $error' : '';
|
||||
@@ -128,11 +132,9 @@ class LogBuffer extends ChangeNotifier {
|
||||
return;
|
||||
}
|
||||
|
||||
final sanitizedMessage = _truncateLogText(
|
||||
_redactSensitiveText(entry.message),
|
||||
);
|
||||
final sanitizedMessage = _redactSensitiveText(entry.message);
|
||||
final sanitizedError = entry.error != null
|
||||
? _truncateLogText(_redactSensitiveText(entry.error!))
|
||||
? _redactSensitiveText(entry.error!)
|
||||
: null;
|
||||
final sanitizedEntry =
|
||||
(sanitizedMessage == entry.message && sanitizedError == entry.error)
|
||||
@@ -381,9 +383,7 @@ class BufferedOutput extends LogOutput {
|
||||
}
|
||||
|
||||
final level = _levelToString(event.level);
|
||||
final message = _truncateLogText(
|
||||
_redactSensitiveText(event.lines.join('\n')),
|
||||
);
|
||||
final message = _redactSensitiveText(event.lines.join('\n'));
|
||||
|
||||
LogBuffer().add(
|
||||
LogEntry(
|
||||
|
||||
Reference in New Issue
Block a user