feat: rename History tab to Library and show local library items

- Rename bottom navigation 'History' to 'Library'
- Add Local Library section showing scanned tracks below downloaded tracks
- Add source badge to each item (Downloaded/Local) for clear identification
- Add new localization strings for Library tab and source badges
- Local library items can be played directly from the library tab
This commit is contained in:
zarzet
2026-02-03 19:53:53 +07:00
parent 22f001a735
commit 9c22f41a3e
29 changed files with 2969 additions and 80 deletions
+5
View File
@@ -44,6 +44,7 @@ class AppSettings {
final String cloudUsername; // Server username
final String cloudPassword; // Server password (stored securely)
final String cloudRemotePath; // Remote folder path (e.g. /Music/SpotiFLAC)
final bool cloudAllowInsecureHttp; // Allow HTTP for WebDAV (insecure)
// Local Library Settings
final bool localLibraryEnabled; // Enable local library scanning
@@ -90,6 +91,7 @@ class AppSettings {
this.cloudUsername = '',
this.cloudPassword = '',
this.cloudRemotePath = '/Music/SpotiFLAC',
this.cloudAllowInsecureHttp = false,
// Local Library defaults
this.localLibraryEnabled = false,
this.localLibraryPath = '',
@@ -137,6 +139,7 @@ class AppSettings {
String? cloudUsername,
String? cloudPassword,
String? cloudRemotePath,
bool? cloudAllowInsecureHttp,
// Local Library
bool? localLibraryEnabled,
String? localLibraryPath,
@@ -182,6 +185,8 @@ class AppSettings {
cloudUsername: cloudUsername ?? this.cloudUsername,
cloudPassword: cloudPassword ?? this.cloudPassword,
cloudRemotePath: cloudRemotePath ?? this.cloudRemotePath,
cloudAllowInsecureHttp:
cloudAllowInsecureHttp ?? this.cloudAllowInsecureHttp,
// Local Library
localLibraryEnabled: localLibraryEnabled ?? this.localLibraryEnabled,
localLibraryPath: localLibraryPath ?? this.localLibraryPath,
+3
View File
@@ -48,6 +48,8 @@ AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => AppSettings(
cloudUsername: json['cloudUsername'] as String? ?? '',
cloudPassword: json['cloudPassword'] as String? ?? '',
cloudRemotePath: json['cloudRemotePath'] as String? ?? '/Music/SpotiFLAC',
cloudAllowInsecureHttp:
json['cloudAllowInsecureHttp'] as bool? ?? false,
localLibraryEnabled: json['localLibraryEnabled'] as bool? ?? false,
localLibraryPath: json['localLibraryPath'] as String? ?? '',
localLibraryShowDuplicates:
@@ -94,6 +96,7 @@ Map<String, dynamic> _$AppSettingsToJson(AppSettings instance) =>
'cloudUsername': instance.cloudUsername,
'cloudPassword': instance.cloudPassword,
'cloudRemotePath': instance.cloudRemotePath,
'cloudAllowInsecureHttp': instance.cloudAllowInsecureHttp,
'localLibraryEnabled': instance.localLibraryEnabled,
'localLibraryPath': instance.localLibraryPath,
'localLibraryShowDuplicates': instance.localLibraryShowDuplicates,