mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-19 09:27:14 +02:00
chore: remove redundant inline comments
This commit is contained in:
@@ -315,7 +315,6 @@ class LocalLibraryNotifier extends Notifier<LocalLibraryState> {
|
||||
int skippedDownloads = 0;
|
||||
for (final json in results) {
|
||||
final filePath = json['filePath'] as String?;
|
||||
// Skip files that are already in download history
|
||||
if (_isDownloadedPath(filePath, downloadedPathKeys)) {
|
||||
skippedDownloads++;
|
||||
continue;
|
||||
@@ -464,7 +463,6 @@ class LocalLibraryNotifier extends Notifier<LocalLibraryState> {
|
||||
}
|
||||
}
|
||||
|
||||
// Delete removed items
|
||||
if (deletedPaths.isNotEmpty) {
|
||||
final deleteCount = await _db.deleteByPaths(deletedPaths);
|
||||
for (final path in deletedPaths) {
|
||||
|
||||
@@ -70,7 +70,7 @@ class RecentAccessItem {
|
||||
/// State for recent access history
|
||||
class RecentAccessState {
|
||||
final List<RecentAccessItem> items;
|
||||
final Set<String> hiddenDownloadIds; // IDs of downloads hidden from recents
|
||||
final Set<String> hiddenDownloadIds;
|
||||
final bool isLoaded;
|
||||
|
||||
const RecentAccessState({
|
||||
|
||||
@@ -125,7 +125,6 @@ class _DownloadedAlbumScreenState extends ConsumerState<DownloadedAlbumScreen> {
|
||||
(item.albumArtist != null && item.albumArtist!.isNotEmpty)
|
||||
? item.albumArtist!
|
||||
: item.artistName;
|
||||
// Use lowercase for case-insensitive matching
|
||||
final itemKey =
|
||||
'${item.albumName.toLowerCase()}|${itemArtist.toLowerCase()}';
|
||||
return itemKey == _albumLookupKey;
|
||||
|
||||
@@ -105,7 +105,7 @@ class UnifiedLibraryItem {
|
||||
artistName: item.artistName,
|
||||
albumName: item.albumName,
|
||||
coverUrl: null, // Local library doesn't have cover URLs
|
||||
localCoverPath: item.coverPath, // Use extracted cover path
|
||||
localCoverPath: item.coverPath,
|
||||
filePath: item.filePath,
|
||||
quality: quality,
|
||||
addedAt: item.fileModTime != null
|
||||
@@ -2067,7 +2067,6 @@ class _QueueTabState extends ConsumerState<QueueTab> {
|
||||
final albumCounts = <String, int>{};
|
||||
final albumMap = <String, List<DownloadHistoryItem>>{};
|
||||
for (final item in items) {
|
||||
// Use lowercase key for case-insensitive grouping
|
||||
final key =
|
||||
'${item.albumName.toLowerCase()}|${(item.albumArtist ?? item.artistName).toLowerCase()}';
|
||||
albumCounts[key] = (albumCounts[key] ?? 0) + 1;
|
||||
|
||||
@@ -121,7 +121,6 @@ class _StoreTabState extends ConsumerState<StoreTab> {
|
||||
),
|
||||
),
|
||||
|
||||
// Show setup screen if no registry URL is configured
|
||||
if (!hasRegistryUrl)
|
||||
SliverFillRemaining(
|
||||
child: _buildSetupRepoState(colorScheme, error),
|
||||
|
||||
@@ -64,9 +64,9 @@ class _TrackMetadataScreenState extends ConsumerState<TrackMetadataScreen> {
|
||||
String? _lyricsError;
|
||||
String? _lyricsSource;
|
||||
bool _showTitleInAppBar = false;
|
||||
bool _lyricsEmbedded = false; // Track if lyrics are embedded in file
|
||||
bool _lyricsEmbedded = false;
|
||||
bool _isEmbedding = false; // Track embed operation in progress
|
||||
bool _isInstrumental = false; // Track if detected as instrumental
|
||||
bool _isInstrumental = false;
|
||||
bool _isConverting = false; // Track convert operation in progress
|
||||
bool _hasMetadataChanges = false;
|
||||
bool _hasLoadedResolvedAudioMetadata = false;
|
||||
|
||||
@@ -1385,7 +1385,6 @@ class FFmpegService {
|
||||
final track = tracks[i];
|
||||
onProgress?.call(i + 1, tracks.length);
|
||||
|
||||
// Sanitize filename
|
||||
final sanitizedTitle = track.title
|
||||
.replaceAll(RegExp(r'[<>:"/\\|?*]'), '_')
|
||||
.replaceAll(RegExp(r'\s+'), ' ')
|
||||
@@ -1394,11 +1393,9 @@ class FFmpegService {
|
||||
final outputFileName = '$trackNumStr - $sanitizedTitle.$outputExt';
|
||||
final outputPath = '$outputDir${Platform.pathSeparator}$outputFileName';
|
||||
|
||||
// Build FFmpeg command for this track
|
||||
final StringBuffer cmdBuffer = StringBuffer();
|
||||
cmdBuffer.write('-i "$audioPath" ');
|
||||
|
||||
// Time range
|
||||
final startTime = _formatSecondsForFFmpeg(track.startSec);
|
||||
cmdBuffer.write('-ss $startTime ');
|
||||
|
||||
@@ -1413,7 +1410,6 @@ class FFmpegService {
|
||||
cmdBuffer.write('-c:a copy ');
|
||||
}
|
||||
|
||||
// Metadata
|
||||
final artist = track.artist.isNotEmpty ? track.artist : (albumMetadata['artist'] ?? '');
|
||||
final album = albumMetadata['album'] ?? '';
|
||||
final genre = albumMetadata['genre'] ?? '';
|
||||
|
||||
@@ -176,7 +176,6 @@ class LibraryDatabase {
|
||||
_log.i('Upgrading library database from v$oldVersion to v$newVersion');
|
||||
|
||||
if (oldVersion < 2) {
|
||||
// Add cover_path column
|
||||
await db.execute('ALTER TABLE library ADD COLUMN cover_path TEXT');
|
||||
_log.i('Added cover_path column');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user