mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-06 12:48:03 +02:00
Merge pull request #352 from Amonoman/main
Add deduplicateDownloads setting and fix build errors
This commit is contained in:
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tippe auf Deezer oder Spotify, um von der Erweiterung zurückzuwechseln",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tap Deezer or Spotify to switch back from extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -1753,6 +1753,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsReplayGain": "ReplayGain",
|
||||
"@optionsReplayGain": {
|
||||
"description": "Title for ReplayGain setting toggle"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Toque Deezer o Spotify para volver desde la extensión",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Appuyez sur Deezer ou Spotify pour revenir à l'extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tap Deezer or Spotify to switch back from extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Ketuk Deezer atau Spotify untuk beralih dari ekstensi",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tap Deezer or Spotify to switch back from extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Deezer 또는 Spotify를 탭하여 확장 기능에서 다시 전환하세요.",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tap Deezer or Spotify to switch back from extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -1753,6 +1753,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsReplayGain": "ReplayGain",
|
||||
"@optionsReplayGain": {
|
||||
"description": "Title for ReplayGain setting toggle"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Toque no Deezer ou Spotify para alternar de volta da extensão",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Нажмите Deezer или Spotify для возврата с расширения",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Dahili kaynaklara dönmek için Deezer veya Spotify'a tıkla",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Натисніть Deezer або Spotify, щоб повернутися до розширення",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -1753,6 +1753,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsReplayGain": "ReplayGain",
|
||||
"@optionsReplayGain": {
|
||||
"description": "Title for ReplayGain setting toggle"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "点击 Deezer 或 Spotify 即可从扩展程序切换回来",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -166,6 +166,14 @@
|
||||
"@optionsDefaultSearchTabSubtitle": {
|
||||
"description": "Subtitle for the preferred default search tab setting"
|
||||
},
|
||||
"optionsDefaultSearchTabAlbums": "Albums",
|
||||
"@optionsDefaultSearchTabAlbums": {
|
||||
"description": "Default search tab option - Albums tab"
|
||||
},
|
||||
"optionsDefaultSearchTabTracks": "Tracks",
|
||||
"@optionsDefaultSearchTabTracks": {
|
||||
"description": "Default search tab option - Tracks tab"
|
||||
},
|
||||
"optionsSwitchBack": "Tap Deezer or Spotify to switch back from extension",
|
||||
"@optionsSwitchBack": {
|
||||
"description": "Hint to switch back to built-in providers"
|
||||
|
||||
@@ -82,6 +82,9 @@ class AppSettings {
|
||||
final String
|
||||
lastSeenVersion; // Last app version the user has acknowledged (e.g. '3.7.0')
|
||||
|
||||
final bool
|
||||
deduplicateDownloads; // Skip downloading tracks already present in history
|
||||
|
||||
const AppSettings({
|
||||
this.defaultService = 'tidal',
|
||||
this.audioQuality = 'LOSSLESS',
|
||||
@@ -144,6 +147,7 @@ class AppSettings {
|
||||
this.lyricsMultiPersonWordByWord = false,
|
||||
this.musixmatchLanguage = '',
|
||||
this.lastSeenVersion = '',
|
||||
this.deduplicateDownloads = true,
|
||||
});
|
||||
|
||||
AppSettings copyWith({
|
||||
@@ -205,6 +209,7 @@ class AppSettings {
|
||||
bool? lyricsMultiPersonWordByWord,
|
||||
String? musixmatchLanguage,
|
||||
String? lastSeenVersion,
|
||||
bool? deduplicateDownloads,
|
||||
}) {
|
||||
return AppSettings(
|
||||
defaultService: defaultService ?? this.defaultService,
|
||||
@@ -281,6 +286,7 @@ class AppSettings {
|
||||
lyricsMultiPersonWordByWord ?? this.lyricsMultiPersonWordByWord,
|
||||
musixmatchLanguage: musixmatchLanguage ?? this.musixmatchLanguage,
|
||||
lastSeenVersion: lastSeenVersion ?? this.lastSeenVersion,
|
||||
deduplicateDownloads: deduplicateDownloads ?? this.deduplicateDownloads,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -544,6 +544,11 @@ class SettingsNotifier extends Notifier<AppSettings> {
|
||||
state = state.copyWith(hasCompletedTutorial: true);
|
||||
_saveSettings();
|
||||
}
|
||||
|
||||
void setDeduplicateDownloads(bool enabled) {
|
||||
state = state.copyWith(deduplicateDownloads: enabled);
|
||||
_saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
final settingsProvider = NotifierProvider<SettingsNotifier, AppSettings>(
|
||||
|
||||
@@ -753,7 +753,7 @@ class _FilesSettingsPageState extends ConsumerState<FilesSettingsPage> {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
description ?? context.l10n.downloadFilenameDescription,
|
||||
description ?? context.l10n.downloadFilenameDescription as String,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user