Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Rework the upcoming releases scan to skip finished series, find missing books with a deep scan, and notify when tracked books release

Barnabasf39faf784daa
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index fd227510..69b012e8 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -538,8 +538,8 @@
"settingsPodcastTabDesc": "Give one podcast library its own tab in the bottom bar",
"settingsPodcastTabLibrary": "Podcasts tab library",
"settingsMergeImpliedByPodcastTab": "Always on while the Podcasts tab is enabled",
- "settingsEpisodeNotifs": "New episode notifications",
- "settingsEpisodeNotifsDesc": "Check subscribed shows in the background",
+ "settingsEpisodeNotifs": "Notification settings",
+ "settingsEpisodeNotifsDesc": "New podcast episodes and upcoming book releases, checked in the background",
"notifIntervalOff": "Off",
"notifIntervalMinutes": "Every {n} minutes",
"@notifIntervalMinutes": {
@@ -3113,6 +3113,209 @@
"upcomingReleasesBadgeUpcoming": "UPCOMING",
"upcomingReleasesBadgeAdded": "ADDED",
"upcomingReleasesBadgeMissing": "MISSING",
+ "upcomingReleasesScanSettingsTitle": "Scan settings",
+ "upcomingReleasesFinishedAfterTitle": "Consider a series finished after",
+ "upcomingReleasesFinishedAfterDesc": "Series whose last book is older than this are skipped during scans and only re-checked every month or two.",
+ "upcomingReleasesFinishedAfterYears": "{count, plural, =1{1 year} other{{count} years}}",
+ "@upcomingReleasesFinishedAfterYears": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesFinishedAfterNever": "Never",
+ "upcomingReleasesSkippedTitle": "Skipped series",
+ "upcomingReleasesSkippedNone": "Nothing skipped yet",
+ "upcomingReleasesSkippedCount": "{count, plural, =1{1 skipped} other{{count} skipped}}",
+ "@upcomingReleasesSkippedCount": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesSkippedLastBook": "{count, plural, =0{Last book under a year ago} =1{Last book 1 year ago} other{Last book {count} years ago}}",
+ "@upcomingReleasesSkippedLastBook": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesSkippedUnmatched": "Couldn't match this series on Audible",
+ "upcomingReleasesSkippedScanNow": "Scan now",
+ "upcomingReleasesSkippedAlwaysScan": "Always scan",
+ "upcomingReleasesSkippedNeverScan": "Never scan",
+ "upcomingReleasesSkippedScanFound": "Found new releases in {name}",
+ "@upcomingReleasesSkippedScanFound": {
+ "placeholders": {
+ "name": {
+ "type": "String"
+ }
+ }
+ },
+ "upcomingReleasesSkippedScanNone": "Nothing new in {name}",
+ "@upcomingReleasesSkippedScanNone": {
+ "placeholders": {
+ "name": {
+ "type": "String"
+ }
+ }
+ },
+ "upcomingReleasesSkippedOtherLibrary": "This list came from a different library. Run a rescan to refresh it.",
+ "upcomingReleasesChipUpcoming": "Upcoming",
+ "upcomingReleasesChipMissing": "{count, plural, =0{Missing} =1{1 missing} other{{count} missing}}",
+ "@upcomingReleasesChipMissing": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesNoMissing": "No missing books found",
+ "upcomingReleasesScanSeries": "Scan series",
+ "upcomingReleasesScanUpcomingOption": "Upcoming releases",
+ "upcomingReleasesScanUpcomingOptionDesc": "Quick scan for new and upcoming books",
+ "upcomingReleasesScanDeepOption": "Deep scan",
+ "upcomingReleasesScanDeepOptionDesc": "Also finds missing books in every series - takes longer",
+ "upcomingReleasesFirstScanNote": "The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.",
+ "upcomingReleasesLastScanReport": "Last scan report",
+ "upcomingReleasesReportChecked": "Checked on Audible: {count}",
+ "@upcomingReleasesReportChecked": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportSkipped": "Skipped: {count}",
+ "@upcomingReleasesReportSkipped": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportUnmatched": "Couldn't match on Audible: {count}",
+ "@upcomingReleasesReportUnmatched": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportFailed": "Failed to check: {count}",
+ "@upcomingReleasesReportFailed": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportFound": "Found {upcoming} upcoming, {recent} recent",
+ "@upcomingReleasesReportFound": {
+ "placeholders": {
+ "upcoming": {
+ "type": "int"
+ },
+ "recent": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportFoundDeep": "Found {upcoming} upcoming, {recent} recent, {missing} missing",
+ "@upcomingReleasesReportFoundDeep": {
+ "placeholders": {
+ "upcoming": {
+ "type": "int"
+ },
+ "recent": {
+ "type": "int"
+ },
+ "missing": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesReportMore": "+{count} more",
+ "@upcomingReleasesReportMore": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesBadgeNew": "NEW",
+ "upcomingReleasesOpenSeries": "Open series on Audible",
+ "upcomingReleasesOpenLibrarySeries": "Open series in library",
+ "upcomingReleasesAsinCopied": "Series ASIN copied",
+ "upcomingReleasesSetSeriesAsin": "Set series ASIN",
+ "upcomingReleasesSetAsinInstructions": "Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.",
+ "upcomingReleasesSetAsinHint": "B0… or audible.com link",
+ "upcomingReleasesSetAsinSave": "Save",
+ "upcomingReleasesSetAsinInvalid": "No ASIN found in that text",
+ "upcomingReleasesSetAsinSaved": "Series linked - scanning now",
+ "upcomingReleasesRemoveTitle": "{count, plural, =1{Remove book} other{Remove {count} books}}",
+ "@upcomingReleasesRemoveTitle": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesRemoveThisScan": "Remove from this scan",
+ "upcomingReleasesRemoveThisScanDesc": "Can come back on a future scan",
+ "upcomingReleasesRemoveForever": "Remove from this and future scans",
+ "upcomingReleasesRemoveForeverDesc": "Goes to the removed list, restore any time",
+ "upcomingReleasesRemovedForeverToast": "Removed - won't show on future scans",
+ "upcomingReleasesRemovedBooksTitle": "Removed books",
+ "upcomingReleasesRemovedCount": "{count, plural, =1{1 book} other{{count} books}}",
+ "@upcomingReleasesRemovedCount": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesRemovedNone": "No removed books",
+ "upcomingReleasesRestore": "Restore",
+ "upcomingReleasesRestoredToast": "Restored",
+ "upcomingReleasesRestoredNextScan": "Restored - it will show after the next scan",
+ "upcomingReleasesSelectedCount": "{count, plural, =1{1 selected} other{{count} selected}}",
+ "@upcomingReleasesSelectedCount": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesBulkRequest": "Request",
+ "upcomingReleasesBulkRemove": "Remove",
+ "upcomingReleasesBulkRemoved": "{count, plural, =1{1 removed} other{{count} removed}}",
+ "@upcomingReleasesBulkRemoved": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesBulkRequestDone": "{count, plural, =1{1 request sent} other{{count} requests sent}}",
+ "@upcomingReleasesBulkRequestDone": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
+ "upcomingReleasesBulkRequestSkipped": "{count} skipped",
+ "@upcomingReleasesBulkRequestSkipped": {
+ "placeholders": {
+ "count": {
+ "type": "int"
+ }
+ }
+ },
"homeScreenEpisodeFallback": "Episode",
"libraryScreenUnknownTitle": "Unknown Title",
"playlistDetailDefaultName": "Playlist",
@@ -3308,8 +3511,8 @@
},
"notesExport": "Export",
"notesNewNote": "New note",
- "librarySortFilterUpcomingReleases": "Upcoming Releases",
- "librarySortFilterUpcomingReleasesSubtitle": "Scan Audible for new releases in your series",
+ "librarySortFilterUpcomingReleases": "Scan Series",
+ "librarySortFilterUpcomingReleasesSubtitle": "Check Audible for upcoming and missing books in your series",
"sleepTimerSheetChaptersLeft": "{count, plural, =1{1 chapter left} other{{count} chapters left}}",
"@sleepTimerSheetChaptersLeft": {
"placeholders": {
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index 42f8cb5c..5e01d084 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -2089,13 +2089,13 @@ abstract class AppLocalizations {
/// No description provided for @settingsEpisodeNotifs.
///
/// In en, this message translates to:
- /// **'New episode notifications'**
+ /// **'Notification settings'**
String get settingsEpisodeNotifs;
/// No description provided for @settingsEpisodeNotifsDesc.
///
/// In en, this message translates to:
- /// **'Check subscribed shows in the background'**
+ /// **'New podcast episodes and upcoming book releases, checked in the background'**
String get settingsEpisodeNotifsDesc;
/// No description provided for @notifIntervalOff.
@@ -9621,6 +9621,372 @@ abstract class AppLocalizations {
/// **'MISSING'**
String get upcomingReleasesBadgeMissing;
+ /// No description provided for @upcomingReleasesScanSettingsTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Scan settings'**
+ String get upcomingReleasesScanSettingsTitle;
+
+ /// No description provided for @upcomingReleasesFinishedAfterTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Consider a series finished after'**
+ String get upcomingReleasesFinishedAfterTitle;
+
+ /// No description provided for @upcomingReleasesFinishedAfterDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Series whose last book is older than this are skipped during scans and only re-checked every month or two.'**
+ String get upcomingReleasesFinishedAfterDesc;
+
+ /// No description provided for @upcomingReleasesFinishedAfterYears.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 year} other{{count} years}}'**
+ String upcomingReleasesFinishedAfterYears(int count);
+
+ /// No description provided for @upcomingReleasesFinishedAfterNever.
+ ///
+ /// In en, this message translates to:
+ /// **'Never'**
+ String get upcomingReleasesFinishedAfterNever;
+
+ /// No description provided for @upcomingReleasesSkippedTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Skipped series'**
+ String get upcomingReleasesSkippedTitle;
+
+ /// No description provided for @upcomingReleasesSkippedNone.
+ ///
+ /// In en, this message translates to:
+ /// **'Nothing skipped yet'**
+ String get upcomingReleasesSkippedNone;
+
+ /// No description provided for @upcomingReleasesSkippedCount.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 skipped} other{{count} skipped}}'**
+ String upcomingReleasesSkippedCount(int count);
+
+ /// No description provided for @upcomingReleasesSkippedLastBook.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =0{Last book under a year ago} =1{Last book 1 year ago} other{Last book {count} years ago}}'**
+ String upcomingReleasesSkippedLastBook(int count);
+
+ /// No description provided for @upcomingReleasesSkippedUnmatched.
+ ///
+ /// In en, this message translates to:
+ /// **'Couldn\'t match this series on Audible'**
+ String get upcomingReleasesSkippedUnmatched;
+
+ /// No description provided for @upcomingReleasesSkippedScanNow.
+ ///
+ /// In en, this message translates to:
+ /// **'Scan now'**
+ String get upcomingReleasesSkippedScanNow;
+
+ /// No description provided for @upcomingReleasesSkippedAlwaysScan.
+ ///
+ /// In en, this message translates to:
+ /// **'Always scan'**
+ String get upcomingReleasesSkippedAlwaysScan;
+
+ /// No description provided for @upcomingReleasesSkippedNeverScan.
+ ///
+ /// In en, this message translates to:
+ /// **'Never scan'**
+ String get upcomingReleasesSkippedNeverScan;
+
+ /// No description provided for @upcomingReleasesSkippedScanFound.
+ ///
+ /// In en, this message translates to:
+ /// **'Found new releases in {name}'**
+ String upcomingReleasesSkippedScanFound(String name);
+
+ /// No description provided for @upcomingReleasesSkippedScanNone.
+ ///
+ /// In en, this message translates to:
+ /// **'Nothing new in {name}'**
+ String upcomingReleasesSkippedScanNone(String name);
+
+ /// No description provided for @upcomingReleasesSkippedOtherLibrary.
+ ///
+ /// In en, this message translates to:
+ /// **'This list came from a different library. Run a rescan to refresh it.'**
+ String get upcomingReleasesSkippedOtherLibrary;
+
+ /// No description provided for @upcomingReleasesChipUpcoming.
+ ///
+ /// In en, this message translates to:
+ /// **'Upcoming'**
+ String get upcomingReleasesChipUpcoming;
+
+ /// No description provided for @upcomingReleasesChipMissing.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =0{Missing} =1{1 missing} other{{count} missing}}'**
+ String upcomingReleasesChipMissing(int count);
+
+ /// No description provided for @upcomingReleasesNoMissing.
+ ///
+ /// In en, this message translates to:
+ /// **'No missing books found'**
+ String get upcomingReleasesNoMissing;
+
+ /// No description provided for @upcomingReleasesScanSeries.
+ ///
+ /// In en, this message translates to:
+ /// **'Scan series'**
+ String get upcomingReleasesScanSeries;
+
+ /// No description provided for @upcomingReleasesScanUpcomingOption.
+ ///
+ /// In en, this message translates to:
+ /// **'Upcoming releases'**
+ String get upcomingReleasesScanUpcomingOption;
+
+ /// No description provided for @upcomingReleasesScanUpcomingOptionDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Quick scan for new and upcoming books'**
+ String get upcomingReleasesScanUpcomingOptionDesc;
+
+ /// No description provided for @upcomingReleasesScanDeepOption.
+ ///
+ /// In en, this message translates to:
+ /// **'Deep scan'**
+ String get upcomingReleasesScanDeepOption;
+
+ /// No description provided for @upcomingReleasesScanDeepOptionDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Also finds missing books in every series - takes longer'**
+ String get upcomingReleasesScanDeepOptionDesc;
+
+ /// No description provided for @upcomingReleasesFirstScanNote.
+ ///
+ /// In en, this message translates to:
+ /// **'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.'**
+ String get upcomingReleasesFirstScanNote;
+
+ /// No description provided for @upcomingReleasesLastScanReport.
+ ///
+ /// In en, this message translates to:
+ /// **'Last scan report'**
+ String get upcomingReleasesLastScanReport;
+
+ /// No description provided for @upcomingReleasesReportChecked.
+ ///
+ /// In en, this message translates to:
+ /// **'Checked on Audible: {count}'**
+ String upcomingReleasesReportChecked(int count);
+
+ /// No description provided for @upcomingReleasesReportSkipped.
+ ///
+ /// In en, this message translates to:
+ /// **'Skipped: {count}'**
+ String upcomingReleasesReportSkipped(int count);
+
+ /// No description provided for @upcomingReleasesReportUnmatched.
+ ///
+ /// In en, this message translates to:
+ /// **'Couldn\'t match on Audible: {count}'**
+ String upcomingReleasesReportUnmatched(int count);
+
+ /// No description provided for @upcomingReleasesReportFailed.
+ ///
+ /// In en, this message translates to:
+ /// **'Failed to check: {count}'**
+ String upcomingReleasesReportFailed(int count);
+
+ /// No description provided for @upcomingReleasesReportFound.
+ ///
+ /// In en, this message translates to:
+ /// **'Found {upcoming} upcoming, {recent} recent'**
+ String upcomingReleasesReportFound(int upcoming, int recent);
+
+ /// No description provided for @upcomingReleasesReportFoundDeep.
+ ///
+ /// In en, this message translates to:
+ /// **'Found {upcoming} upcoming, {recent} recent, {missing} missing'**
+ String upcomingReleasesReportFoundDeep(int upcoming, int recent, int missing);
+
+ /// No description provided for @upcomingReleasesReportMore.
+ ///
+ /// In en, this message translates to:
+ /// **'+{count} more'**
+ String upcomingReleasesReportMore(int count);
+
+ /// No description provided for @upcomingReleasesBadgeNew.
+ ///
+ /// In en, this message translates to:
+ /// **'NEW'**
+ String get upcomingReleasesBadgeNew;
+
+ /// No description provided for @upcomingReleasesOpenSeries.
+ ///
+ /// In en, this message translates to:
+ /// **'Open series on Audible'**
+ String get upcomingReleasesOpenSeries;
+
+ /// No description provided for @upcomingReleasesOpenLibrarySeries.
+ ///
+ /// In en, this message translates to:
+ /// **'Open series in library'**
+ String get upcomingReleasesOpenLibrarySeries;
+
+ /// No description provided for @upcomingReleasesAsinCopied.
+ ///
+ /// In en, this message translates to:
+ /// **'Series ASIN copied'**
+ String get upcomingReleasesAsinCopied;
+
+ /// No description provided for @upcomingReleasesSetSeriesAsin.
+ ///
+ /// In en, this message translates to:
+ /// **'Set series ASIN'**
+ String get upcomingReleasesSetSeriesAsin;
+
+ /// No description provided for @upcomingReleasesSetAsinInstructions.
+ ///
+ /// In en, this message translates to:
+ /// **'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.'**
+ String get upcomingReleasesSetAsinInstructions;
+
+ /// No description provided for @upcomingReleasesSetAsinHint.
+ ///
+ /// In en, this message translates to:
+ /// **'B0… or audible.com link'**
+ String get upcomingReleasesSetAsinHint;
+
+ /// No description provided for @upcomingReleasesSetAsinSave.
+ ///
+ /// In en, this message translates to:
+ /// **'Save'**
+ String get upcomingReleasesSetAsinSave;
+
+ /// No description provided for @upcomingReleasesSetAsinInvalid.
+ ///
+ /// In en, this message translates to:
+ /// **'No ASIN found in that text'**
+ String get upcomingReleasesSetAsinInvalid;
+
+ /// No description provided for @upcomingReleasesSetAsinSaved.
+ ///
+ /// In en, this message translates to:
+ /// **'Series linked - scanning now'**
+ String get upcomingReleasesSetAsinSaved;
+
+ /// No description provided for @upcomingReleasesRemoveTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{Remove book} other{Remove {count} books}}'**
+ String upcomingReleasesRemoveTitle(int count);
+
+ /// No description provided for @upcomingReleasesRemoveThisScan.
+ ///
+ /// In en, this message translates to:
+ /// **'Remove from this scan'**
+ String get upcomingReleasesRemoveThisScan;
+
+ /// No description provided for @upcomingReleasesRemoveThisScanDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Can come back on a future scan'**
+ String get upcomingReleasesRemoveThisScanDesc;
+
+ /// No description provided for @upcomingReleasesRemoveForever.
+ ///
+ /// In en, this message translates to:
+ /// **'Remove from this and future scans'**
+ String get upcomingReleasesRemoveForever;
+
+ /// No description provided for @upcomingReleasesRemoveForeverDesc.
+ ///
+ /// In en, this message translates to:
+ /// **'Goes to the removed list, restore any time'**
+ String get upcomingReleasesRemoveForeverDesc;
+
+ /// No description provided for @upcomingReleasesRemovedForeverToast.
+ ///
+ /// In en, this message translates to:
+ /// **'Removed - won\'t show on future scans'**
+ String get upcomingReleasesRemovedForeverToast;
+
+ /// No description provided for @upcomingReleasesRemovedBooksTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Removed books'**
+ String get upcomingReleasesRemovedBooksTitle;
+
+ /// No description provided for @upcomingReleasesRemovedCount.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 book} other{{count} books}}'**
+ String upcomingReleasesRemovedCount(int count);
+
+ /// No description provided for @upcomingReleasesRemovedNone.
+ ///
+ /// In en, this message translates to:
+ /// **'No removed books'**
+ String get upcomingReleasesRemovedNone;
+
+ /// No description provided for @upcomingReleasesRestore.
+ ///
+ /// In en, this message translates to:
+ /// **'Restore'**
+ String get upcomingReleasesRestore;
+
+ /// No description provided for @upcomingReleasesRestoredToast.
+ ///
+ /// In en, this message translates to:
+ /// **'Restored'**
+ String get upcomingReleasesRestoredToast;
+
+ /// No description provided for @upcomingReleasesRestoredNextScan.
+ ///
+ /// In en, this message translates to:
+ /// **'Restored - it will show after the next scan'**
+ String get upcomingReleasesRestoredNextScan;
+
+ /// No description provided for @upcomingReleasesSelectedCount.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 selected} other{{count} selected}}'**
+ String upcomingReleasesSelectedCount(int count);
+
+ /// No description provided for @upcomingReleasesBulkRequest.
+ ///
+ /// In en, this message translates to:
+ /// **'Request'**
+ String get upcomingReleasesBulkRequest;
+
+ /// No description provided for @upcomingReleasesBulkRemove.
+ ///
+ /// In en, this message translates to:
+ /// **'Remove'**
+ String get upcomingReleasesBulkRemove;
+
+ /// No description provided for @upcomingReleasesBulkRemoved.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 removed} other{{count} removed}}'**
+ String upcomingReleasesBulkRemoved(int count);
+
+ /// No description provided for @upcomingReleasesBulkRequestDone.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, =1{1 request sent} other{{count} requests sent}}'**
+ String upcomingReleasesBulkRequestDone(int count);
+
+ /// No description provided for @upcomingReleasesBulkRequestSkipped.
+ ///
+ /// In en, this message translates to:
+ /// **'{count} skipped'**
+ String upcomingReleasesBulkRequestSkipped(int count);
+
/// No description provided for @homeScreenEpisodeFallback.
///
/// In en, this message translates to:
@@ -9984,13 +10350,13 @@ abstract class AppLocalizations {
/// No description provided for @librarySortFilterUpcomingReleases.
///
/// In en, this message translates to:
- /// **'Upcoming Releases'**
+ /// **'Scan Series'**
String get librarySortFilterUpcomingReleases;
/// No description provided for @librarySortFilterUpcomingReleasesSubtitle.
///
/// In en, this message translates to:
- /// **'Scan Audible for new releases in your series'**
+ /// **'Check Audible for upcoming and missing books in your series'**
String get librarySortFilterUpcomingReleasesSubtitle;
/// No description provided for @sleepTimerSheetChaptersLeft.
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 124dd691..b350ba47 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -5515,6 +5515,300 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'FEHLT';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index 6444a086..629669d5 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsEl extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsEl extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index 7e4faa73..e3d64ee9 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsEn extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsEn extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 6eba56b7..8c9af321 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -1091,11 +1091,11 @@ class AppLocalizationsEs extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5440,6 +5440,300 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5661,11 +5955,11 @@ class AppLocalizationsEs extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index 6441e836..6bc6f4dc 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -5485,6 +5485,300 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MANQUANT';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Épisode';
@@ -5706,11 +6000,11 @@ class AppLocalizationsFr extends AppLocalizations {
String get notesNewNote => 'Nouvelle note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index 79fcca54..84da28a7 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsIt extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsIt extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index 51a01981..e631ded6 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsJa extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsJa extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index 9a217443..f055c539 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsNo extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsNo extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index 2b5095bf..51b4ff4c 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsPt extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsPt extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index 08dbb7b6..61b8145b 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsRo extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5438,6 +5438,300 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5659,11 +5953,11 @@ class AppLocalizationsRo extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index 185e5738..c8537451 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -1089,11 +1089,11 @@ class AppLocalizationsRu extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5442,6 +5442,300 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => 'MISSING';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
@@ -5663,11 +5957,11 @@ class AppLocalizationsRu extends AppLocalizations {
String get notesNewNote => 'New note';
@override
- String get librarySortFilterUpcomingReleases => 'Upcoming Releases';
+ String get librarySortFilterUpcomingReleases => 'Scan Series';
@override
String get librarySortFilterUpcomingReleasesSubtitle =>
- 'Scan Audible for new releases in your series';
+ 'Check Audible for upcoming and missing books in your series';
@override
String sleepTimerSheetChaptersLeft(int count) {
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 8fbca430..9c0b1475 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -1078,11 +1078,11 @@ class AppLocalizationsZh extends AppLocalizations {
'Always on while the Podcasts tab is enabled';
@override
- String get settingsEpisodeNotifs => 'New episode notifications';
+ String get settingsEpisodeNotifs => 'Notification settings';
@override
String get settingsEpisodeNotifsDesc =>
- 'Check subscribed shows in the background';
+ 'New podcast episodes and upcoming book releases, checked in the background';
@override
String get notifIntervalOff => 'Off';
@@ -5356,6 +5356,300 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get upcomingReleasesBadgeMissing => '缺失';
+ @override
+ String get upcomingReleasesScanSettingsTitle => 'Scan settings';
+
+ @override
+ String get upcomingReleasesFinishedAfterTitle =>
+ 'Consider a series finished after';
+
+ @override
+ String get upcomingReleasesFinishedAfterDesc =>
+ 'Series whose last book is older than this are skipped during scans and only re-checked every month or two.';
+
+ @override
+ String upcomingReleasesFinishedAfterYears(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count years',
+ one: '1 year',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesFinishedAfterNever => 'Never';
+
+ @override
+ String get upcomingReleasesSkippedTitle => 'Skipped series';
+
+ @override
+ String get upcomingReleasesSkippedNone => 'Nothing skipped yet';
+
+ @override
+ String upcomingReleasesSkippedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count skipped',
+ one: '1 skipped',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesSkippedLastBook(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Last book $count years ago',
+ one: 'Last book 1 year ago',
+ zero: 'Last book under a year ago',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesSkippedUnmatched =>
+ 'Couldn\'t match this series on Audible';
+
+ @override
+ String get upcomingReleasesSkippedScanNow => 'Scan now';
+
+ @override
+ String get upcomingReleasesSkippedAlwaysScan => 'Always scan';
+
+ @override
+ String get upcomingReleasesSkippedNeverScan => 'Never scan';
+
+ @override
+ String upcomingReleasesSkippedScanFound(String name) {
+ return 'Found new releases in $name';
+ }
+
+ @override
+ String upcomingReleasesSkippedScanNone(String name) {
+ return 'Nothing new in $name';
+ }
+
+ @override
+ String get upcomingReleasesSkippedOtherLibrary =>
+ 'This list came from a different library. Run a rescan to refresh it.';
+
+ @override
+ String get upcomingReleasesChipUpcoming => 'Upcoming';
+
+ @override
+ String upcomingReleasesChipMissing(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count missing',
+ one: '1 missing',
+ zero: 'Missing',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesNoMissing => 'No missing books found';
+
+ @override
+ String get upcomingReleasesScanSeries => 'Scan series';
+
+ @override
+ String get upcomingReleasesScanUpcomingOption => 'Upcoming releases';
+
+ @override
+ String get upcomingReleasesScanUpcomingOptionDesc =>
+ 'Quick scan for new and upcoming books';
+
+ @override
+ String get upcomingReleasesScanDeepOption => 'Deep scan';
+
+ @override
+ String get upcomingReleasesScanDeepOptionDesc =>
+ 'Also finds missing books in every series - takes longer';
+
+ @override
+ String get upcomingReleasesFirstScanNote =>
+ 'The first scan checks every series on Audible and can take a few minutes. Later scans get much quicker once your series are sorted.';
+
+ @override
+ String get upcomingReleasesLastScanReport => 'Last scan report';
+
+ @override
+ String upcomingReleasesReportChecked(int count) {
+ return 'Checked on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportSkipped(int count) {
+ return 'Skipped: $count';
+ }
+
+ @override
+ String upcomingReleasesReportUnmatched(int count) {
+ return 'Couldn\'t match on Audible: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFailed(int count) {
+ return 'Failed to check: $count';
+ }
+
+ @override
+ String upcomingReleasesReportFound(int upcoming, int recent) {
+ return 'Found $upcoming upcoming, $recent recent';
+ }
+
+ @override
+ String upcomingReleasesReportFoundDeep(
+ int upcoming,
+ int recent,
+ int missing,
+ ) {
+ return 'Found $upcoming upcoming, $recent recent, $missing missing';
+ }
+
+ @override
+ String upcomingReleasesReportMore(int count) {
+ return '+$count more';
+ }
+
+ @override
+ String get upcomingReleasesBadgeNew => 'NEW';
+
+ @override
+ String get upcomingReleasesOpenSeries => 'Open series on Audible';
+
+ @override
+ String get upcomingReleasesOpenLibrarySeries => 'Open series in library';
+
+ @override
+ String get upcomingReleasesAsinCopied => 'Series ASIN copied';
+
+ @override
+ String get upcomingReleasesSetSeriesAsin => 'Set series ASIN';
+
+ @override
+ String get upcomingReleasesSetAsinInstructions =>
+ 'Find the series on audible.com and copy the page link - the ASIN is the 10-character code starting with B0 (like B08S2YN3YS). Pasting the whole link works too.';
+
+ @override
+ String get upcomingReleasesSetAsinHint => 'B0… or audible.com link';
+
+ @override
+ String get upcomingReleasesSetAsinSave => 'Save';
+
+ @override
+ String get upcomingReleasesSetAsinInvalid => 'No ASIN found in that text';
+
+ @override
+ String get upcomingReleasesSetAsinSaved => 'Series linked - scanning now';
+
+ @override
+ String upcomingReleasesRemoveTitle(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: 'Remove $count books',
+ one: 'Remove book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemoveThisScan => 'Remove from this scan';
+
+ @override
+ String get upcomingReleasesRemoveThisScanDesc =>
+ 'Can come back on a future scan';
+
+ @override
+ String get upcomingReleasesRemoveForever =>
+ 'Remove from this and future scans';
+
+ @override
+ String get upcomingReleasesRemoveForeverDesc =>
+ 'Goes to the removed list, restore any time';
+
+ @override
+ String get upcomingReleasesRemovedForeverToast =>
+ 'Removed - won\'t show on future scans';
+
+ @override
+ String get upcomingReleasesRemovedBooksTitle => 'Removed books';
+
+ @override
+ String upcomingReleasesRemovedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count books',
+ one: '1 book',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesRemovedNone => 'No removed books';
+
+ @override
+ String get upcomingReleasesRestore => 'Restore';
+
+ @override
+ String get upcomingReleasesRestoredToast => 'Restored';
+
+ @override
+ String get upcomingReleasesRestoredNextScan =>
+ 'Restored - it will show after the next scan';
+
+ @override
+ String upcomingReleasesSelectedCount(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count selected',
+ one: '1 selected',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get upcomingReleasesBulkRequest => 'Request';
+
+ @override
+ String get upcomingReleasesBulkRemove => 'Remove';
+
+ @override
+ String upcomingReleasesBulkRemoved(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count removed',
+ one: '1 removed',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestDone(int count) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count requests sent',
+ one: '1 request sent',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String upcomingReleasesBulkRequestSkipped(int count) {
+ return '$count skipped';
+ }
+
@override
String get homeScreenEpisodeFallback => 'Episode';
diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart
index 99e23270..de4871e6 100644
--- a/lib/screens/settings_screen.dart
+++ b/lib/screens/settings_screen.dart
@@ -3288,25 +3288,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
onTap: () => _pickPodcastTabLibrary(podcastLibs),
),
- if (Platform.isAndroid) ...[
- const Divider(height: 1, indent: 16, endIndent: 16),
- ListTile(
- title: Text(l.settingsEpisodeNotifs),
- subtitle: Text(
- '${l.settingsEpisodeNotifsDesc} - ${_episodeNotifLabel(l)}',
- style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),
- trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
- onTap: _loaded ? _pickEpisodeNotifInterval : null,
- ),
- if (_episodeNotifMinutes > 0)
- ListTile(
- title: Text(l.settingsBatteryUnrestricted),
- subtitle: Text(l.settingsBatteryUnrestrictedDesc,
- style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),
- trailing: Icon(Icons.battery_saver_rounded, color: cs.onSurfaceVariant),
- onTap: () => Permission.ignoreBatteryOptimizations.request(),
- ),
- ],
const Divider(height: 1, indent: 16, endIndent: 16),
]);
}),
@@ -3488,6 +3469,16 @@ class _SettingsScreenState extends State<SettingsScreen> {
),
if (Platform.isAndroid) ...[
const Divider(height: 1, indent: 16, endIndent: 16),
+ ListTile(
+ leading: const Icon(Icons.notifications_active_outlined),
+ title: Text(l.settingsEpisodeNotifs),
+ subtitle: Text(
+ '${l.settingsEpisodeNotifsDesc} - ${_episodeNotifLabel(l)}',
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),
+ trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ onTap: _loaded ? _pickEpisodeNotifInterval : null,
+ ),
+ const Divider(height: 1, indent: 16, endIndent: 16),
ListTile(
leading: const Icon(Icons.battery_saver_outlined),
title: Text(l.unrestrictedBattery),
diff --git a/lib/screens/upcoming_releases_screen.dart b/lib/screens/upcoming_releases_screen.dart
index 2d9bc4ee..34c86547 100644
--- a/lib/screens/upcoming_releases_screen.dart
+++ b/lib/screens/upcoming_releases_screen.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:provider/provider.dart';
import '../providers/auth_provider.dart';
@@ -13,7 +14,9 @@ import '../widgets/audible_series_sheet.dart';
import '../widgets/overlay_toast.dart';
import '../widgets/rmab_book_detail_sheet.dart';
import '../widgets/rmab_config_sheet.dart'
- show kRmabBaseUrlKey, kRmabApiTokenKey;
+ show kRmabBaseUrlKey, kRmabApiTokenKey, loadRmabCustomHeaders;
+import '../widgets/series_books_sheet.dart';
+import '../widgets/stackable_sheet.dart';
import '../l10n/app_localizations.dart';
class UpcomingReleasesScreen extends StatefulWidget {
@@ -28,6 +31,11 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
String _region = 'us';
bool _sortByDate = false;
bool _rmabConfigured = false;
+ int _finishedAfterYears = 3;
+ int _viewFilter = 0; // 0 = upcoming, 1 = missing
+ final Set<String> _selectedAsins = {};
+ bool get _selecting => _selectedAsins.isNotEmpty;
+ bool _bulkBusy = false;
@override
void initState() {
@@ -53,6 +61,7 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
final saved = await PlayerSettings.getAudibleRegion();
_region = saved.isNotEmpty ? saved : ApiService.debugRegion;
_sortByDate = await PlayerSettings.getUpcomingReleasesSortByDate();
+ _finishedAfterYears = await PlayerSettings.getUpcomingFinishedAfterYears();
_service.setRegion(_region);
// If already running (e.g. came back to this screen), just attach
@@ -76,20 +85,26 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
_startScan();
}
- void _startScan() {
+ void _startScan({bool deep = false}) {
final auth = context.read<AuthProvider>();
final lib = context.read<LibraryProvider>();
final api = auth.apiService;
final libraryId = lib.selectedLibraryId;
if (api == null || libraryId == null) return;
- _service.start(api: api, libraryId: libraryId, region: _region);
+ _service.start(api: api, libraryId: libraryId, region: _region, deep: deep);
}
void _onServiceChanged() {
if (mounted) setState(() {});
}
+ bool get _hasViewChips =>
+ _service.missingResults.isNotEmpty || _service.missingCacheTime != null;
+
+ bool get _showDateChip =>
+ _service.isComplete && _service.results.isNotEmpty && _viewFilter == 0;
+
Future<void> _changeRegion() async {
final chosen = await showAudibleRegionPicker(context, currentRegion: _region);
if (chosen == null || chosen == _region || !mounted) return;
@@ -126,6 +141,330 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
super.dispose();
}
+ Future<void> _showScanSettingsSheet() async {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ const options = [1, 2, 3, 0];
+ await showModalBottomSheet(
+ context: context,
+ backgroundColor: Theme.of(context).bottomSheetTheme.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
+ ),
+ isScrollControlled: true,
+ builder: (ctx) => StatefulBuilder(
+ builder: (ctx, setSheetState) => SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 8, 16, 16),
+ child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(bottom: 16),
+ decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),
+ Center(child: Text(l.upcomingReleasesScanSettingsTitle,
+ style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600))),
+ const SizedBox(height: 16),
+ Text(l.upcomingReleasesFinishedAfterTitle,
+ style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
+ const SizedBox(height: 4),
+ Text(l.upcomingReleasesFinishedAfterDesc,
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant, fontSize: 11)),
+ const SizedBox(height: 12),
+ Row(children: [
+ for (final v in options) ...[
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ PlayerSettings.setUpcomingFinishedAfterYears(v);
+ setState(() => _finishedAfterYears = v);
+ setSheetState(() {});
+ },
+ child: Container(
+ height: 40,
+ decoration: BoxDecoration(
+ color: v == _finishedAfterYears
+ ? cs.primary.withValues(alpha: 0.15)
+ : cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(color: v == _finishedAfterYears
+ ? cs.primary.withValues(alpha: 0.3)
+ : cs.onSurface.withValues(alpha: 0.1)),
+ ),
+ child: Center(child: Text(
+ v == 0 ? l.upcomingReleasesFinishedAfterNever : l.upcomingReleasesFinishedAfterYears(v),
+ style: TextStyle(
+ color: v == _finishedAfterYears ? cs.primary : cs.onSurfaceVariant,
+ fontSize: 12, fontWeight: FontWeight.w500),
+ )),
+ ),
+ ),
+ ),
+ if (v != options.last) const SizedBox(width: 6),
+ ],
+ ]),
+ const SizedBox(height: 16),
+ ListTile(
+ contentPadding: EdgeInsets.zero,
+ leading: Icon(Icons.visibility_off_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesSkippedTitle,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: _service.skippedCount == 0
+ ? Text(l.upcomingReleasesSkippedNone, style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant))
+ : Text(l.upcomingReleasesSkippedCount(_service.skippedCount),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ dense: true,
+ enabled: _service.skippedCount > 0,
+ onTap: _service.skippedCount == 0 ? null : () {
+ Navigator.pop(ctx);
+ _showSkippedSeriesSheet();
+ },
+ ),
+ if (_service.ignoredCount > 0)
+ ListTile(
+ contentPadding: EdgeInsets.zero,
+ leading: Icon(Icons.playlist_remove_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesRemovedBooksTitle,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: Text(l.upcomingReleasesRemovedCount(_service.ignoredCount),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ dense: true,
+ onTap: () {
+ Navigator.pop(ctx);
+ _showRemovedBooksSheet();
+ },
+ ),
+ ListTile(
+ contentPadding: EdgeInsets.zero,
+ leading: Icon(Icons.language_rounded, color: cs.primary, size: 22),
+ title: Text(l.audibleSeriesRegionTitle,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: Text(ApiService.audibleRegions[_region] ?? _region.toUpperCase(),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ dense: true,
+ onTap: () {
+ Navigator.pop(ctx);
+ _changeRegion();
+ },
+ ),
+ ]),
+ ),
+ ),
+ ),
+ );
+ }
+
+ void _showSkippedSeriesSheet() {
+ showStackableSheet(
+ context: context,
+ showHandle: true,
+ builder: (ctx, scrollController) => _SkippedSeriesSheet(
+ scrollController: scrollController,
+ region: _region,
+ ),
+ );
+ }
+
+ void _showRemovedBooksSheet() {
+ showStackableSheet(
+ context: context,
+ showHandle: true,
+ builder: (ctx, scrollController) => _RemovedBooksSheet(
+ scrollController: scrollController,
+ ),
+ );
+ }
+
+ Widget _scanOptionCard(ColorScheme cs, IconData icon, String title, String desc, VoidCallback onTap) {
+ return GestureDetector(
+ onTap: onTap,
+ child: Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(bottom: 8),
+ padding: const EdgeInsets.all(14),
+ decoration: BoxDecoration(
+ color: cs.primary.withValues(alpha: 0.08),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(color: cs.primary.withValues(alpha: 0.2)),
+ ),
+ child: Row(children: [
+ Icon(icon, size: 24, color: cs.primary),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Text(title, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: cs.onSurface)),
+ const SizedBox(height: 2),
+ Text(desc, style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ ]),
+ ),
+ Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ ]),
+ ),
+ );
+ }
+
+ Future<void> _showScanChooserSheet() async {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ final report = _service.lastReport;
+ await showModalBottomSheet(
+ context: context,
+ backgroundColor: Theme.of(context).bottomSheetTheme.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
+ ),
+ isScrollControlled: true,
+ builder: (ctx) => SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 8, 16, 16),
+ child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(bottom: 16),
+ decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),
+ Center(child: Text(l.upcomingReleasesScanSeries,
+ style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600))),
+ const SizedBox(height: 12),
+ if (!_service.hasScanKnowledge)
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(bottom: 12),
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Icon(Icons.info_outline_rounded, size: 18, color: cs.onSurfaceVariant),
+ const SizedBox(width: 8),
+ Expanded(
+ child: Text(l.upcomingReleasesFirstScanNote,
+ style: TextStyle(fontSize: 12, color: cs.onSurfaceVariant)),
+ ),
+ ]),
+ ),
+ _scanOptionCard(cs, Icons.event_rounded,
+ l.upcomingReleasesScanUpcomingOption,
+ l.upcomingReleasesScanUpcomingOptionDesc, () {
+ Navigator.pop(ctx);
+ setState(() => _viewFilter = 0);
+ _startScan();
+ }),
+ _scanOptionCard(cs, Icons.travel_explore_rounded,
+ l.upcomingReleasesScanDeepOption,
+ l.upcomingReleasesScanDeepOptionDesc, () {
+ Navigator.pop(ctx);
+ setState(() => _viewFilter = 1);
+ _startScan(deep: true);
+ }),
+ if (report != null)
+ ListTile(
+ contentPadding: EdgeInsets.zero,
+ leading: Icon(Icons.receipt_long_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesLastScanReport,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: Text(
+ report.deep
+ ? l.upcomingReleasesReportFoundDeep(report.upcoming, report.recent, report.missing)
+ : l.upcomingReleasesReportFound(report.upcoming, report.recent),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ trailing: Icon(Icons.chevron_right_rounded, color: cs.onSurfaceVariant),
+ dense: true,
+ onTap: () {
+ Navigator.pop(ctx);
+ _showScanReportSheet();
+ },
+ ),
+ ]),
+ ),
+ ),
+ );
+ }
+
+ Widget _reportRow(ColorScheme cs, IconData icon, String text, {Color? color}) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(vertical: 6),
+ child: Row(children: [
+ Icon(icon, size: 18, color: color ?? cs.onSurfaceVariant),
+ const SizedBox(width: 10),
+ Expanded(child: Text(text, style: TextStyle(fontSize: 13, color: cs.onSurface))),
+ ]),
+ );
+ }
+
+ String _reportNames(List<String> names) {
+ final l = AppLocalizations.of(context)!;
+ const cap = 12;
+ if (names.length <= cap) return names.join(', ');
+ return '${names.take(cap).join(', ')} ${l.upcomingReleasesReportMore(names.length - cap)}';
+ }
+
+ Future<void> _showScanReportSheet() async {
+ final report = _service.lastReport;
+ if (report == null) return;
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ final age = DateTime.now().difference(report.completedAt).inDays;
+ final ageLabel = age == 0
+ ? l.upcomingReleasesScannedToday
+ : age == 1
+ ? l.upcomingReleasesScannedYesterday
+ : l.upcomingReleasesScannedDaysAgo(age);
+ await showModalBottomSheet(
+ context: context,
+ backgroundColor: Theme.of(context).bottomSheetTheme.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
+ ),
+ isScrollControlled: true,
+ builder: (ctx) => SafeArea(
+ child: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(20, 8, 20, 20),
+ child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(bottom: 16),
+ decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),
+ Center(child: Text(l.upcomingReleasesLastScanReport,
+ style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600))),
+ const SizedBox(height: 2),
+ Center(child: Text(
+ report.deep ? '${l.upcomingReleasesScanDeepOption} - $ageLabel' : ageLabel,
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant, fontSize: 11))),
+ const SizedBox(height: 12),
+ _reportRow(cs, Icons.check_circle_outline_rounded,
+ l.upcomingReleasesReportChecked(report.checked)),
+ _reportRow(cs, Icons.visibility_off_rounded,
+ l.upcomingReleasesReportSkipped(report.skipped)),
+ _reportRow(cs, Icons.event_available_rounded,
+ report.deep
+ ? l.upcomingReleasesReportFoundDeep(report.upcoming, report.recent, report.missing)
+ : l.upcomingReleasesReportFound(report.upcoming, report.recent),
+ color: cs.primary),
+ _reportRow(cs, Icons.help_outline_rounded,
+ l.upcomingReleasesReportUnmatched(report.unmatchedNames.length)),
+ if (report.unmatchedNames.isNotEmpty)
+ Padding(
+ padding: const EdgeInsets.only(left: 28, bottom: 6),
+ child: Text(_reportNames(report.unmatchedNames),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ ),
+ _reportRow(cs, Icons.error_outline_rounded,
+ l.upcomingReleasesReportFailed(report.failedNames.length),
+ color: report.failedNames.isEmpty ? null : cs.error),
+ if (report.failedNames.isNotEmpty)
+ Padding(
+ padding: const EdgeInsets.only(left: 28),
+ child: Text(_reportNames(report.failedNames),
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ ),
+ ]),
+ ),
+ ),
+ ),
+ );
+ }
+
String _formatDate(String dateStr, AppLocalizations l) {
final date = DateTime.tryParse(dateStr);
if (date == null) return dateStr;
@@ -161,11 +500,56 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
return l.statsScreenDurationShortM(m);
}
+ /// Find which series bucket on the page holds this book, for actions that
+ /// need the series' identity (like opening the Audible series sheet).
+ ({String seriesId, String audibleAsin})? _seriesContextFor(String asin) {
+ if (asin.isEmpty) return null;
+ for (final r in _service.results) {
+ if (r.upcomingBooks.any((b) => b['asin'] == asin) ||
+ r.recentBooks.any((b) => b['asin'] == asin)) {
+ return (seriesId: r.seriesId, audibleAsin: r.audibleAsin);
+ }
+ }
+ for (final r in _service.missingResults) {
+ if (r.missingBooks.any((b) => b['asin'] == asin)) {
+ return (seriesId: r.seriesId, audibleAsin: r.audibleAsin);
+ }
+ }
+ return null;
+ }
+
+ Future<void> _openSeriesSheetFor(String seriesId, String seriesName, String audibleAsin) async {
+ final api = context.read<AuthProvider>().apiService;
+ final libraryId = context.read<LibraryProvider>().selectedLibraryId;
+ final ownedTitles = <String>{};
+ final ownedAsins = <String>{};
+ if (api != null && libraryId != null && seriesId.isNotEmpty) {
+ final books = await api.getBooksBySeries(libraryId, seriesId, limit: 500);
+ for (final b in books) {
+ if (b is! Map<String, dynamic>) continue;
+ final media = b['media'] as Map<String, dynamic>? ?? {};
+ final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
+ final title = metadata['title'] as String? ?? '';
+ final asin = metadata['asin'] as String? ?? '';
+ if (title.isNotEmpty) ownedTitles.add(title);
+ if (asin.isNotEmpty) ownedAsins.add(asin);
+ }
+ }
+ if (!mounted) return;
+ showAudibleSeriesSheet(context,
+ seriesName: seriesName,
+ seriesAsin: audibleAsin,
+ ownedTitles: ownedTitles,
+ ownedAsins: ownedAsins,
+ );
+ }
+
void _showBookMenu(Map<String, dynamic> book, String seriesName,
{bool isUpcoming = false}) {
final l = AppLocalizations.of(context)!;
final cs = Theme.of(context).colorScheme;
final isOwned = book['_owned'] == true;
+ final seriesContext = _seriesContextFor(book['asin'] as String? ?? '');
// Show the RMAB request entry only for books that have been released but
// aren't in the library yet, and only when the user has RMAB configured.
final showRequest = _rmabConfigured && !isOwned && !isUpcoming;
@@ -174,6 +558,37 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
seriesName: seriesName,
region: _region,
extraActions: [
+ if (seriesContext != null && seriesContext.seriesId.isNotEmpty)
+ ListTile(
+ leading: Icon(Icons.collections_bookmark_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesOpenLibrarySeries,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(context);
+ final auth = context.read<AuthProvider>();
+ final lib = context.read<LibraryProvider>();
+ showSeriesBooksSheet(context,
+ seriesName: seriesName,
+ seriesId: seriesContext.seriesId,
+ serverUrl: auth.serverUrl,
+ token: auth.token,
+ libraryId: lib.selectedLibraryId,
+ );
+ },
+ ),
+ if (seriesContext != null && seriesContext.audibleAsin.isNotEmpty)
+ ListTile(
+ leading: Icon(Icons.travel_explore_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesOpenSeries,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(context);
+ _openSeriesSheetFor(
+ seriesContext.seriesId, seriesName, seriesContext.audibleAsin);
+ },
+ ),
ListTile(
leading: Icon(Icons.refresh_rounded, color: cs.primary, size: 22),
title: Text(l.upcomingReleasesRescanReleaseDate, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
@@ -218,9 +633,151 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
Future<void> _removeBook(String asin) async {
final l = AppLocalizations.of(context)!;
- await _service.removeBook(asin);
+ final forever = await _askRemoveMode(count: 1);
+ if (forever == null || !mounted) return;
+ await _service.removeBook(asin, forever: forever);
+ if (!mounted) return;
+ showOverlayToast(context,
+ forever ? l.upcomingReleasesRemovedForeverToast : l.upcomingReleasesRemovedFromList,
+ icon: Icons.playlist_remove_rounded);
+ }
+
+ /// null = cancelled, false = this scan only, true = this and future scans.
+ Future<bool?> _askRemoveMode({required int count}) {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ return showModalBottomSheet<bool>(
+ context: context,
+ backgroundColor: Theme.of(context).bottomSheetTheme.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
+ ),
+ builder: (ctx) => SafeArea(
+ child: Column(mainAxisSize: MainAxisSize.min, children: [
+ Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(top: 8, bottom: 12),
+ decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),
+ Text(l.upcomingReleasesRemoveTitle(count),
+ style: tt.titleSmall?.copyWith(fontWeight: FontWeight.w600)),
+ const SizedBox(height: 8),
+ ListTile(
+ leading: Icon(Icons.playlist_remove_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesRemoveThisScan,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: Text(l.upcomingReleasesRemoveThisScanDesc,
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () => Navigator.pop(ctx, false),
+ ),
+ ListTile(
+ leading: Icon(Icons.block_rounded, color: cs.error, size: 22),
+ title: Text(l.upcomingReleasesRemoveForever,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ subtitle: Text(l.upcomingReleasesRemoveForeverDesc,
+ style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () => Navigator.pop(ctx, true),
+ ),
+ const SizedBox(height: 8),
+ ]),
+ ),
+ );
+ }
+
+ /// All books currently on the page, keyed by ASIN, for multi-select.
+ Map<String, ({Map<String, dynamic> book, bool isUpcoming})> _selectableBooks() {
+ final map = <String, ({Map<String, dynamic> book, bool isUpcoming})>{};
+ for (final r in _service.results) {
+ for (final b in r.upcomingBooks) {
+ final a = b['asin'] as String? ?? '';
+ if (a.isNotEmpty) map[a] = (book: b, isUpcoming: true);
+ }
+ for (final b in r.recentBooks) {
+ final a = b['asin'] as String? ?? '';
+ if (a.isNotEmpty) map[a] = (book: b, isUpcoming: false);
+ }
+ }
+ for (final r in _service.missingResults) {
+ for (final b in r.missingBooks) {
+ final a = b['asin'] as String? ?? '';
+ if (a.isNotEmpty) map.putIfAbsent(a, () => (book: b, isUpcoming: false));
+ }
+ }
+ return map;
+ }
+
+ void _toggleSelected(String asin) {
+ if (asin.isEmpty) return;
+ setState(() {
+ if (!_selectedAsins.remove(asin)) _selectedAsins.add(asin);
+ });
+ }
+
+ Future<void> _bulkRemove() async {
+ final l = AppLocalizations.of(context)!;
+ final forever = await _askRemoveMode(count: _selectedAsins.length);
+ if (forever == null || !mounted) return;
+ setState(() => _bulkBusy = true);
+ final asins = List.of(_selectedAsins);
+ for (final a in asins) {
+ await _service.removeBook(a, forever: forever);
+ }
if (!mounted) return;
- showOverlayToast(context, l.upcomingReleasesRemovedFromList, icon: Icons.playlist_remove_rounded);
+ setState(() {
+ _bulkBusy = false;
+ _selectedAsins.clear();
+ });
+ showOverlayToast(context, l.upcomingReleasesBulkRemoved(asins.length),
+ icon: Icons.playlist_remove_rounded);
+ }
+
+ Future<void> _bulkRequest() async {
+ final l = AppLocalizations.of(context)!;
+ final books = _selectableBooks();
+ final targets = <Map<String, dynamic>>[
+ for (final a in _selectedAsins)
+ if (books[a] != null && !books[a]!.isUpcoming && books[a]!.book['_owned'] != true)
+ books[a]!.book,
+ ];
+ if (targets.isEmpty) return;
+ final base = await ScopedPrefs.getString(kRmabBaseUrlKey);
+ final token = await ScopedPrefs.getString(kRmabApiTokenKey);
+ final headers = await loadRmabCustomHeaders();
+ if (!mounted) return;
+ if (base == null || base.isEmpty || token == null || token.isEmpty) {
+ showOverlayToast(context, l.rmabRequestErrorTokenRejected, icon: Icons.error_outline_rounded);
+ return;
+ }
+ setState(() => _bulkBusy = true);
+ final rmab = RmabService(baseUrl: base, apiToken: token, customHeaders: headers);
+ var sent = 0;
+ var skipped = 0;
+ for (final book in targets) {
+ try {
+ final result = await rmab.createRequest(
+ RmabRequestInput.fromSearchResult(RmabSearchResult.fromUpcomingBookMap(book)));
+ if (result is RmabCreateSuccess) {
+ RmabLocalRequestCache.markRequested(
+ book['asin'] as String? ?? '', result.request.status);
+ sent++;
+ } else {
+ skipped++;
+ }
+ } catch (e) {
+ debugPrint('[RMAB] bulk request error: $e');
+ skipped++;
+ }
+ }
+ if (!mounted) return;
+ setState(() {
+ _bulkBusy = false;
+ _selectedAsins.clear();
+ });
+ showOverlayToast(context,
+ skipped == 0
+ ? l.upcomingReleasesBulkRequestDone(sent)
+ : '${l.upcomingReleasesBulkRequestDone(sent)} - ${l.upcomingReleasesBulkRequestSkipped(skipped)}',
+ icon: sent > 0 ? Icons.check_rounded : Icons.error_outline_rounded);
}
Future<void> _rescanBook(String asin) async {
@@ -252,67 +809,42 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
final l = AppLocalizations.of(context)!;
return Scaffold(
+ bottomNavigationBar: _selecting ? _buildSelectionBar(cs, tt, l) : null,
body: SafeArea(
child: Column(
children: [
AbsorbPageHeader(
title: l.upcomingReleasesTitle,
actions: [
- // Sort by date toggle (only when scan is done and has results)
- if (_service.isComplete && _service.results.isNotEmpty)
+ // Scan chooser (only when not already scanning)
+ if (!_service.isRunning)
GestureDetector(
- onTap: () {
- final next = !_sortByDate;
- setState(() => _sortByDate = next);
- PlayerSettings.setUpcomingReleasesSortByDate(next);
- },
+ onTap: _showScanChooserSheet,
child: Container(
- padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 5),
+ padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration(
- color: _sortByDate ? cs.primary.withValues(alpha: 0.15) : cs.onSurface.withValues(alpha: 0.06),
+ color: cs.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(20),
- border: _sortByDate ? Border.all(color: cs.primary.withValues(alpha: 0.3)) : null,
+ border: Border.all(color: cs.primary.withValues(alpha: 0.2)),
),
child: Row(mainAxisSize: MainAxisSize.min, children: [
- Icon(Icons.calendar_today_rounded, size: 13,
- color: _sortByDate ? cs.primary : cs.onSurfaceVariant),
+ Icon(Icons.refresh_rounded, size: 14, color: cs.primary),
const SizedBox(width: 4),
- Text(l.upcomingReleasesDateChip, style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600,
- color: _sortByDate ? cs.primary : cs.onSurfaceVariant)),
+ Text(l.upcomingReleasesScanSeries,
+ style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: cs.primary)),
]),
),
),
- // Rescan button (only when not already scanning)
- if (_service.isComplete)
- GestureDetector(
- onTap: _rescan,
- child: Container(
- padding: const EdgeInsets.all(6),
- decoration: BoxDecoration(
- color: cs.onSurface.withValues(alpha: 0.06),
- shape: BoxShape.circle,
- ),
- child: Icon(Icons.refresh_rounded, size: 18, color: cs.onSurfaceVariant),
- ),
- ),
- // Region button
+ // Scan settings
GestureDetector(
- onTap: _changeRegion,
+ onTap: _showScanSettingsSheet,
child: Container(
- padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
+ padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
- color: cs.primary.withValues(alpha: 0.1),
- borderRadius: BorderRadius.circular(20),
- border: Border.all(color: cs.primary.withValues(alpha: 0.2)),
+ color: cs.onSurface.withValues(alpha: 0.06),
+ shape: BoxShape.circle,
),
- child: Row(mainAxisSize: MainAxisSize.min, children: [
- Icon(Icons.language_rounded, size: 14, color: cs.primary),
- const SizedBox(width: 4),
- Text(
- ApiService.audibleRegions[_region] ?? _region.toUpperCase(),
- style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: cs.primary),
- ),
- ]),
+ child: Icon(Icons.tune_rounded, size: 18, color: cs.onSurfaceVariant),
),
),
],
@@ -355,15 +887,70 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
Padding(
padding: const EdgeInsets.fromLTRB(20, 12, 20, 0),
child: Row(children: [
- Text(
- _buildSummary(l),
- style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant),
+ Flexible(
+ child: Text(
+ _buildSummary(l),
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ ),
),
if (_service.hasCachedResults && _service.cacheTime != null) ...[
const SizedBox(width: 6),
Text(_cacheAgeLabel(l), style: tt.bodySmall?.copyWith(
color: cs.onSurfaceVariant.withValues(alpha: 0.5), fontSize: 11)),
],
+ if (_service.skippedCount > 0) ...[
+ const SizedBox(width: 6),
+ GestureDetector(
+ onTap: _showSkippedSeriesSheet,
+ child: Text(
+ l.upcomingReleasesSkippedCount(_service.skippedCount),
+ style: tt.bodySmall?.copyWith(
+ color: cs.primary, fontSize: 11, fontWeight: FontWeight.w600),
+ ),
+ ),
+ ],
+ ]),
+ ),
+
+ // View toggle (once a deep scan exists) + date sort, on their own
+ // row so the header actions keep full-size touch targets
+ if (_hasViewChips || _showDateChip)
+ Padding(
+ padding: const EdgeInsets.fromLTRB(20, 10, 20, 0),
+ child: Row(children: [
+ if (_hasViewChips) ...[
+ _viewChip(cs, l.upcomingReleasesChipUpcoming, _viewFilter == 0,
+ () => setState(() => _viewFilter = 0)),
+ const SizedBox(width: 8),
+ _viewChip(cs, l.upcomingReleasesChipMissing(_service.missingBookCount),
+ _viewFilter == 1, () => setState(() => _viewFilter = 1)),
+ ],
+ const Spacer(),
+ if (_showDateChip)
+ GestureDetector(
+ onTap: () {
+ final next = !_sortByDate;
+ setState(() => _sortByDate = next);
+ PlayerSettings.setUpcomingReleasesSortByDate(next);
+ },
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 5),
+ decoration: BoxDecoration(
+ color: _sortByDate ? cs.primary.withValues(alpha: 0.15) : cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(20),
+ border: _sortByDate ? Border.all(color: cs.primary.withValues(alpha: 0.3)) : null,
+ ),
+ child: Row(mainAxisSize: MainAxisSize.min, children: [
+ Icon(Icons.calendar_today_rounded, size: 13,
+ color: _sortByDate ? cs.primary : cs.onSurfaceVariant),
+ const SizedBox(width: 4),
+ Text(l.upcomingReleasesDateChip, style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600,
+ color: _sortByDate ? cs.primary : cs.onSurfaceVariant)),
+ ]),
+ ),
+ ),
]),
),
@@ -412,6 +999,10 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
);
}
+ if (_viewFilter == 1) {
+ return _buildMissingList(cs, tt, l);
+ }
+
if (_service.isComplete && _service.results.isEmpty) {
return Center(
child: Padding(
@@ -425,6 +1016,15 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
Text(l.upcomingReleasesCheckedSeries(_service.totalSeries),
style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant.withValues(alpha: 0.6)),
textAlign: TextAlign.center),
+ if (_service.skippedCount > 0) ...[
+ const SizedBox(height: 4),
+ GestureDetector(
+ onTap: _showSkippedSeriesSheet,
+ child: Text(l.upcomingReleasesSkippedCount(_service.skippedCount),
+ style: tt.bodySmall?.copyWith(color: cs.primary, fontWeight: FontWeight.w600),
+ textAlign: TextAlign.center),
+ ),
+ ],
]),
),
);
@@ -453,15 +1053,147 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
);
}
+ Widget _buildSelectionBar(ColorScheme cs, TextTheme tt, AppLocalizations l) {
+ final books = _selectableBooks();
+ final requestable = _rmabConfigured
+ ? _selectedAsins.where((a) {
+ final e = books[a];
+ return e != null && !e.isUpcoming && e.book['_owned'] != true;
+ }).length
+ : 0;
+ return Container(
+ decoration: BoxDecoration(
+ color: cs.surfaceContainerHigh,
+ border: Border(top: BorderSide(color: cs.onSurface.withValues(alpha: 0.08))),
+ ),
+ child: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 6, 4, 6),
+ child: Row(children: [
+ Text(l.upcomingReleasesSelectedCount(_selectedAsins.length),
+ style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
+ const Spacer(),
+ if (_bulkBusy)
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 12),
+ child: SizedBox(width: 18, height: 18,
+ child: CircularProgressIndicator(strokeWidth: 2)),
+ )
+ else ...[
+ if (_rmabConfigured)
+ TextButton.icon(
+ onPressed: requestable == 0 ? null : _bulkRequest,
+ icon: const Icon(Icons.menu_book_rounded, size: 18),
+ label: Text(l.upcomingReleasesBulkRequest),
+ ),
+ TextButton.icon(
+ onPressed: _bulkRemove,
+ icon: const Icon(Icons.playlist_remove_rounded, size: 18),
+ label: Text(l.upcomingReleasesBulkRemove),
+ ),
+ ],
+ IconButton(
+ icon: Icon(Icons.close_rounded, color: cs.onSurfaceVariant),
+ onPressed: _bulkBusy ? null : () => setState(() => _selectedAsins.clear()),
+ ),
+ ]),
+ ),
+ ),
+ );
+ }
+
+ Widget _viewChip(ColorScheme cs, String label, bool selected, VoidCallback onTap) {
+ return GestureDetector(
+ onTap: onTap,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
+ decoration: BoxDecoration(
+ color: selected ? cs.primary.withValues(alpha: 0.15) : cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(20),
+ border: Border.all(color: selected ? cs.primary.withValues(alpha: 0.3) : cs.onSurface.withValues(alpha: 0.1)),
+ ),
+ child: Text(label, style: TextStyle(
+ color: selected ? cs.primary : cs.onSurfaceVariant,
+ fontSize: 12, fontWeight: FontWeight.w600,
+ )),
+ ),
+ );
+ }
+
+ Widget _buildMissingList(ColorScheme cs, TextTheme tt, AppLocalizations l) {
+ final results = _service.missingResults;
+ if (results.isEmpty) {
+ return Center(
+ child: Padding(
+ padding: const EdgeInsets.all(32),
+ child: Column(mainAxisSize: MainAxisSize.min, children: [
+ if (_service.isRunning) ...[
+ const CircularProgressIndicator(strokeWidth: 2),
+ ] else ...[
+ Icon(Icons.check_circle_outline_rounded, size: 48, color: cs.primary.withValues(alpha: 0.5)),
+ const SizedBox(height: 12),
+ Text(l.upcomingReleasesNoMissing,
+ style: tt.bodyLarge?.copyWith(color: cs.onSurfaceVariant),
+ textAlign: TextAlign.center),
+ ],
+ ]),
+ ),
+ );
+ }
+ return ListView.builder(
+ padding: const EdgeInsets.fromLTRB(16, 0, 16, 24),
+ itemCount: results.length + (_service.isRunning ? 1 : 0),
+ itemBuilder: (context, index) {
+ if (index >= results.length) {
+ return const Padding(
+ padding: EdgeInsets.symmetric(vertical: 24),
+ child: Center(child: CircularProgressIndicator(strokeWidth: 2)),
+ );
+ }
+ final r = results[index];
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(4, 0, 4, 8),
+ child: Row(children: [
+ Expanded(
+ child: Text(r.seriesName,
+ style: tt.titleSmall?.copyWith(fontWeight: FontWeight.w700),
+ maxLines: 1, overflow: TextOverflow.ellipsis),
+ ),
+ const SizedBox(width: 8),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
+ decoration: BoxDecoration(
+ color: cs.error.withValues(alpha: 0.12),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Text('${r.missingBooks.length}',
+ style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, color: cs.error)),
+ ),
+ ]),
+ ),
+ ...r.missingBooks.map((book) =>
+ _buildBookCard(cs, tt, l, book, r.seriesName, isUpcoming: false, seriesAsin: r.audibleAsin)),
+ ],
+ ),
+ );
+ },
+ );
+ }
+
Widget _buildDateSortedList(ColorScheme cs, TextTheme tt, AppLocalizations l) {
// Flatten all books with their series name and upcoming/recent status
- final allBooks = <({Map<String, dynamic> book, String seriesName, bool isUpcoming})>[];
+ final allBooks = <({Map<String, dynamic> book, String seriesName, bool isUpcoming, String seriesAsin})>[];
for (final result in _service.results) {
for (final book in result.upcomingBooks) {
- allBooks.add((book: book, seriesName: result.seriesName, isUpcoming: true));
+ allBooks.add((book: book, seriesName: result.seriesName, isUpcoming: true, seriesAsin: result.audibleAsin));
}
for (final book in result.recentBooks) {
- allBooks.add((book: book, seriesName: result.seriesName, isUpcoming: false));
+ allBooks.add((book: book, seriesName: result.seriesName, isUpcoming: false, seriesAsin: result.audibleAsin));
}
}
@@ -477,12 +1209,12 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
itemCount: allBooks.length,
itemBuilder: (context, index) {
final entry = allBooks[index];
- return _buildDateSortedCard(cs, tt, l, entry.book, entry.seriesName, entry.isUpcoming);
+ return _buildDateSortedCard(cs, tt, l, entry.book, entry.seriesName, entry.isUpcoming, entry.seriesAsin);
},
);
}
- Widget _buildDateSortedCard(ColorScheme cs, TextTheme tt, AppLocalizations l, Map<String, dynamic> book, String seriesName, bool isUpcoming) {
+ Widget _buildDateSortedCard(ColorScheme cs, TextTheme tt, AppLocalizations l, Map<String, dynamic> book, String seriesName, bool isUpcoming, String seriesAsin) {
final title = book['title'] as String? ?? '';
final subtitle = book['subtitle'] as String? ?? '';
final authors = book['authors'] as String? ?? '';
@@ -491,13 +1223,18 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
final releaseDate = book['releaseDate'] as String? ?? '';
final runtime = _formatRuntime(book['runtimeMinutes'], l);
final isOwned = book['_owned'] == true;
+ final isNew = book['_new'] == true;
+ final selected = _selectedAsins.contains(book['asin'] as String? ?? '');
final isDark = Theme.of(context).brightness == Brightness.dark;
final downloadGreen = isDark ? Colors.greenAccent[400]! : Colors.green.shade700;
return Padding(
padding: const EdgeInsets.only(bottom: 8),
child: GestureDetector(
- onTap: () => _showBookMenu(book, seriesName, isUpcoming: isUpcoming),
+ onTap: () => _selecting
+ ? _toggleSelected(book['asin'] as String? ?? '')
+ : _showBookMenu(book, seriesName, isUpcoming: isUpcoming),
+ onLongPress: () => _toggleSelected(book['asin'] as String? ?? ''),
child: Card(
elevation: 0,
color: isUpcoming
@@ -505,7 +1242,12 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
: isOwned
? cs.surfaceContainerHigh.withValues(alpha: 0.5)
: cs.surfaceContainerHigh,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(14),
+ side: selected
+ ? BorderSide(color: cs.primary, width: 1.5)
+ : BorderSide.none,
+ ),
clipBehavior: Clip.antiAlias,
child: ConstrainedBox(
constraints: const BoxConstraints(minHeight: 100),
@@ -533,6 +1275,21 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
child: Text(l.upcomingReleasesSequenceLabel(sequence), style: const TextStyle(color: Colors.white, fontSize: 9, fontWeight: FontWeight.w600)),
),
),
+ if (isNew)
+ Positioned(top: 4, right: 4,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
+ decoration: BoxDecoration(color: cs.tertiary.withValues(alpha: 0.9), borderRadius: BorderRadius.circular(6)),
+ child: Text(l.upcomingReleasesBadgeNew, style: TextStyle(color: cs.onTertiary, fontSize: 8, fontWeight: FontWeight.w700)),
+ ),
+ ),
+ if (selected)
+ Positioned.fill(
+ child: Container(
+ color: Colors.black.withValues(alpha: 0.45),
+ child: Center(child: Icon(Icons.check_circle_rounded, color: cs.primary, size: 32)),
+ ),
+ ),
if (isUpcoming)
Positioned(bottom: 4, left: 4,
child: Container(
@@ -581,7 +1338,7 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
Text(authors, maxLines: 1, overflow: TextOverflow.ellipsis,
style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant, fontSize: 11)),
const SizedBox(height: 4),
- Row(children: [
+ Wrap(crossAxisAlignment: WrapCrossAlignment.center, children: [
if (releaseDate.isNotEmpty) ...[
Icon(isUpcoming ? Icons.event_rounded : Icons.calendar_today_rounded,
size: 11, color: isUpcoming ? cs.primary : cs.onSurfaceVariant.withValues(alpha: 0.5)),
@@ -601,6 +1358,22 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
const SizedBox(width: 3),
Text(runtime, style: TextStyle(fontSize: 10, color: cs.onSurfaceVariant.withValues(alpha: 0.5))),
],
+ if (seriesAsin.isNotEmpty) ...[
+ if (releaseDate.isNotEmpty || runtime.isNotEmpty)
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 6),
+ child: Text('.', style: TextStyle(color: cs.onSurfaceVariant.withValues(alpha: 0.3), fontSize: 10)),
+ ),
+ GestureDetector(
+ onTap: () {
+ Clipboard.setData(ClipboardData(text: seriesAsin));
+ showOverlayToast(context, l.upcomingReleasesAsinCopied, icon: Icons.copy_rounded);
+ },
+ child: Text(seriesAsin,
+ style: TextStyle(fontSize: 10, letterSpacing: 0.3,
+ color: cs.onSurfaceVariant.withValues(alpha: 0.5))),
+ ),
+ ],
]),
],
),
@@ -647,15 +1420,15 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
]),
),
// Upcoming books
- ...result.upcomingBooks.map((book) => _buildBookCard(cs, tt, l, book, result.seriesName, isUpcoming: true)),
+ ...result.upcomingBooks.map((book) => _buildBookCard(cs, tt, l, book, result.seriesName, isUpcoming: true, seriesAsin: result.audibleAsin)),
// Recent releases
- ...result.recentBooks.map((book) => _buildBookCard(cs, tt, l, book, result.seriesName, isUpcoming: false)),
+ ...result.recentBooks.map((book) => _buildBookCard(cs, tt, l, book, result.seriesName, isUpcoming: false, seriesAsin: result.audibleAsin)),
],
),
);
}
- Widget _buildBookCard(ColorScheme cs, TextTheme tt, AppLocalizations l, Map<String, dynamic> book, String seriesName, {required bool isUpcoming}) {
+ Widget _buildBookCard(ColorScheme cs, TextTheme tt, AppLocalizations l, Map<String, dynamic> book, String seriesName, {required bool isUpcoming, String seriesAsin = ''}) {
final title = book['title'] as String? ?? '';
final subtitle = book['subtitle'] as String? ?? '';
final authors = book['authors'] as String? ?? '';
@@ -665,13 +1438,18 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
final releaseDate = book['releaseDate'] as String? ?? '';
final runtime = _formatRuntime(book['runtimeMinutes'], l);
final isOwned = book['_owned'] == true;
+ final isNew = book['_new'] == true;
+ final selected = _selectedAsins.contains(book['asin'] as String? ?? '');
final isDark = Theme.of(context).brightness == Brightness.dark;
final downloadGreen = isDark ? Colors.greenAccent[400]! : Colors.green.shade700;
return Padding(
padding: const EdgeInsets.only(bottom: 8),
child: GestureDetector(
- onTap: () => _showBookMenu(book, seriesName, isUpcoming: isUpcoming),
+ onTap: () => _selecting
+ ? _toggleSelected(book['asin'] as String? ?? '')
+ : _showBookMenu(book, seriesName, isUpcoming: isUpcoming),
+ onLongPress: () => _toggleSelected(book['asin'] as String? ?? ''),
child: Card(
elevation: 0,
color: isUpcoming
@@ -679,7 +1457,12 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
: isOwned
? cs.surfaceContainerHigh.withValues(alpha: 0.5)
: cs.surfaceContainerHigh,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(14),
+ side: selected
+ ? BorderSide(color: cs.primary, width: 1.5)
+ : BorderSide.none,
+ ),
clipBehavior: Clip.antiAlias,
child: ConstrainedBox(
constraints: const BoxConstraints(minHeight: 100),
@@ -707,6 +1490,21 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
child: Text(l.upcomingReleasesSequenceLabel(sequence), style: const TextStyle(color: Colors.white, fontSize: 9, fontWeight: FontWeight.w600)),
),
),
+ if (isNew)
+ Positioned(top: 4, right: 4,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
+ decoration: BoxDecoration(color: cs.tertiary.withValues(alpha: 0.9), borderRadius: BorderRadius.circular(6)),
+ child: Text(l.upcomingReleasesBadgeNew, style: TextStyle(color: cs.onTertiary, fontSize: 8, fontWeight: FontWeight.w700)),
+ ),
+ ),
+ if (selected)
+ Positioned.fill(
+ child: Container(
+ color: Colors.black.withValues(alpha: 0.45),
+ child: Center(child: Icon(Icons.check_circle_rounded, color: cs.primary, size: 32)),
+ ),
+ ),
if (isUpcoming)
Positioned(bottom: 4, left: 4,
child: Container(
@@ -758,7 +1556,7 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
Text(l.narratedBy(narrators), maxLines: 1, overflow: TextOverflow.ellipsis,
style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant.withValues(alpha: 0.6), fontSize: 10)),
const SizedBox(height: 4),
- Row(children: [
+ Wrap(crossAxisAlignment: WrapCrossAlignment.center, children: [
if (releaseDate.isNotEmpty) ...[
Icon(isUpcoming ? Icons.event_rounded : Icons.calendar_today_rounded,
size: 11, color: isUpcoming ? cs.primary : cs.onSurfaceVariant.withValues(alpha: 0.5)),
@@ -778,6 +1576,22 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
const SizedBox(width: 3),
Text(runtime, style: TextStyle(fontSize: 10, color: cs.onSurfaceVariant.withValues(alpha: 0.5))),
],
+ if (seriesAsin.isNotEmpty) ...[
+ if (releaseDate.isNotEmpty || runtime.isNotEmpty)
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 6),
+ child: Text('.', style: TextStyle(color: cs.onSurfaceVariant.withValues(alpha: 0.3), fontSize: 10)),
+ ),
+ GestureDetector(
+ onTap: () {
+ Clipboard.setData(ClipboardData(text: seriesAsin));
+ showOverlayToast(context, l.upcomingReleasesAsinCopied, icon: Icons.copy_rounded);
+ },
+ child: Text(seriesAsin,
+ style: TextStyle(fontSize: 10, letterSpacing: 0.3,
+ color: cs.onSurfaceVariant.withValues(alpha: 0.5))),
+ ),
+ ],
]),
],
),
@@ -797,3 +1611,502 @@ class _UpcomingReleasesScreenState extends State<UpcomingReleasesScreen> {
);
}
}
+
+/// Bottom sheet listing forever-removed books, with restore.
+class _RemovedBooksSheet extends StatefulWidget {
+ final ScrollController scrollController;
+
+ const _RemovedBooksSheet({required this.scrollController});
+
+ @override
+ State<_RemovedBooksSheet> createState() => _RemovedBooksSheetState();
+}
+
+class _RemovedBooksSheetState extends State<_RemovedBooksSheet> {
+ final _service = UpcomingReleasesService();
+
+ @override
+ void initState() {
+ super.initState();
+ _service.addListener(_onServiceChanged);
+ }
+
+ @override
+ void dispose() {
+ _service.removeListener(_onServiceChanged);
+ super.dispose();
+ }
+
+ void _onServiceChanged() {
+ if (mounted) setState(() {});
+ }
+
+ Future<void> _restore(IgnoredBook entry) async {
+ final l = AppLocalizations.of(context)!;
+ final visible = await _service.restoreBook(entry.asin);
+ if (!mounted) return;
+ showOverlayToast(
+ context,
+ visible ? l.upcomingReleasesRestoredToast : l.upcomingReleasesRestoredNextScan,
+ icon: Icons.restore_rounded,
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ final l = AppLocalizations.of(context)!;
+ final entries = _service.ignoredBooks;
+
+ return ClipRect(child: Column(
+ children: [
+ Icon(Icons.playlist_remove_rounded, size: 20, color: cs.primary),
+ const SizedBox(height: 4),
+ Text(l.upcomingReleasesRemovedBooksTitle,
+ style: tt.titleLarge?.copyWith(fontWeight: FontWeight.w600)),
+ const SizedBox(height: 4),
+ Text(l.upcomingReleasesRemovedCount(entries.length),
+ style: tt.bodyMedium?.copyWith(color: cs.onSurfaceVariant)),
+ const SizedBox(height: 12),
+ Expanded(
+ child: entries.isEmpty
+ ? ListView(controller: widget.scrollController, children: [
+ const SizedBox(height: 80),
+ Center(child: Text(l.upcomingReleasesRemovedNone,
+ style: tt.bodyLarge?.copyWith(color: cs.onSurfaceVariant))),
+ ])
+ : ListView.builder(
+ controller: widget.scrollController,
+ padding: EdgeInsets.fromLTRB(16, 0, 16, 24 + MediaQuery.of(context).viewPadding.bottom),
+ itemCount: entries.length,
+ itemBuilder: (context, index) {
+ final entry = entries[index];
+ final coverUrl = entry.book['coverUrl'] as String? ?? '';
+ final title = entry.book['title'] as String? ?? '';
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 8),
+ child: Card(
+ elevation: 0,
+ color: cs.surfaceContainerHigh,
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
+ clipBehavior: Clip.antiAlias,
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(10, 8, 6, 8),
+ child: Row(children: [
+ ClipRRect(
+ borderRadius: BorderRadius.circular(8),
+ child: SizedBox(
+ width: 44,
+ height: 44,
+ child: coverUrl.isNotEmpty
+ ? CachedNetworkImage(
+ imageUrl: coverUrl, fit: BoxFit.cover,
+ errorWidget: (_, __, ___) => Container(color: cs.surfaceContainerHighest))
+ : Container(color: cs.surfaceContainerHighest),
+ ),
+ ),
+ const SizedBox(width: 10),
+ Expanded(
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Text(title, maxLines: 1, overflow: TextOverflow.ellipsis,
+ style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
+ if (entry.seriesName.isNotEmpty)
+ Text(entry.seriesName, maxLines: 1, overflow: TextOverflow.ellipsis,
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant, fontSize: 11)),
+ ]),
+ ),
+ TextButton(
+ onPressed: () => _restore(entry),
+ child: Text(l.upcomingReleasesRestore),
+ ),
+ ]),
+ ),
+ ),
+ );
+ },
+ ),
+ ),
+ ],
+ ));
+ }
+}
+
+/// Bottom sheet listing the series the scan skipped as finished, with
+/// per-series rescan and always/never overrides.
+class _SkippedSeriesSheet extends StatefulWidget {
+ final ScrollController scrollController;
+ final String region;
+
+ const _SkippedSeriesSheet({required this.scrollController, required this.region});
+
+ @override
+ State<_SkippedSeriesSheet> createState() => _SkippedSeriesSheetState();
+}
+
+class _SkippedSeriesSheetState extends State<_SkippedSeriesSheet> {
+ final _service = UpcomingReleasesService();
+ Set<String> _alwaysScan = {};
+ Set<String> _neverScan = {};
+ String? _busySeriesId;
+
+ @override
+ void initState() {
+ super.initState();
+ _service.addListener(_onServiceChanged);
+ _loadOverrides();
+ }
+
+ @override
+ void dispose() {
+ _service.removeListener(_onServiceChanged);
+ super.dispose();
+ }
+
+ void _onServiceChanged() {
+ if (mounted) setState(() {});
+ }
+
+ Future<void> _loadOverrides() async {
+ final always = (await ScopedPrefs.getStringList(UpcomingReleasesService.alwaysScanPrefKey)).toSet();
+ final never = (await ScopedPrefs.getStringList(UpcomingReleasesService.neverScanPrefKey)).toSet();
+ if (!mounted) return;
+ setState(() {
+ _alwaysScan = always;
+ _neverScan = never;
+ });
+ }
+
+ Future<void> _toggleOverride(SkippedSeries s, {required bool always}) async {
+ final target = always ? _alwaysScan : _neverScan;
+ final other = always ? _neverScan : _alwaysScan;
+ setState(() {
+ if (target.contains(s.seriesId)) {
+ target.remove(s.seriesId);
+ } else {
+ target.add(s.seriesId);
+ other.remove(s.seriesId);
+ }
+ });
+ await ScopedPrefs.setStringList(
+ UpcomingReleasesService.alwaysScanPrefKey, _alwaysScan.toList());
+ await ScopedPrefs.setStringList(
+ UpcomingReleasesService.neverScanPrefKey, _neverScan.toList());
+ }
+
+ bool get _libraryMismatch {
+ final libraryId = context.read<LibraryProvider>().selectedLibraryId;
+ final stateLib = _service.skippedLibraryId;
+ return stateLib.isNotEmpty && libraryId != null && stateLib != libraryId;
+ }
+
+ Future<void> _scanNow(SkippedSeries s) async {
+ if (_busySeriesId != null) return;
+ final l = AppLocalizations.of(context)!;
+ final api = context.read<AuthProvider>().apiService;
+ final libraryId = context.read<LibraryProvider>().selectedLibraryId;
+ if (api == null || libraryId == null) return;
+ setState(() => _busySeriesId = s.seriesId);
+ final outcome = await _service.scanSingleSeries(
+ api: api,
+ libraryId: libraryId,
+ seriesId: s.seriesId,
+ seriesName: s.seriesName,
+ );
+ if (!mounted) return;
+ setState(() => _busySeriesId = null);
+ switch (outcome) {
+ case SingleScanOutcome.found:
+ showOverlayToast(context, l.upcomingReleasesSkippedScanFound(s.seriesName),
+ icon: Icons.event_available_rounded);
+ case SingleScanOutcome.none:
+ showOverlayToast(context, l.upcomingReleasesSkippedScanNone(s.seriesName),
+ icon: Icons.check_rounded);
+ case SingleScanOutcome.failed:
+ showOverlayToast(context, l.upcomingReleasesRescanFailed,
+ icon: Icons.error_outline_rounded);
+ }
+ }
+
+ Future<void> _openSeriesSheet(SkippedSeries s) async {
+ if (s.audibleAsin.isEmpty || _busySeriesId != null) return;
+ final api = context.read<AuthProvider>().apiService;
+ final libraryId = context.read<LibraryProvider>().selectedLibraryId;
+ if (api == null || libraryId == null) return;
+ setState(() => _busySeriesId = s.seriesId);
+ final books = await api.getBooksBySeries(libraryId, s.seriesId, limit: 500);
+ if (!mounted) return;
+ setState(() => _busySeriesId = null);
+ final ownedTitles = <String>{};
+ final ownedAsins = <String>{};
+ for (final b in books) {
+ if (b is! Map<String, dynamic>) continue;
+ final media = b['media'] as Map<String, dynamic>? ?? {};
+ final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
+ final title = metadata['title'] as String? ?? '';
+ final asin = metadata['asin'] as String? ?? '';
+ if (title.isNotEmpty) ownedTitles.add(title);
+ if (asin.isNotEmpty) ownedAsins.add(asin);
+ }
+ if (!mounted) return;
+ showAudibleSeriesSheet(context,
+ seriesName: s.seriesName,
+ seriesAsin: s.audibleAsin,
+ ownedTitles: ownedTitles,
+ ownedAsins: ownedAsins,
+ );
+ }
+
+ static final _asinPattern = RegExp(r'B0[0-9A-Z]{8}', caseSensitive: false);
+
+ Future<void> _promptSeriesAsin(SkippedSeries s) async {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final controller = TextEditingController(
+ text: s.audibleAsin.isNotEmpty ? s.audibleAsin : '');
+ final saved = await showDialog<String>(
+ context: context,
+ builder: (ctx) => AlertDialog(
+ title: Text(l.upcomingReleasesSetSeriesAsin),
+ content: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Text(s.seriesName,
+ style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: cs.primary)),
+ const SizedBox(height: 8),
+ Text(l.upcomingReleasesSetAsinInstructions,
+ style: TextStyle(fontSize: 12, color: cs.onSurfaceVariant)),
+ const SizedBox(height: 12),
+ TextField(
+ controller: controller,
+ autofocus: true,
+ decoration: InputDecoration(
+ hintText: l.upcomingReleasesSetAsinHint,
+ border: const OutlineInputBorder(),
+ isDense: true,
+ ),
+ ),
+ ]),
+ actions: [
+ TextButton(onPressed: () => Navigator.pop(ctx), child: Text(l.upcomingReleasesNotNow)),
+ FilledButton(
+ onPressed: () => Navigator.pop(ctx, controller.text),
+ child: Text(l.upcomingReleasesSetAsinSave),
+ ),
+ ],
+ ),
+ );
+ controller.dispose();
+ if (saved == null || !mounted) return;
+ final match = _asinPattern.firstMatch(saved);
+ if (match == null) {
+ showOverlayToast(context, l.upcomingReleasesSetAsinInvalid, icon: Icons.error_outline_rounded);
+ return;
+ }
+ final asin = match.group(0)!.toUpperCase();
+ await _service.setSeriesAsin(seriesId: s.seriesId, seriesName: s.seriesName, asin: asin);
+ if (!mounted) return;
+ showOverlayToast(context, l.upcomingReleasesSetAsinSaved, icon: Icons.link_rounded);
+ await _scanNow(SkippedSeries(
+ seriesId: s.seriesId,
+ seriesName: s.seriesName,
+ audibleAsin: asin,
+ newestRelease: '',
+ ));
+ }
+
+ void _showRowMenu(SkippedSeries s) {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+ final isAlways = _alwaysScan.contains(s.seriesId);
+ final isNever = _neverScan.contains(s.seriesId);
+ showModalBottomSheet(
+ context: context,
+ backgroundColor: Theme.of(context).bottomSheetTheme.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
+ ),
+ builder: (ctx) => SafeArea(
+ child: Column(mainAxisSize: MainAxisSize.min, children: [
+ Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(top: 8, bottom: 12),
+ decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20),
+ child: Text(s.seriesName,
+ style: Theme.of(context).textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600),
+ maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
+ ),
+ const SizedBox(height: 12),
+ ListTile(
+ leading: Icon(Icons.refresh_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesSkippedScanNow,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(ctx);
+ _scanNow(s);
+ },
+ ),
+ ListTile(
+ leading: Icon(Icons.link_rounded, color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesSetSeriesAsin,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(ctx);
+ _promptSeriesAsin(s);
+ },
+ ),
+ ListTile(
+ leading: Icon(isAlways ? Icons.check_circle_rounded : Icons.play_circle_outline_rounded,
+ color: cs.primary, size: 22),
+ title: Text(l.upcomingReleasesSkippedAlwaysScan,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ trailing: isAlways ? Icon(Icons.check_rounded, color: cs.primary, size: 18) : null,
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(ctx);
+ _toggleOverride(s, always: true);
+ },
+ ),
+ ListTile(
+ leading: Icon(isNever ? Icons.block_rounded : Icons.block_outlined,
+ color: cs.error, size: 22),
+ title: Text(l.upcomingReleasesSkippedNeverScan,
+ style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
+ trailing: isNever ? Icon(Icons.check_rounded, color: cs.error, size: 18) : null,
+ dense: true, visualDensity: VisualDensity.compact,
+ onTap: () {
+ Navigator.pop(ctx);
+ _toggleOverride(s, always: false);
+ },
+ ),
+ const SizedBox(height: 8),
+ ]),
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final cs = Theme.of(context).colorScheme;
+ final tt = Theme.of(context).textTheme;
+ final l = AppLocalizations.of(context)!;
+ final skipped = _service.skippedSeries;
+ final mismatch = _libraryMismatch;
+
+ return ClipRect(child: Column(
+ children: [
+ Icon(Icons.visibility_off_rounded, size: 20, color: cs.primary),
+ const SizedBox(height: 4),
+ Text(l.upcomingReleasesSkippedTitle,
+ style: tt.titleLarge?.copyWith(fontWeight: FontWeight.w600)),
+ const SizedBox(height: 4),
+ Text(l.upcomingReleasesSkippedCount(skipped.length),
+ style: tt.bodyMedium?.copyWith(color: cs.onSurfaceVariant)),
+ if (mismatch)
+ Padding(
+ padding: const EdgeInsets.fromLTRB(24, 8, 24, 0),
+ child: Text(l.upcomingReleasesSkippedOtherLibrary,
+ textAlign: TextAlign.center,
+ style: tt.bodySmall?.copyWith(color: cs.error, fontSize: 11)),
+ ),
+ const SizedBox(height: 12),
+ Expanded(
+ child: skipped.isEmpty
+ ? ListView(controller: widget.scrollController, children: [
+ const SizedBox(height: 80),
+ Center(child: Text(l.upcomingReleasesSkippedNone,
+ style: tt.bodyLarge?.copyWith(color: cs.onSurfaceVariant))),
+ ])
+ : ListView.builder(
+ controller: widget.scrollController,
+ padding: EdgeInsets.fromLTRB(16, 0, 16, 24 + MediaQuery.of(context).viewPadding.bottom),
+ itemCount: skipped.length,
+ itemBuilder: (context, index) => _buildRow(cs, tt, l, skipped[index], mismatch),
+ ),
+ ),
+ ],
+ ));
+ }
+
+ Widget _buildRow(ColorScheme cs, TextTheme tt, AppLocalizations l, SkippedSeries s, bool mismatch) {
+ final unmatched = s.audibleAsin.isEmpty;
+ final isNever = _neverScan.contains(s.seriesId);
+ final isAlways = _alwaysScan.contains(s.seriesId);
+ final busy = _busySeriesId == s.seriesId;
+
+ String? subtitle;
+ if (unmatched) {
+ subtitle = l.upcomingReleasesSkippedUnmatched;
+ } else {
+ final newest = DateTime.tryParse(s.newestRelease);
+ if (newest != null) {
+ final years = DateTime.now().difference(newest).inDays ~/ 365;
+ subtitle = l.upcomingReleasesSkippedLastBook(years);
+ }
+ }
+
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 8),
+ child: GestureDetector(
+ onTap: mismatch
+ ? null
+ : unmatched
+ ? () => _promptSeriesAsin(s)
+ : () => _openSeriesSheet(s),
+ child: Card(
+ elevation: 0,
+ color: cs.surfaceContainerHigh,
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
+ clipBehavior: Clip.antiAlias,
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(14, 10, 6, 10),
+ child: Row(children: [
+ Expanded(
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Row(children: [
+ Flexible(
+ child: Text(s.seriesName, maxLines: 1, overflow: TextOverflow.ellipsis,
+ style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600, color: cs.onSurface)),
+ ),
+ if (isNever || isAlways) ...[
+ const SizedBox(width: 6),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
+ decoration: BoxDecoration(
+ color: (isNever ? cs.error : cs.primary).withValues(alpha: 0.12),
+ borderRadius: BorderRadius.circular(6),
+ ),
+ child: Text(
+ isNever ? l.upcomingReleasesSkippedNeverScan : l.upcomingReleasesSkippedAlwaysScan,
+ style: TextStyle(fontSize: 9, fontWeight: FontWeight.w700,
+ color: isNever ? cs.error : cs.primary),
+ ),
+ ),
+ ],
+ ]),
+ if (subtitle != null)
+ Padding(
+ padding: const EdgeInsets.only(top: 2),
+ child: Text(subtitle, maxLines: 1, overflow: TextOverflow.ellipsis,
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant, fontSize: 11)),
+ ),
+ ]),
+ ),
+ if (busy)
+ const Padding(
+ padding: EdgeInsets.all(12),
+ child: SizedBox(width: 18, height: 18,
+ child: CircularProgressIndicator(strokeWidth: 2)),
+ )
+ else if (!mismatch)
+ IconButton(
+ icon: Icon(Icons.more_vert_rounded, size: 20, color: cs.onSurfaceVariant),
+ onPressed: () => _showRowMenu(s),
+ ),
+ ]),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/services/backup_service.dart b/lib/services/backup_service.dart
index 74170cb5..b1e3116c 100644
--- a/lib/services/backup_service.dart
+++ b/lib/services/backup_service.dart
@@ -95,6 +95,7 @@ class BackupService {
'skipChapterBarrier': await PlayerSettings.getSkipChapterBarrier(),
'audibleRegion': await PlayerSettings.getAudibleRegion(),
'upcomingReleasesSortByDate': await PlayerSettings.getUpcomingReleasesSortByDate(),
+ 'upcomingFinishedAfterYears': await PlayerSettings.getUpcomingFinishedAfterYears(),
'libraryTagFilter': await PlayerSettings.getLibraryTagFilter(),
'librarySeriesFilter': await PlayerSettings.getLibrarySeriesFilter(),
'narratorSort': await PlayerSettings.getNarratorSort(),
@@ -195,6 +196,11 @@ class BackupService {
// Rolling download series (scoped)
final rollingDownloadSeries = await ScopedPrefs.getStringList('rolling_download_series');
+ // Upcoming-scan per-series overrides + removed-books list (scoped)
+ final upcomingAlwaysScan = await ScopedPrefs.getStringList('upcoming_always_scan_series');
+ final upcomingNeverScan = await ScopedPrefs.getStringList('upcoming_never_scan_series');
+ final upcomingIgnoredBooks = await ScopedPrefs.getString('upcomingReleasesIgnoredBooks');
+
// Podcast subscriptions + manually-curated Absorbing list (scoped)
final subscribedPodcasts = await ScopedPrefs.getStringList('subscribed_podcasts');
final absorbingManualAdds = await ScopedPrefs.getStringList('absorbing_manual_adds');
@@ -342,6 +348,10 @@ class BackupService {
'notes': notes,
'savedEbooks': savedEbooks,
'rollingDownloadSeries': rollingDownloadSeries,
+ 'upcomingAlwaysScan': upcomingAlwaysScan,
+ 'upcomingNeverScan': upcomingNeverScan,
+ if (upcomingIgnoredBooks != null && upcomingIgnoredBooks.isNotEmpty)
+ 'upcomingIgnoredBooks': upcomingIgnoredBooks,
'subscribedPodcasts': subscribedPodcasts,
'absorbingManualAdds': absorbingManualAdds,
'absorbingFinishedManualAdds': absorbingFinishedManualAdds,
@@ -535,6 +545,7 @@ class BackupService {
if (s['longBackSkip'] != null) PlayerSettings.setLongBackSkip(s['longBackSkip'] as int);
if (s['audibleRegion'] != null) await PlayerSettings.setAudibleRegion(s['audibleRegion'] as String);
if (s['upcomingReleasesSortByDate'] != null) await PlayerSettings.setUpcomingReleasesSortByDate(s['upcomingReleasesSortByDate'] as bool);
+ if (s['upcomingFinishedAfterYears'] != null) await PlayerSettings.setUpcomingFinishedAfterYears((s['upcomingFinishedAfterYears'] as num).toInt());
if (s['libraryTagFilter'] != null) await PlayerSettings.setLibraryTagFilter(s['libraryTagFilter'] as String);
if (s['librarySeriesFilter'] != null) await PlayerSettings.setLibrarySeriesFilter(s['librarySeriesFilter'] as String);
if (s['narratorSort'] != null) await PlayerSettings.setNarratorSort(s['narratorSort'] as String);
@@ -658,6 +669,26 @@ class BackupService {
);
}
+ // Upcoming-scan per-series overrides (scoped)
+ final upcomingAlwaysScan = data['upcomingAlwaysScan'] as List<dynamic>?;
+ if (upcomingAlwaysScan != null && upcomingAlwaysScan.isNotEmpty) {
+ await ScopedPrefs.setStringList(
+ 'upcoming_always_scan_series',
+ upcomingAlwaysScan.cast<String>(),
+ );
+ }
+ final upcomingNeverScan = data['upcomingNeverScan'] as List<dynamic>?;
+ if (upcomingNeverScan != null && upcomingNeverScan.isNotEmpty) {
+ await ScopedPrefs.setStringList(
+ 'upcoming_never_scan_series',
+ upcomingNeverScan.cast<String>(),
+ );
+ }
+ final upcomingIgnoredBooks = data['upcomingIgnoredBooks'] as String?;
+ if (upcomingIgnoredBooks != null && upcomingIgnoredBooks.isNotEmpty) {
+ await ScopedPrefs.setString('upcomingReleasesIgnoredBooks', upcomingIgnoredBooks);
+ }
+
// Podcast subscriptions + Absorbing manual list (scoped)
final subscribedPodcasts = data['subscribedPodcasts'] as List<dynamic>?;
if (subscribedPodcasts != null) {
diff --git a/lib/services/episode_notification_service.dart b/lib/services/episode_notification_service.dart
index f26542a0..71565def 100644
--- a/lib/services/episode_notification_service.dart
+++ b/lib/services/episode_notification_service.dart
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:io';
-import 'package:flutter/foundation.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:workmanager/workmanager.dart';
@@ -9,6 +9,7 @@ import 'package:workmanager/workmanager.dart';
import '../main.dart' show rootNavigatorKey;
import '../providers/auth_provider.dart';
import '../providers/library_provider.dart';
+import '../screens/upcoming_releases_screen.dart';
import '../widgets/episode_list_sheet.dart';
import 'api_service.dart';
import 'download_service.dart';
@@ -90,6 +91,23 @@ class EpisodeNotificationService {
/// Open the show's episode list once the app (navigator + session) is up.
static Future<void> _handleTap(String? payload) async {
+ if (payload == 'upcoming') {
+ // Release-day notification: open the upcoming releases page.
+ for (var i = 0; i < 60; i++) {
+ final ctx = rootNavigatorKey.currentContext;
+ if (ctx != null && ctx.mounted) {
+ try {
+ if (ctx.read<AuthProvider>().apiService != null) {
+ Navigator.push(ctx, MaterialPageRoute(
+ builder: (_) => const UpcomingReleasesScreen()));
+ return;
+ }
+ } catch (_) {}
+ }
+ await Future.delayed(const Duration(milliseconds: 500));
+ }
+ return;
+ }
if (payload == null || !payload.startsWith('show:')) return;
final showId = payload.substring(5);
for (var i = 0; i < 60; i++) {
@@ -133,6 +151,9 @@ Future<void> _checkAndNotify() async {
// can lag behind writes from earlier workers or the foreground app.
await EpisodeNotificationService.prepareBackgroundPreferences();
+ // Purely local, so it runs before the subscribed-podcasts early return.
+ await _checkReleaseDayNotifs();
+
final subscribed = await ScopedPrefs.getStringList('subscribed_podcasts');
if (subscribed.isEmpty) return;
@@ -236,6 +257,82 @@ Future<void> _checkAndNotify() async {
}
}
+/// Notify on release day for books tracked on the upcoming page. Reads the
+/// cached scan results from raw prefs - no network, no account scope needed.
+Future<void> _checkReleaseDayNotifs() async {
+ try {
+ final prefs = await SharedPreferences.getInstance();
+ final json = prefs.getString('upcomingReleasesCache');
+ if (json == null || json.isEmpty) return;
+
+ final now = DateTime.now();
+ final today = DateTime(now.year, now.month, now.day);
+ final notified =
+ (prefs.getStringList('upcomingReleaseDayNotified') ?? []).toSet();
+ final results = jsonDecode(json) as List<dynamic>;
+
+ final allUpcomingAsins = <String>{};
+ final due = <({String asin, String title, String seriesName})>[];
+ for (final r in results) {
+ if (r is! Map) continue;
+ final seriesName = r['seriesName'] as String? ?? '';
+ for (final b in (r['upcomingBooks'] as List<dynamic>? ?? [])) {
+ if (b is! Map) continue;
+ final asin = b['asin'] as String? ?? '';
+ final title = b['title'] as String? ?? '';
+ if (asin.isEmpty || title.isEmpty) continue;
+ allUpcomingAsins.add(asin);
+ if (notified.contains(asin)) continue;
+ final date = DateTime.tryParse(b['releaseDate'] as String? ?? '');
+ if (date == null) continue;
+ // Release day, or the periodic job catching up within a couple days
+ final daysOut = today.difference(DateTime(date.year, date.month, date.day)).inDays;
+ if (daysOut < 0 || daysOut > 2) continue;
+ due.add((asin: asin, title: title, seriesName: seriesName));
+ }
+ }
+ if (due.isEmpty) return;
+
+ final plugin = FlutterLocalNotificationsPlugin();
+ const channel = AndroidNotificationChannel(
+ 'release_day',
+ 'Book releases',
+ description: 'A tracked upcoming book is out',
+ importance: Importance.defaultImportance,
+ );
+ await plugin
+ .resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()
+ ?.createNotificationChannel(channel);
+
+ for (final book in due) {
+ await plugin.show(
+ 0x52440000 | (book.asin.hashCode & 0xFFFF),
+ '${book.title} is released today!',
+ book.seriesName,
+ const NotificationDetails(
+ android: AndroidNotificationDetails(
+ 'release_day',
+ 'Book releases',
+ channelDescription: 'A tracked upcoming book is out',
+ icon: 'drawable/ic_notification',
+ importance: Importance.defaultImportance,
+ priority: Priority.defaultPriority,
+ ),
+ ),
+ payload: 'upcoming',
+ );
+ }
+
+ // Keep only asins still tracked as upcoming - released books leave the
+ // upcoming list on the next scan, so the set prunes itself.
+ await prefs.setStringList('upcomingReleaseDayNotified',
+ {...notified, ...due.map((b) => b.asin)}.where(allUpcomingAsins.contains).toList());
+ debugPrint('[EpisodeNotif] release-day notified: ${due.length}');
+ } catch (e) {
+ debugPrint('[EpisodeNotif] release-day check failed: $e');
+ }
+}
+
/// ApiService from raw prefs - same pattern as the home-widget cold path
/// (server_url/token/refresh_token/custom_headers, prefer a reachable local
/// server so home-WiFi setups work).
diff --git a/lib/services/player_settings.dart b/lib/services/player_settings.dart
index 0e715770..5615f694 100644
--- a/lib/services/player_settings.dart
+++ b/lib/services/player_settings.dart
@@ -158,6 +158,11 @@ class PlayerSettings {
static Future<bool> getUpcomingReleasesSortByDate() => _get('upcomingReleasesSortByDate', false);
static Future<void> setUpcomingReleasesSortByDate(bool value) => _set('upcomingReleasesSortByDate', value);
+ /// Years without a new release before the upcoming-releases scan considers
+ /// a series finished and stops checking it every time (0 = never skip).
+ static Future<int> getUpcomingFinishedAfterYears() => _get('upcomingFinishedAfterYears', 3);
+ static Future<void> setUpcomingFinishedAfterYears(int value) => _set('upcomingFinishedAfterYears', value);
+
/// Last state of the "delete files from the server" checkbox in the delete
/// confirm. Starts ticked and remembers what you picked, same as the web UI
/// (which keeps `softDeleteDefault` in localStorage).
diff --git a/lib/services/upcoming_releases_service.dart b/lib/services/upcoming_releases_service.dart
index 72179c25..eb63743f 100644
--- a/lib/services/upcoming_releases_service.dart
+++ b/lib/services/upcoming_releases_service.dart
@@ -3,6 +3,8 @@ import 'package:flutter/foundation.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'api_service.dart';
+import 'player_settings.dart';
+import 'scoped_prefs.dart';
import '../l10n/app_localizations.dart';
import '../main.dart' show rootNavigatorKey;
@@ -43,6 +45,201 @@ class UpcomingSeriesResult {
);
}
+/// A series the scan skipped because it looks finished, was manually
+/// excluded, or couldn't be matched on Audible.
+class SkippedSeries {
+ final String seriesId;
+ final String seriesName;
+ final String audibleAsin; // '' = could not be matched on Audible
+ final String newestRelease; // '' = unknown
+
+ SkippedSeries({
+ required this.seriesId,
+ required this.seriesName,
+ required this.audibleAsin,
+ required this.newestRelease,
+ });
+
+ Map<String, dynamic> toJson() => {
+ 'id': seriesId,
+ 'name': seriesName,
+ 'asin': audibleAsin,
+ 'newestRelease': newestRelease,
+ };
+
+ factory SkippedSeries.fromJson(Map<String, dynamic> json) => SkippedSeries(
+ seriesId: json['id'] as String? ?? '',
+ seriesName: json['name'] as String? ?? '',
+ audibleAsin: json['asin'] as String? ?? '',
+ newestRelease: json['newestRelease'] as String? ?? '',
+ );
+}
+
+enum SingleScanOutcome { found, none, failed }
+
+/// Why a series is being skipped this scan: not at all, visibly (dormant /
+/// excluded / unmatched), or silently (deep scan, known complete).
+enum _SkipKind { none, skipped, complete }
+
+/// Result of a deep scan for one series: released books not in the library.
+class MissingSeriesResult {
+ final String seriesId;
+ final String seriesName;
+ final String audibleAsin;
+ final List<Map<String, dynamic>> missingBooks;
+
+ MissingSeriesResult({
+ required this.seriesId,
+ required this.seriesName,
+ required this.audibleAsin,
+ required this.missingBooks,
+ });
+
+ Map<String, dynamic> toJson() => {
+ 'seriesId': seriesId,
+ 'seriesName': seriesName,
+ 'audibleAsin': audibleAsin,
+ 'missingBooks': missingBooks,
+ };
+
+ factory MissingSeriesResult.fromJson(Map<String, dynamic> json) => MissingSeriesResult(
+ seriesId: json['seriesId'] as String? ?? '',
+ seriesName: json['seriesName'] as String? ?? '',
+ audibleAsin: json['audibleAsin'] as String? ?? '',
+ missingBooks: (json['missingBooks'] as List<dynamic>?)
+ ?.map((e) => Map<String, dynamic>.from(e as Map))
+ .toList() ?? [],
+ );
+}
+
+/// A book the user removed from the page for good ("this and future scans").
+/// Keeps enough context to restore it into the right list later.
+class IgnoredBook {
+ final Map<String, dynamic> book;
+ final String seriesId;
+ final String seriesName;
+ final String audibleAsin;
+ final String from; // 'upcoming' | 'recent' | 'missing'
+ final int removedAtMs;
+
+ IgnoredBook({
+ required this.book,
+ required this.seriesId,
+ required this.seriesName,
+ required this.audibleAsin,
+ required this.from,
+ required this.removedAtMs,
+ });
+
+ String get asin => book['asin'] as String? ?? '';
+
+ Map<String, dynamic> toJson() => {
+ 'book': book,
+ 'seriesId': seriesId,
+ 'seriesName': seriesName,
+ 'audibleAsin': audibleAsin,
+ 'from': from,
+ 'removedAtMs': removedAtMs,
+ };
+
+ factory IgnoredBook.fromJson(Map<String, dynamic> json) => IgnoredBook(
+ book: Map<String, dynamic>.from(json['book'] as Map? ?? {}),
+ seriesId: json['seriesId'] as String? ?? '',
+ seriesName: json['seriesName'] as String? ?? '',
+ audibleAsin: json['audibleAsin'] as String? ?? '',
+ from: json['from'] as String? ?? 'recent',
+ removedAtMs: (json['removedAtMs'] as num?)?.toInt() ?? 0,
+ );
+}
+
+/// Summary of the last completed scan, shown as the scan report.
+class ScanReport {
+ final int completedAtMs;
+ final bool deep;
+ final int checked;
+ final int skipped;
+ final List<String> unmatchedNames;
+ final List<String> failedNames;
+ final int upcoming;
+ final int recent;
+ final int missing;
+
+ ScanReport({
+ required this.completedAtMs,
+ required this.deep,
+ required this.checked,
+ required this.skipped,
+ required this.unmatchedNames,
+ required this.failedNames,
+ required this.upcoming,
+ required this.recent,
+ required this.missing,
+ });
+
+ DateTime get completedAt => DateTime.fromMillisecondsSinceEpoch(completedAtMs);
+
+ Map<String, dynamic> toJson() => {
+ 'completedAtMs': completedAtMs,
+ 'deep': deep,
+ 'checked': checked,
+ 'skipped': skipped,
+ 'unmatchedNames': unmatchedNames,
+ 'failedNames': failedNames,
+ 'upcoming': upcoming,
+ 'recent': recent,
+ 'missing': missing,
+ };
+
+ factory ScanReport.fromJson(Map<String, dynamic> json) => ScanReport(
+ completedAtMs: (json['completedAtMs'] as num?)?.toInt() ?? 0,
+ deep: json['deep'] as bool? ?? false,
+ checked: (json['checked'] as num?)?.toInt() ?? 0,
+ skipped: (json['skipped'] as num?)?.toInt() ?? 0,
+ unmatchedNames: (json['unmatchedNames'] as List<dynamic>? ?? []).cast<String>(),
+ failedNames: (json['failedNames'] as List<dynamic>? ?? []).cast<String>(),
+ upcoming: (json['upcoming'] as num?)?.toInt() ?? 0,
+ recent: (json['recent'] as num?)?.toInt() ?? 0,
+ missing: (json['missing'] as num?)?.toInt() ?? 0,
+ );
+}
+
+/// What the scan remembers about a series between runs.
+class _SeriesScanEntry {
+ String name;
+ String asin; // '' = tried to resolve, no Audible match
+ String newestRelease; // newest release date seen on Audible, '' = unknown
+ int lastChecked; // epoch ms of the last successful discovery
+ bool missingComplete; // last deep scan found no missing books
+ String newestAtMissingCheck; // newestRelease at the time of that deep scan
+
+ _SeriesScanEntry({
+ required this.name,
+ this.asin = '',
+ this.newestRelease = '',
+ this.lastChecked = 0,
+ this.missingComplete = false,
+ this.newestAtMissingCheck = '',
+ });
+
+ Map<String, dynamic> toJson() => {
+ 'name': name,
+ 'asin': asin,
+ 'newestRelease': newestRelease,
+ 'lastChecked': lastChecked,
+ 'missingComplete': missingComplete,
+ 'newestAtMissingCheck': newestAtMissingCheck,
+ };
+
+ factory _SeriesScanEntry.fromJson(Map<String, dynamic> json) => _SeriesScanEntry(
+ name: json['name'] as String? ?? '',
+ asin: json['asin'] as String? ?? '',
+ newestRelease: json['newestRelease'] as String? ?? '',
+ lastChecked: (json['lastChecked'] as num?)?.toInt() ?? 0,
+ missingComplete: json['missingComplete'] as bool? ?? false,
+ newestAtMissingCheck: json['newestAtMissingCheck'] as String? ?? '',
+ );
+}
+
/// Scans library series for upcoming Audible releases.
///
/// Singleton service that survives screen navigation and continues in the
@@ -57,6 +254,89 @@ class UpcomingReleasesService extends ChangeNotifier {
final List<UpcomingSeriesResult> _results = [];
List<UpcomingSeriesResult> get results => _results;
+ // Deep-scan results: released books missing from the library, per series
+ final List<MissingSeriesResult> _missingResults = [];
+ List<MissingSeriesResult> get missingResults => _missingResults;
+
+ DateTime? _missingCacheTime;
+ DateTime? get missingCacheTime => _missingCacheTime;
+
+ int get missingBookCount =>
+ _missingResults.fold<int>(0, (sum, r) => sum + r.missingBooks.length);
+
+ bool _isDeepScan = false;
+ bool get isDeepScan => _isDeepScan;
+
+ // Series that had upcoming/recent entries when the current scan started; a
+ // deep scan must re-check these even when they're known missing-complete,
+ // or their entries would silently drop out of the refreshed results.
+ Set<String> _seriesWithPriorResults = {};
+
+ // Library-wide ownership index. The per-series book fetch only sees books
+ // filed in that exact ABS series, so anything owned as a standalone or
+ // under a differently-named series would be flagged missing without this.
+ // ASINs match precisely; titles need the author too, or generic titles
+ // ("Homecoming") would mark unowned books as owned.
+ Set<String> _libraryOwnedAsins = {};
+ Set<String> _libraryOwnedTitleAuthor = {};
+ String _ownedIndexLibraryId = '';
+ DateTime? _ownedIndexAt;
+
+ // Books already on the page when the scan started; anything discovered
+ // outside this set gets a NEW badge (suppressed on the very first scan,
+ // where everything would be new).
+ Set<String> _priorSeenAsins = {};
+ bool _priorHadData = false;
+
+ // Scan report bookkeeping
+ ScanReport? _lastReport;
+ ScanReport? get lastReport => _lastReport;
+ int _scanCheckedCount = 0;
+ int _scanSkippedCount = 0;
+ final Set<String> _scanUnmatchedNames = {};
+ final List<String> _scanFailedNames = [];
+
+ /// Whether any scan has ever completed (state exists) - drives the
+ /// first-scan explainer in the UI.
+ bool get hasScanKnowledge => _scanState.isNotEmpty;
+
+ // Permanently removed books ("this and future scans")
+ final List<IgnoredBook> _ignoredBooks = [];
+ final Set<String> _ignoredAsins = {};
+ bool _ignoredLoaded = false;
+ List<IgnoredBook> get ignoredBooks => List.unmodifiable(_ignoredBooks);
+ int get ignoredCount => _ignoredBooks.length;
+
+ static const _ignoredKey = 'upcomingReleasesIgnoredBooks';
+
+ Future<void> _loadIgnored() async {
+ if (_ignoredLoaded) return;
+ _ignoredLoaded = true;
+ try {
+ final json = await ScopedPrefs.getString(_ignoredKey);
+ if (json == null || json.isEmpty) return;
+ final list = jsonDecode(json) as List<dynamic>;
+ _ignoredBooks
+ ..clear()
+ ..addAll(list.map((e) =>
+ IgnoredBook.fromJson(Map<String, dynamic>.from(e as Map))));
+ _ignoredAsins
+ ..clear()
+ ..addAll(_ignoredBooks.map((b) => b.asin).where((a) => a.isNotEmpty));
+ } catch (e) {
+ debugPrint('[Upcoming] loadIgnored error: $e');
+ }
+ }
+
+ Future<void> _saveIgnored() async {
+ try {
+ await ScopedPrefs.setString(
+ _ignoredKey, jsonEncode(_ignoredBooks.map((b) => b.toJson()).toList()));
+ } catch (e) {
+ debugPrint('[Upcoming] saveIgnored error: $e');
+ }
+ }
+
bool _isRunning = false;
bool get isRunning => _isRunning;
@@ -85,9 +365,41 @@ class UpcomingReleasesService extends ChangeNotifier {
// Cache: series ID -> Audible ASIN (or empty string if unresolvable)
final Map<String, String> _asinCache = {};
- // Cache: Audible ASIN -> discovered books
+ // Cache: Audible ASIN -> discovered books (dedup within a single run only)
final Map<String, List<Map<String, dynamic>>> _discoveryCache = {};
+ // Persisted knowledge from previous scans: series ID -> entry
+ final Map<String, _SeriesScanEntry> _scanState = {};
+ bool _scanStateLoaded = false;
+ String _scanStateLibraryId = '';
+
+ // Skip configuration, read once per scan
+ int _finishedAfterYears = 0;
+ Set<String> _alwaysScan = {};
+ Set<String> _neverScan = {};
+
+ final List<SkippedSeries> _skippedThisScan = [];
+ List<SkippedSeries> _persistedSkipped = [];
+
+ /// Series skipped as finished: the in-progress list while a scan runs,
+ /// otherwise the last completed scan's list.
+ List<SkippedSeries> get skippedSeries =>
+ List.unmodifiable(_isRunning ? _skippedThisScan : _persistedSkipped);
+ int get skippedCount => _isRunning ? _skippedThisScan.length : _persistedSkipped.length;
+
+ /// Library the persisted skipped list was scanned from.
+ String get skippedLibraryId => _scanStateLibraryId;
+
+ // How long a skipped series stays skipped before it gets re-checked.
+ static const _finishedRecheckDays = 30;
+ static const _ancientDormancyYears = 5;
+ static const _ancientRecheckDays = 90;
+ static const _unresolvedRecheckDays = 90;
+
+ /// Pref keys for the per-series scan overrides (ScopedPrefs string lists).
+ static const alwaysScanPrefKey = 'upcoming_always_scan_series';
+ static const neverScanPrefKey = 'upcoming_never_scan_series';
+
// Notification
static const _notifChannelId = 'absorb_upcoming_scan';
String get _notifChannelName =>
@@ -106,6 +418,10 @@ class UpcomingReleasesService extends ChangeNotifier {
static const _cacheKey = 'upcomingReleasesCache';
static const _cacheTimeKey = 'upcomingReleasesCacheTime';
static const _cacheRegionKey = 'upcomingReleasesCacheRegion';
+ static const _scanStateKey = 'upcomingReleasesScanState';
+ static const _missingCacheKey = 'upcomingReleasesMissingCache';
+ static const _missingCacheTimeKey = 'upcomingReleasesMissingCacheTime';
+ static const _missingCacheRegionKey = 'upcomingReleasesMissingCacheRegion';
DateTime? _cacheTime;
DateTime? get cacheTime => _cacheTime;
@@ -117,6 +433,9 @@ class UpcomingReleasesService extends ChangeNotifier {
/// Load cached results from SharedPreferences.
/// Returns true if valid cache was loaded (regardless of age).
Future<bool> loadCache() async {
+ await _loadScanState();
+ await _loadMissingCache();
+ await _loadIgnored();
try {
final prefs = await SharedPreferences.getInstance();
final cacheTimeMs = prefs.getInt(_cacheTimeKey) ?? 0;
@@ -143,6 +462,101 @@ class UpcomingReleasesService extends ChangeNotifier {
}
}
+ /// Load the persisted per-series scan knowledge (once per session/region).
+ Future<void> _loadScanState() async {
+ if (_scanStateLoaded) return;
+ _scanStateLoaded = true;
+ try {
+ final json = await ScopedPrefs.getString(_scanStateKey);
+ if (json == null || json.isEmpty) return;
+ final data = jsonDecode(json) as Map<String, dynamic>;
+ // ASINs and release dates are region-specific
+ if ((data['region'] as String? ?? '') != _region) return;
+ _scanStateLibraryId = data['libraryId'] as String? ?? '';
+ final series = data['series'] as Map<String, dynamic>? ?? {};
+ for (final e in series.entries) {
+ final entry = _SeriesScanEntry.fromJson(
+ Map<String, dynamic>.from(e.value as Map));
+ _scanState[e.key] = entry;
+ // Only seed resolved ASINs - unresolvable series get another
+ // resolution attempt once their recheck interval elapses.
+ if (entry.asin.isNotEmpty) _asinCache[e.key] = entry.asin;
+ }
+ _persistedSkipped = (data['skipped'] as List<dynamic>? ?? [])
+ .map((s) => SkippedSeries.fromJson(Map<String, dynamic>.from(s as Map)))
+ .toList();
+ final report = data['lastReport'];
+ if (report is Map) {
+ _lastReport = ScanReport.fromJson(Map<String, dynamic>.from(report));
+ }
+ } catch (e) {
+ debugPrint('[Upcoming] loadScanState error: $e');
+ }
+ }
+
+ Future<void> _saveScanState() async {
+ try {
+ final data = {
+ 'region': _region,
+ 'libraryId': _scanStateLibraryId,
+ 'skipped': _persistedSkipped.map((s) => s.toJson()).toList(),
+ if (_lastReport != null) 'lastReport': _lastReport!.toJson(),
+ 'series': {for (final e in _scanState.entries) e.key: e.value.toJson()},
+ };
+ await ScopedPrefs.setString(_scanStateKey, jsonEncode(data));
+ } catch (e) {
+ debugPrint('[Upcoming] saveScanState error: $e');
+ }
+ }
+
+ void _resetScanKnowledge() {
+ _scanState.clear();
+ _asinCache.clear();
+ _discoveryCache.clear();
+ _skippedThisScan.clear();
+ _persistedSkipped = [];
+ _scanStateLibraryId = '';
+ _scanStateLoaded = false;
+ _missingResults.clear();
+ _missingCacheTime = null;
+ _lastReport = null;
+ }
+
+ /// Load the deep-scan results cache, once per session/region.
+ Future<void> _loadMissingCache() async {
+ if (_missingCacheTime != null || _missingResults.isNotEmpty) return;
+ try {
+ final prefs = await SharedPreferences.getInstance();
+ final timeMs = prefs.getInt(_missingCacheTimeKey) ?? 0;
+ if (timeMs == 0) return;
+ if ((prefs.getString(_missingCacheRegionKey) ?? '') != _region) return;
+ final json = prefs.getString(_missingCacheKey);
+ if (json == null || json.isEmpty) return;
+ final list = jsonDecode(json) as List<dynamic>;
+ _missingResults
+ ..clear()
+ ..addAll(list.map((e) =>
+ MissingSeriesResult.fromJson(Map<String, dynamic>.from(e as Map))));
+ _missingCacheTime = DateTime.fromMillisecondsSinceEpoch(timeMs);
+ notifyListeners();
+ } catch (e) {
+ debugPrint('[Upcoming] loadMissingCache error: $e');
+ }
+ }
+
+ Future<void> _saveMissingCache() async {
+ try {
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.setString(_missingCacheKey,
+ jsonEncode(_missingResults.map((r) => r.toJson()).toList()));
+ await prefs.setInt(_missingCacheTimeKey,
+ (_missingCacheTime ?? DateTime.now()).millisecondsSinceEpoch);
+ await prefs.setString(_missingCacheRegionKey, _region);
+ } catch (e) {
+ debugPrint('[Upcoming] saveMissingCache error: $e');
+ }
+ }
+
/// Save current results to SharedPreferences.
Future<void> _saveCache() async {
try {
@@ -166,11 +580,29 @@ class UpcomingReleasesService extends ChangeNotifier {
required ApiService api,
required String libraryId,
required String region,
+ bool deep = false,
}) async {
if (_isRunning) return;
_generation++;
final gen = _generation;
- _region = region;
+ if (region != _region) {
+ _region = region;
+ _resetScanKnowledge();
+ }
+ _isDeepScan = deep;
+ _seriesWithPriorResults = _results.map((r) => r.seriesId).toSet();
+ _priorSeenAsins = {
+ for (final r in _results) ...[
+ ...r.upcomingBooks.map((b) => b['asin'] as String? ?? ''),
+ ...r.recentBooks.map((b) => b['asin'] as String? ?? ''),
+ ],
+ for (final r in _missingResults) ...r.missingBooks.map((b) => b['asin'] as String? ?? ''),
+ }..remove('');
+ _priorHadData = _results.isNotEmpty || _missingResults.isNotEmpty;
+ _scanCheckedCount = 0;
+ _scanSkippedCount = 0;
+ _scanUnmatchedNames.clear();
+ _scanFailedNames.clear();
_isRunning = true;
_isComplete = false;
@@ -180,10 +612,20 @@ class UpcomingReleasesService extends ChangeNotifier {
_results.clear();
_hasCachedResults = false;
_currentSeriesName = null;
+ _skippedThisScan.clear();
+ _discoveryCache.clear();
notifyListeners();
await _showScanNotification(_l()?.upcomingNotifStartingScan ?? 'Starting scan...');
+ _finishedAfterYears = await PlayerSettings.getUpcomingFinishedAfterYears();
+ _alwaysScan = (await ScopedPrefs.getStringList(alwaysScanPrefKey)).toSet();
+ _neverScan = (await ScopedPrefs.getStringList(neverScanPrefKey)).toSet();
+ await _loadScanState();
+ await _loadIgnored();
+ await _ensureOwnedIndex(api, libraryId, gen, force: true);
+ if (_generation != gen) return;
+
try {
// Use filter data to get series list - lightweight, no embedded books
final filterData = await api.getLibraryFilterData(libraryId);
@@ -217,18 +659,45 @@ class UpcomingReleasesService extends ChangeNotifier {
continue;
}
await _processSeries(api, libraryId, s, gen);
+ // Keep resolved ASINs and release dates if the scan gets cancelled
+ if (_generation == gen && _processedCount % 25 == 0) {
+ await _saveScanState();
+ }
}
if (_generation != gen) return;
_isRunning = false;
_isComplete = true;
_currentSeriesName = null;
- debugPrint('[Upcoming] Scan complete: ${_results.length} series with results, '
+ // Only a completed scan may replace the persisted skipped list - a
+ // cancelled one would leave a truncated list beside full results.
+ _persistedSkipped = List.of(_skippedThisScan);
+ _scanStateLibraryId = libraryId;
+ _lastReport = ScanReport(
+ completedAtMs: DateTime.now().millisecondsSinceEpoch,
+ deep: _isDeepScan,
+ checked: _scanCheckedCount,
+ skipped: _scanSkippedCount,
+ unmatchedNames: _scanUnmatchedNames.toList()..sort(),
+ failedNames: List.of(_scanFailedNames),
+ upcoming: _results.fold<int>(0, (sum, r) => sum + r.upcomingBooks.length),
+ recent: _results.fold<int>(0, (sum, r) => sum + r.recentBooks.length),
+ missing: missingBookCount,
+ );
+ debugPrint('[Upcoming] Scan complete${_isDeepScan ? ' (deep)' : ''}: '
+ '${_results.length} series with results, '
'${_results.fold<int>(0, (sum, r) => sum + r.upcomingBooks.length)} upcoming, '
- '${_results.fold<int>(0, (sum, r) => sum + r.recentBooks.length)} recent');
+ '${_results.fold<int>(0, (sum, r) => sum + r.recentBooks.length)} recent, '
+ '${_skippedThisScan.length} skipped'
+ '${_isDeepScan ? ', $missingBookCount missing across ${_missingResults.length} series' : ''}');
notifyListeners();
await _saveCache();
+ await _saveScanState();
+ if (_isDeepScan) {
+ _missingCacheTime = DateTime.now();
+ await _saveMissingCache();
+ }
await _cancelScanNotification();
await _showCompleteNotification();
} catch (e, st) {
@@ -241,11 +710,46 @@ class UpcomingReleasesService extends ChangeNotifier {
}
}
- /// Process a single series: resolve ASIN, discover Audible books, filter.
+ /// Process a single series: skip it when it looks finished, otherwise
+ /// resolve its ASIN, discover Audible books and filter.
Future<void> _processSeries(ApiService api, String libraryId, Map<String, dynamic> s, int gen) async {
final seriesId = s['id'] as String? ?? '';
final seriesName = s['name'] as String? ?? 'Unknown Series';
+ final skip = _skipKindFor(seriesId);
+ if (skip != _SkipKind.none) {
+ // Missing-complete skips are silent: the series was fully checked and
+ // found complete, so it doesn't belong in the "not checked" list.
+ if (skip == _SkipKind.skipped) {
+ final entry = _scanState[seriesId];
+ final unmatched = entry != null && entry.asin.isEmpty;
+ if (unmatched) {
+ _scanUnmatchedNames.add(seriesName);
+ } else {
+ _scanSkippedCount++;
+ }
+ _skippedThisScan.add(SkippedSeries(
+ seriesId: seriesId,
+ seriesName: seriesName,
+ audibleAsin: entry?.asin ?? '',
+ newestRelease: entry?.newestRelease ?? '',
+ ));
+ } else {
+ _scanSkippedCount++;
+ }
+ _processedCount++;
+ notifyListeners();
+ return;
+ }
+
+ // Already found unresolvable earlier in this session - nothing to do
+ if (_asinCache[seriesId] == '') {
+ _scanUnmatchedNames.add(seriesName);
+ _processedCount++;
+ notifyListeners();
+ return;
+ }
+
_currentSeriesName = seriesName;
notifyListeners();
@@ -258,105 +762,377 @@ class UpcomingReleasesService extends ChangeNotifier {
);
}
+ _scanCheckedCount++;
+ final result = await _discoverOne(api, libraryId, seriesId, seriesName, gen);
+ if (_generation != gen) return;
+ if (result != null) _results.add(result);
+
+ _processedCount++;
+ notifyListeners();
+
+ // Small delay between series to be nice to Audible API
+ if (_generation == gen) {
+ await Future.delayed(const Duration(milliseconds: 300));
+ }
+ }
+
+ /// The network core for one series: fetch its books, resolve the Audible
+ /// series ASIN, discover the Audible catalog and filter to upcoming/recent
+ /// books. Updates the persisted scan state along the way. Returns null when
+ /// nothing qualifies (or on cancellation).
+ Future<UpcomingSeriesResult?> _discoverOne(
+ ApiService api, String libraryId, String seriesId, String seriesName, int gen) async {
+ final prevNewest = DateTime.tryParse(_scanState[seriesId]?.newestRelease ?? '');
+
// Fetch a small number of books for this series (for ASIN resolution
// and ownership check) instead of relying on embedded books from the
// series endpoint, which can OOM the server for huge series.
List<dynamic> books;
- if (_asinCache.containsKey(seriesId)) {
- // If we already have the ASIN cached, we still need books for
- // ownership check - but only if the ASIN resolved to something
- final cached = _asinCache[seriesId]!;
- if (cached.isEmpty) {
- // No ASIN for this series, skip
- _processedCount++;
- notifyListeners();
- return;
- }
+ final cachedAsin = _asinCache[seriesId];
+ if (cachedAsin != null) {
+ if (cachedAsin.isEmpty) return null;
books = await api.getBooksBySeries(libraryId, seriesId, limit: 500);
} else {
// Fetch a small batch for ASIN resolution first
books = await api.getBooksBySeries(libraryId, seriesId, limit: 10);
}
- if (_generation != gen) return;
+ if (_generation != gen) return null;
// Try to resolve the Audible series ASIN
String? audibleAsin;
- if (_asinCache.containsKey(seriesId)) {
- final cached = _asinCache[seriesId]!;
- audibleAsin = cached.isEmpty ? null : cached;
+ if (cachedAsin != null) {
+ audibleAsin = cachedAsin;
} else {
- audibleAsin = await _resolveSeriesAsin(books, seriesName, gen);
- if (_generation != gen) return;
+ final (resolved, concluded) = await _resolveSeriesAsin(books, seriesName, gen);
+ if (_generation != gen) return null;
+ audibleAsin = resolved;
_asinCache[seriesId] = audibleAsin ?? '';
+ final entry = _scanState.putIfAbsent(
+ seriesId, () => _SeriesScanEntry(name: seriesName));
+ entry.name = seriesName;
+ if (audibleAsin != null) {
+ entry.asin = audibleAsin;
+ } else if (concluded) {
+ // Audnexus answered but knows no series for these books. Park the
+ // series until the unresolved recheck interval elapses; a transient
+ // network failure must not park it, so lastChecked only moves here.
+ entry.asin = '';
+ entry.lastChecked = DateTime.now().millisecondsSinceEpoch;
+ _scanUnmatchedNames.add(seriesName);
+ } else {
+ _scanFailedNames.add(seriesName);
+ }
// If we resolved an ASIN, fetch more books for ownership check
if (audibleAsin != null && books.length >= 10) {
books = await api.getBooksBySeries(libraryId, seriesId, limit: 500);
- if (_generation != gen) return;
+ if (_generation != gen) return null;
+ }
+ }
+
+ if (audibleAsin == null || audibleAsin.isEmpty) return null;
+
+ // Collect owned title variants and ASINs from library books
+ final ownedTitles = <String>{};
+ final ownedAsins = <String>{};
+ for (final b in books) {
+ if (b is! Map<String, dynamic>) continue;
+ final media = b['media'] as Map<String, dynamic>? ?? {};
+ final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
+ ownedTitles.addAll(_titleVariants(metadata['title'] as String? ?? ''));
+ final asin = metadata['asin'] as String? ?? '';
+ if (asin.isNotEmpty) ownedAsins.add(asin);
+ }
+
+ // Get all books in the series from Audible
+ List<Map<String, dynamic>> allBooks;
+ var discovered = false;
+ if (_discoveryCache.containsKey(audibleAsin)) {
+ allBooks = _discoveryCache[audibleAsin]!;
+ discovered = true;
+ } else {
+ allBooks = [];
+ for (var attempt = 0; attempt < 3; attempt++) {
+ if (_generation != gen) return null;
+ try {
+ allBooks = await ApiService.discoverAudibleSeries(audibleAsin, region: _region, newestOnly: !_isDeepScan);
+ if (_generation != gen) return null;
+ _discoveryCache[audibleAsin] = allBooks;
+ discovered = true;
+ break;
+ } catch (e) {
+ debugPrint('[Upcoming] discover error for $seriesName (attempt ${attempt + 1}/3): $e');
+ if (attempt < 2) await Future.delayed(const Duration(seconds: 2));
+ }
}
+ if (!discovered) _scanFailedNames.add(seriesName);
}
- if (audibleAsin != null) {
- // Collect owned titles and ASINs from library books for ownership check
- final ownedTitles = <String>{};
- final ownedAsins = <String>{};
- for (final b in books) {
- if (b is! Map<String, dynamic>) continue;
- final media = b['media'] as Map<String, dynamic>? ?? {};
- final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
- final title = metadata['title'] as String? ?? '';
- final asin = metadata['asin'] as String? ?? '';
- if (title.isNotEmpty) ownedTitles.add(title);
- if (asin.isNotEmpty) ownedAsins.add(asin);
+ if (discovered) {
+ final entry = _scanState.putIfAbsent(
+ seriesId, () => _SeriesScanEntry(name: seriesName));
+ entry.name = seriesName;
+ entry.asin = audibleAsin;
+ final newest = _newestReleaseOf(allBooks);
+ if (newest.isNotEmpty) entry.newestRelease = newest;
+ entry.lastChecked = DateTime.now().millisecondsSinceEpoch;
+
+ // Deep scan: everything released and not owned is missing (same rule
+ // as the per-series sheet's Missing filter).
+ if (_isDeepScan) {
+ final missing = allBooks
+ .where((b) =>
+ !_ignoredAsins.contains(b['asin'] as String? ?? '') &&
+ !_isUpcoming(b) &&
+ !_isOwnedBook(b, ownedTitles, ownedAsins))
+ .map((b) => {...b, if (_isNewBook(b)) '_new': true})
+ .toList();
+ entry.missingComplete = missing.isEmpty;
+ entry.newestAtMissingCheck = entry.newestRelease;
+ _missingResults.removeWhere((r) => r.seriesId == seriesId);
+ if (missing.isNotEmpty) {
+ _missingResults.add(MissingSeriesResult(
+ seriesId: seriesId,
+ seriesName: seriesName,
+ audibleAsin: audibleAsin,
+ missingBooks: missing,
+ ));
+ }
}
+ }
- // Get all books in the series from Audible
- List<Map<String, dynamic>> allBooks;
- if (_discoveryCache.containsKey(audibleAsin)) {
- allBooks = _discoveryCache[audibleAsin]!;
- } else {
- allBooks = [];
- for (var attempt = 0; attempt < 3; attempt++) {
- if (_generation != gen) return;
- try {
- allBooks = await ApiService.discoverAudibleSeries(audibleAsin, region: _region, newestOnly: true);
- if (_generation != gen) return;
- _discoveryCache[audibleAsin] = allBooks;
- break;
- } catch (e) {
- debugPrint('[Upcoming] discover error for $seriesName (attempt ${attempt + 1}/3): $e');
- if (attempt < 2) await Future.delayed(const Duration(seconds: 2));
+ // Filter to upcoming and recently released. A book released after the
+ // previous scan's newest known release also counts as recent even when
+ // it's over 30 days old - a delayed recheck must not miss it. Books
+ // already in the library are dropped: nothing to act on.
+ final upcoming = allBooks
+ .where((b) =>
+ _isUpcoming(b) && !_ignoredAsins.contains(b['asin'] as String? ?? ''))
+ .map((b) => {...b, if (_isNewBook(b)) '_new': true})
+ .toList();
+ final recent = <Map<String, dynamic>>[];
+ for (final book in allBooks) {
+ if (_isRecentRelease(book) || _isNewSinceLastScan(book, prevNewest)) {
+ if (_ignoredAsins.contains(book['asin'] as String? ?? '')) continue;
+ if (_isOwnedBook(book, ownedTitles, ownedAsins)) continue;
+ recent.add({...book, '_owned': false, if (_isNewBook(book)) '_new': true});
+ }
+ }
+
+ if (upcoming.isEmpty && recent.isEmpty) return null;
+ return UpcomingSeriesResult(
+ seriesId: seriesId,
+ seriesName: seriesName,
+ audibleAsin: audibleAsin,
+ upcomingBooks: upcoming,
+ recentBooks: recent,
+ );
+ }
+
+ /// Build the library-wide ownership index by paging through all items.
+ /// [force] rebuilds even when a fresh index exists (used by full scans).
+ Future<void> _ensureOwnedIndex(ApiService api, String libraryId, int gen, {bool force = false}) async {
+ final fresh = _ownedIndexLibraryId == libraryId &&
+ _ownedIndexAt != null &&
+ DateTime.now().difference(_ownedIndexAt!).inMinutes < 15;
+ if (fresh && !force) return;
+ final asins = <String>{};
+ final titleAuthor = <String>{};
+ try {
+ var page = 0;
+ while (true) {
+ if (_generation != gen) return;
+ final data = await api.getLibraryItems(libraryId, page: page, limit: 500);
+ final results = data?['results'] as List<dynamic>? ?? [];
+ for (final item in results) {
+ if (item is! Map<String, dynamic>) continue;
+ final media = item['media'] as Map<String, dynamic>? ?? {};
+ final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
+ final asin = metadata['asin'] as String? ?? '';
+ if (asin.isNotEmpty) asins.add(asin);
+ // Minified items carry authorName, full items an authors array
+ var authorName = metadata['authorName'] as String? ?? '';
+ if (authorName.isEmpty) {
+ final authors = metadata['authors'] as List<dynamic>? ?? [];
+ if (authors.isNotEmpty && authors.first is Map) {
+ authorName = (authors.first as Map)['name'] as String? ?? '';
+ }
+ }
+ final author = _normalizeAuthor(authorName);
+ if (author.isNotEmpty) {
+ for (final v in _titleVariants(metadata['title'] as String? ?? '')) {
+ titleAuthor.add('$v|$author');
+ }
}
}
+ if (results.length < 500) break;
+ page++;
+ if (page > 100) break;
}
+ _libraryOwnedAsins = asins;
+ _libraryOwnedTitleAuthor = titleAuthor;
+ _ownedIndexLibraryId = libraryId;
+ _ownedIndexAt = DateTime.now();
+ debugPrint('[Upcoming] Owned index built: ${asins.length} asins, '
+ '${titleAuthor.length} title+author keys');
+ } catch (e) {
+ debugPrint('[Upcoming] owned index error: $e');
+ }
+ }
- // Filter to upcoming and recently released
- final upcoming = allBooks.where(_isUpcoming).toList();
- final recent = <Map<String, dynamic>>[];
- for (final book in allBooks) {
- if (_isRecentRelease(book)) {
- final owned = _isOwnedBook(book, ownedTitles, ownedAsins);
- recent.add({...book, '_owned': owned});
- }
+ /// Whether this scan can skip the series based on previous-scan knowledge.
+ _SkipKind _skipKindFor(String seriesId) {
+ if (seriesId.isEmpty) return _SkipKind.none;
+ if (_alwaysScan.contains(seriesId)) return _SkipKind.none;
+ if (_neverScan.contains(seriesId)) return _SkipKind.skipped;
+ final entry = _scanState[seriesId];
+ if (entry == null || entry.lastChecked <= 0) return _SkipKind.none;
+ final now = DateTime.now();
+ final checkedDays =
+ now.difference(DateTime.fromMillisecondsSinceEpoch(entry.lastChecked)).inDays;
+ if (entry.asin.isEmpty) {
+ // Couldn't be matched on Audible - retry resolution only occasionally.
+ // With the finished-series setting off, regular scans keep the old
+ // check-everything behavior; deep scans always park these.
+ if (!_isDeepScan && _finishedAfterYears <= 0) return _SkipKind.none;
+ return checkedDays < _unresolvedRecheckDays ? _SkipKind.skipped : _SkipKind.none;
+ }
+ if (_isDeepScan) {
+ // Deep scans ignore dormancy. Only a series the last deep scan found
+ // complete, with no release seen since, and nothing currently on the
+ // page (an upcoming entry must still be refreshed) can be skipped.
+ final complete = entry.missingComplete &&
+ entry.newestAtMissingCheck.isNotEmpty &&
+ entry.newestAtMissingCheck == entry.newestRelease &&
+ !_seriesWithPriorResults.contains(seriesId);
+ return complete ? _SkipKind.complete : _SkipKind.none;
+ }
+ if (_finishedAfterYears <= 0) return _SkipKind.none;
+ final newest = DateTime.tryParse(entry.newestRelease);
+ if (newest == null) return _SkipKind.none;
+ final dormantDays = now.difference(newest).inDays;
+ // A future newest release makes dormancy negative, so a series with a
+ // known upcoming book is always checked regardless of the setting.
+ if (dormantDays < _finishedAfterYears * 365) return _SkipKind.none;
+ final recheckDays = dormantDays >= _ancientDormancyYears * 365
+ ? _ancientRecheckDays
+ : _finishedRecheckDays;
+ return checkedDays < recheckDays ? _SkipKind.skipped : _SkipKind.none;
+ }
+
+ /// Newest parseable release date across discovered books, upcoming ones
+ /// included, ignoring Audible's far-future placeholder dates.
+ String _newestReleaseOf(List<Map<String, dynamic>> books) {
+ final cap = DateTime.now().year + 5;
+ String best = '';
+ DateTime? bestDate;
+ for (final b in books) {
+ final raw = b['releaseDate'] as String? ?? '';
+ final d = DateTime.tryParse(raw);
+ if (d == null || d.year > cap) continue;
+ if (bestDate == null || d.isAfter(bestDate)) {
+ bestDate = d;
+ best = raw;
}
+ }
+ return best;
+ }
+
+ /// First time this book shows up on the page (suppressed while the page
+ /// has no prior data at all, where everything would count as new).
+ bool _isNewBook(Map<String, dynamic> book) {
+ if (!_priorHadData) return false;
+ final asin = book['asin'] as String? ?? '';
+ return asin.isNotEmpty && !_priorSeenAsins.contains(asin);
+ }
+
+ /// Released after the previous scan's newest known release but not in the
+ /// future - a surprise release found by a delayed recheck.
+ bool _isNewSinceLastScan(Map<String, dynamic> book, DateTime? prevNewest) {
+ if (prevNewest == null) return false;
+ final date = DateTime.tryParse(book['releaseDate'] as String? ?? '');
+ if (date == null) return false;
+ final now = DateTime.now();
+ if (date.isAfter(now)) return false;
+ if (date.year > now.year + 5) return false;
+ return date.isAfter(prevNewest);
+ }
- if (upcoming.isNotEmpty || recent.isNotEmpty) {
- _results.add(UpcomingSeriesResult(
+ /// Manually link a series to an Audible series ASIN, for series the
+ /// resolver couldn't match (or matched wrongly). Clears the discovery
+ /// state so the next check starts fresh with the given ASIN.
+ Future<void> setSeriesAsin({
+ required String seriesId,
+ required String seriesName,
+ required String asin,
+ }) async {
+ if (seriesId.isEmpty || asin.isEmpty) return;
+ await _loadScanState();
+ final entry = _scanState.putIfAbsent(
+ seriesId, () => _SeriesScanEntry(name: seriesName));
+ entry.name = seriesName;
+ entry.asin = asin;
+ entry.newestRelease = '';
+ entry.lastChecked = 0;
+ entry.missingComplete = false;
+ entry.newestAtMissingCheck = '';
+ _asinCache[seriesId] = asin;
+ for (var i = 0; i < _persistedSkipped.length; i++) {
+ if (_persistedSkipped[i].seriesId == seriesId) {
+ _persistedSkipped[i] = SkippedSeries(
seriesId: seriesId,
seriesName: seriesName,
- audibleAsin: audibleAsin,
- upcomingBooks: upcoming,
- recentBooks: recent,
- ));
+ audibleAsin: asin,
+ newestRelease: '',
+ );
}
}
-
- _processedCount++;
+ await _saveScanState();
notifyListeners();
+ }
- // Small delay between series to be nice to Audible API
- if (_generation == gen) {
- await Future.delayed(const Duration(milliseconds: 300));
+ /// Rescan one series outside a full scan (from the skipped-series list).
+ /// Replaces the series' entry in the results and refreshes its scan state.
+ Future<SingleScanOutcome> scanSingleSeries({
+ required ApiService api,
+ required String libraryId,
+ required String seriesId,
+ required String seriesName,
+ }) async {
+ if (_isRunning) return SingleScanOutcome.failed;
+ _generation++;
+ final gen = _generation;
+ _isDeepScan = false;
+ await _loadScanState();
+ await _loadIgnored();
+ await _ensureOwnedIndex(api, libraryId, gen);
+ _discoveryCache.clear();
+ // Give unresolvable series another resolution attempt
+ if (_asinCache[seriesId] == '') _asinCache.remove(seriesId);
+ // NEW badges relative to what this series already shows
+ _priorSeenAsins = {
+ for (final r in _results.where((r) => r.seriesId == seriesId)) ...[
+ ...r.upcomingBooks.map((b) => b['asin'] as String? ?? ''),
+ ...r.recentBooks.map((b) => b['asin'] as String? ?? ''),
+ ],
+ for (final r in _missingResults.where((r) => r.seriesId == seriesId))
+ ...r.missingBooks.map((b) => b['asin'] as String? ?? ''),
+ }..remove('');
+ _priorHadData = _priorSeenAsins.isNotEmpty;
+ try {
+ final result = await _discoverOne(api, libraryId, seriesId, seriesName, gen);
+ if (_generation != gen) return SingleScanOutcome.failed;
+ _results.removeWhere((r) => r.seriesId == seriesId);
+ if (result != null) _results.add(result);
+ _persistedSkipped.removeWhere((s) => s.seriesId == seriesId);
+ if (!_isRunning) _isComplete = true;
+ notifyListeners();
+ await _saveCache();
+ await _saveScanState();
+ return result != null ? SingleScanOutcome.found : SingleScanOutcome.none;
+ } catch (e) {
+ debugPrint('[Upcoming] scanSingleSeries error: $e');
+ return SingleScanOutcome.failed;
}
}
@@ -413,9 +1189,8 @@ class UpcomingReleasesService extends ChangeNotifier {
final libraryItem = (b as Map<String, dynamic>)['libraryItem'] as Map<String, dynamic>? ?? {};
final media = libraryItem['media'] as Map<String, dynamic>? ?? {};
final metadata = media['metadata'] as Map<String, dynamic>? ?? {};
- final t = metadata['title'] as String? ?? '';
+ ownedTitles.addAll(_titleVariants(metadata['title'] as String? ?? ''));
final a = metadata['asin'] as String? ?? '';
- if (t.isNotEmpty) ownedTitles.add(t);
if (a.isNotEmpty) ownedAsins.add(a);
}
ownedInLibrary = _isOwnedBook(updated, ownedTitles, ownedAsins);
@@ -433,27 +1208,47 @@ class UpcomingReleasesService extends ChangeNotifier {
if (_isUpcoming(updated)) {
result.upcomingBooks[i] = updated;
} else {
- // Release date has passed - move to recent so it stays
- // visible as either Added (in library) or Missing.
+ // Release date has passed. If it's already in the library
+ // there's nothing to act on, so it just leaves the page;
+ // otherwise it stays visible as Missing.
result.upcomingBooks.removeAt(i);
- updated['_owned'] = ownedInLibrary;
- result.recentBooks.add(updated);
+ if (!ownedInLibrary) {
+ updated['_owned'] = false;
+ result.recentBooks.add(updated);
+ }
}
break;
}
}
for (var i = 0; i < result.recentBooks.length; i++) {
if (result.recentBooks[i]['asin'] == asin) {
- updated['sequence'] = result.recentBooks[i]['sequence'] ?? '';
- updated['sort'] = result.recentBooks[i]['sort'] ?? '0';
- updated['allAsins'] = result.recentBooks[i]['allAsins'] ?? <String>[asin];
- updated['_owned'] = ownedInLibrary || (result.recentBooks[i]['_owned'] ?? false);
- result.recentBooks[i] = updated;
+ if (ownedInLibrary) {
+ result.recentBooks.removeAt(i);
+ } else {
+ updated['sequence'] = result.recentBooks[i]['sequence'] ?? '';
+ updated['sort'] = result.recentBooks[i]['sort'] ?? '0';
+ updated['allAsins'] = result.recentBooks[i]['allAsins'] ?? <String>[asin];
+ updated['_owned'] = false;
+ result.recentBooks[i] = updated;
+ }
break;
}
}
}
+ // A rescanned book that turned out to be in the library also clears
+ // out of the deep-scan missing list.
+ if (ownedInLibrary) {
+ var missingChanged = false;
+ for (final result in _missingResults) {
+ final before = result.missingBooks.length;
+ result.missingBooks.removeWhere((b) => b['asin'] == asin);
+ if (result.missingBooks.length != before) missingChanged = true;
+ }
+ _missingResults.removeWhere((r) => r.missingBooks.isEmpty);
+ if (missingChanged) await _saveMissingCache();
+ }
+
// Remove empty series results
_results.removeWhere((r) => r.upcomingBooks.isEmpty && r.recentBooks.isEmpty);
notifyListeners();
@@ -466,18 +1261,118 @@ class UpcomingReleasesService extends ChangeNotifier {
}
/// Remove a book from the current results, whether it's upcoming, recent,
- /// owned or missing. This only edits the cached list - a fresh full rescan
- /// re-discovers the book, so it's a manual declutter rather than a permanent
- /// block.
- Future<void> removeBook(String asin) async {
+ /// owned or missing. Without [forever] this only edits the cached lists -
+ /// a fresh scan re-discovers the book. With [forever] the book also goes
+ /// on the ignore list, so scans skip it until it is restored.
+ Future<void> removeBook(String asin, {bool forever = false}) async {
if (asin.isEmpty) return;
+
+ // Capture the book with its series context before removal so a
+ // forever-removal can be restored later.
+ IgnoredBook? captured;
for (final result in _results) {
+ for (final b in result.upcomingBooks) {
+ if (b['asin'] == asin) {
+ captured = IgnoredBook(
+ book: Map<String, dynamic>.from(b),
+ seriesId: result.seriesId,
+ seriesName: result.seriesName,
+ audibleAsin: result.audibleAsin,
+ from: 'upcoming',
+ removedAtMs: DateTime.now().millisecondsSinceEpoch,
+ );
+ }
+ }
+ for (final b in result.recentBooks) {
+ if (b['asin'] == asin) {
+ captured ??= IgnoredBook(
+ book: Map<String, dynamic>.from(b),
+ seriesId: result.seriesId,
+ seriesName: result.seriesName,
+ audibleAsin: result.audibleAsin,
+ from: 'recent',
+ removedAtMs: DateTime.now().millisecondsSinceEpoch,
+ );
+ }
+ }
result.upcomingBooks.removeWhere((b) => b['asin'] == asin);
result.recentBooks.removeWhere((b) => b['asin'] == asin);
}
_results.removeWhere((r) => r.upcomingBooks.isEmpty && r.recentBooks.isEmpty);
+ var missingChanged = false;
+ for (final result in _missingResults) {
+ for (final b in result.missingBooks) {
+ if (b['asin'] == asin) {
+ captured ??= IgnoredBook(
+ book: Map<String, dynamic>.from(b),
+ seriesId: result.seriesId,
+ seriesName: result.seriesName,
+ audibleAsin: result.audibleAsin,
+ from: 'missing',
+ removedAtMs: DateTime.now().millisecondsSinceEpoch,
+ );
+ }
+ }
+ final before = result.missingBooks.length;
+ result.missingBooks.removeWhere((b) => b['asin'] == asin);
+ if (result.missingBooks.length != before) missingChanged = true;
+ }
+ _missingResults.removeWhere((r) => r.missingBooks.isEmpty);
+
+ if (forever && captured != null && !_ignoredAsins.contains(asin)) {
+ await _loadIgnored();
+ _ignoredBooks.add(captured);
+ _ignoredAsins.add(asin);
+ await _saveIgnored();
+ }
+
notifyListeners();
await _saveCache();
+ if (missingChanged) await _saveMissingCache();
+ }
+
+ /// Take a book off the ignore list. Returns true when it could be put
+ /// straight back on the page; false means it will reappear on a future
+ /// scan instead (e.g. a removed upcoming book that has since released).
+ Future<bool> restoreBook(String asin) async {
+ await _loadIgnored();
+ final idx = _ignoredBooks.indexWhere((b) => b.asin == asin);
+ if (idx < 0) return false;
+ final entry = _ignoredBooks.removeAt(idx);
+ _ignoredAsins.remove(asin);
+ await _saveIgnored();
+
+ var visible = false;
+ if (entry.from == 'missing') {
+ MissingSeriesResult? bucket;
+ for (final r in _missingResults) {
+ if (r.seriesId == entry.seriesId || r.seriesName == entry.seriesName) {
+ bucket = r;
+ break;
+ }
+ }
+ if (bucket == null) {
+ bucket = MissingSeriesResult(
+ seriesId: entry.seriesId,
+ seriesName: entry.seriesName,
+ audibleAsin: entry.audibleAsin,
+ missingBooks: [],
+ );
+ _missingResults.add(bucket);
+ }
+ bucket.missingBooks.add(Map<String, dynamic>.from(entry.book));
+ await _saveMissingCache();
+ visible = true;
+ } else {
+ visible = await addBook(
+ entry.book,
+ seriesName: entry.seriesName,
+ audibleAsin: entry.audibleAsin,
+ region: _region,
+ );
+ }
+ notifyListeners();
+ return visible;
}
/// Manually add a single discovered Audible book to the upcoming page,
@@ -497,6 +1392,13 @@ class UpcomingReleasesService extends ChangeNotifier {
final asin = book['asin'] as String? ?? '';
if (asin.isEmpty) return false;
+ // An explicit add overrides an earlier forever-removal
+ await _loadIgnored();
+ if (_ignoredAsins.remove(asin)) {
+ _ignoredBooks.removeWhere((b) => b.asin == asin);
+ await _saveIgnored();
+ }
+
final upcoming = _isUpcoming(book);
final recent = !upcoming && _isRecentRelease(book);
if (!upcoming && !recent) return false;
@@ -543,6 +1445,22 @@ class UpcomingReleasesService extends ChangeNotifier {
target.recentBooks.add({...book, '_owned': owned});
}
+ // A manually added upcoming book means the series is active again - raise
+ // the remembered newest release so full scans stop skipping it.
+ if (upcoming && audibleAsin.isNotEmpty) {
+ await _loadScanState();
+ for (final entry in _scanState.values) {
+ if (entry.asin != audibleAsin) continue;
+ final added = DateTime.tryParse(book['releaseDate'] as String? ?? '');
+ final current = DateTime.tryParse(entry.newestRelease);
+ if (added != null && (current == null || added.isAfter(current))) {
+ entry.newestRelease = book['releaseDate'] as String? ?? '';
+ await _saveScanState();
+ }
+ break;
+ }
+ }
+
if (!_isRunning) _isComplete = true;
notifyListeners();
await _saveCache();
@@ -553,10 +1471,15 @@ class UpcomingReleasesService extends ChangeNotifier {
/// Only checks up to [_maxAsinAttempts] books to avoid excessive API calls on huge series.
static const _maxAsinAttempts = 5;
- Future<String?> _resolveSeriesAsin(List<dynamic> books, String seriesName, int gen) async {
+ /// The bool says whether the resolution genuinely concluded: true when
+ /// Audnexus answered (even with no series info) or there was nothing to
+ /// try, false when every attempt died on a network error - only a
+ /// concluded "no match" may be remembered as unresolvable.
+ Future<(String?, bool)> _resolveSeriesAsin(List<dynamic> books, String seriesName, int gen) async {
int audnexusAttempts = 0;
+ var concluded = true;
for (final book in books) {
- if (_generation != gen) return null;
+ if (_generation != gen) return (null, false);
if (book is! Map<String, dynamic>) continue;
final media = book['media'] as Map<String, dynamic>? ?? {};
@@ -566,20 +1489,22 @@ class UpcomingReleasesService extends ChangeNotifier {
if (audnexusAttempts >= _maxAsinAttempts) break;
audnexusAttempts++;
+ var answered = false;
for (var attempt = 0; attempt < 3; attempt++) {
- if (_generation != gen) return null;
+ if (_generation != gen) return (null, false);
try {
final audnexus = await ApiService.getAudnexusBook(bookAsin, region: _region);
- if (_generation != gen) return null;
+ if (_generation != gen) return (null, false);
+ answered = true;
if (audnexus == null) break; // not on Audnexus, no point retrying
final primary = audnexus['seriesPrimary'] as Map<String, dynamic>?;
if (primary != null && primary['asin'] != null) {
- return primary['asin'] as String;
+ return (primary['asin'] as String, true);
}
final secondary = audnexus['seriesSecondary'] as Map<String, dynamic>?;
if (secondary != null && secondary['asin'] != null) {
- return secondary['asin'] as String;
+ return (secondary['asin'] as String, true);
}
break; // valid response but no series info, no point retrying
} catch (e) {
@@ -588,8 +1513,9 @@ class UpcomingReleasesService extends ChangeNotifier {
}
}
}
+ if (!answered) concluded = false;
}
- return null;
+ return (null, concluded);
}
bool _isUpcoming(Map<String, dynamic> book) {
@@ -626,18 +1552,54 @@ class UpcomingReleasesService extends ChangeNotifier {
.trim();
}
+ /// First author only - both sides join multiple authors with ', '.
+ String _normalizeAuthor(String authors) => _normalizeTitle(authors.split(',').first);
+
+ /// Normalized matching variants for a library title: the full title plus
+ /// the part before a colon. Libraries often bake the subtitle into the
+ /// title ("Not Till We Are Lost: Bobiverse, Book 5") while Audible keeps
+ /// title and subtitle separate.
+ List<String> _titleVariants(String title) {
+ final variants = <String>[];
+ final full = _normalizeTitle(title);
+ if (full.isNotEmpty) variants.add(full);
+ final colon = title.indexOf(':');
+ if (colon > 0) {
+ final head = _normalizeTitle(title.substring(0, colon));
+ if (head.isNotEmpty && head != full) variants.add(head);
+ }
+ return variants;
+ }
+
/// Check if a discovered Audible book is owned in the library.
+ /// [ownedTitles] holds NORMALIZED title variants (see [_titleVariants])
+ /// from the series' own books; the library-wide index catches books owned
+ /// outside that series bucket. Besides the plain title, the title+subtitle
+ /// concatenation is tried, in case the library baked the subtitle in.
bool _isOwnedBook(Map<String, dynamic> book, Set<String> ownedTitles, Set<String> ownedAsins) {
final asin = book['asin'] as String? ?? '';
- if (ownedAsins.contains(asin)) return true;
+ if (asin.isNotEmpty &&
+ (ownedAsins.contains(asin) || _libraryOwnedAsins.contains(asin))) {
+ return true;
+ }
final allAsins = book['allAsins'] as List<dynamic>? ?? [];
for (final a in allAsins) {
- if (ownedAsins.contains(a)) return true;
+ if (ownedAsins.contains(a) || _libraryOwnedAsins.contains(a)) return true;
}
final title = _normalizeTitle(book['title'] as String? ?? '');
if (title.isEmpty) return false;
- for (final owned in ownedTitles) {
- if (_normalizeTitle(owned) == title) return true;
+ final subtitle = book['subtitle'] as String? ?? '';
+ final withSub =
+ subtitle.isEmpty ? '' : _normalizeTitle('${book['title']} $subtitle');
+ if (ownedTitles.contains(title)) return true;
+ if (withSub.isNotEmpty && ownedTitles.contains(withSub)) return true;
+ final author = _normalizeAuthor(book['authors'] as String? ?? '');
+ if (author.isNotEmpty) {
+ if (_libraryOwnedTitleAuthor.contains('$title|$author')) return true;
+ if (withSub.isNotEmpty &&
+ _libraryOwnedTitleAuthor.contains('$withSub|$author')) {
+ return true;
+ }
}
return false;
}
@@ -651,8 +1613,13 @@ class UpcomingReleasesService extends ChangeNotifier {
notifyListeners();
}
- /// Set region (for cache loading before scan).
- void setRegion(String region) => _region = region;
+ /// Set region (for cache loading before scan). A region change throws away
+ /// the remembered scan knowledge - ASINs and dates are region-specific.
+ void setRegion(String region) {
+ if (region == _region) return;
+ _region = region;
+ _resetScanKnowledge();
+ }
// ─── Foreground Service / Notifications ──────────────────────
diff --git a/lib/widgets/audible_series_sheet.dart b/lib/widgets/audible_series_sheet.dart
index c0d7b48d..e78f906b 100644
--- a/lib/widgets/audible_series_sheet.dart
+++ b/lib/widgets/audible_series_sheet.dart
@@ -139,8 +139,19 @@ class _AudibleSeriesSheetState extends State<AudibleSeriesSheet> {
}
final title = _normalizeTitle(book['title'] as String? ?? '');
if (title.isEmpty) return false;
+ // Libraries often bake the subtitle into the title with a colon while
+ // Audible keeps them separate - match both shapes in both directions.
+ final subtitle = book['subtitle'] as String? ?? '';
+ final withSub =
+ subtitle.isEmpty ? '' : _normalizeTitle('${book['title']} $subtitle');
for (final owned in widget.ownedTitles) {
- if (_normalizeTitle(owned) == title) return true;
+ final full = _normalizeTitle(owned);
+ if (full == title) return true;
+ if (withSub.isNotEmpty && full == withSub) return true;
+ final colon = owned.indexOf(':');
+ if (colon > 0 && _normalizeTitle(owned.substring(0, colon)) == title) {
+ return true;
+ }
}
return false;
}
@@ -608,6 +619,10 @@ void showAudibleBookMenu(BuildContext context, {
final title = book['title'] as String? ?? '';
final asin = book['asin'] as String? ?? '';
final releaseDate = book['releaseDate'] as String? ?? '';
+ // Calendar entries only make sense for books that haven't released yet
+ final releaseDateTime = DateTime.tryParse(releaseDate);
+ final isFutureRelease =
+ releaseDateTime != null && releaseDateTime.isAfter(DateTime.now());
showModalBottomSheet(
context: context,
@@ -641,7 +656,7 @@ void showAudibleBookMenu(BuildContext context, {
_openOnAudible(context, asin, region);
},
),
- if (releaseDate.isNotEmpty)
+ if (isFutureRelease)
ListTile(
leading: Icon(Icons.calendar_month_rounded, color: cs.primary, size: 22),
title: Text(l.audibleSeriesAddToCalendar, style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
diff --git a/lib/widgets/library_sort_filter_sheet.dart b/lib/widgets/library_sort_filter_sheet.dart
index 96b81414..8a29e83b 100644
--- a/lib/widgets/library_sort_filter_sheet.dart
+++ b/lib/widgets/library_sort_filter_sheet.dart
@@ -291,7 +291,7 @@ class _SortFilterSheetState extends State<SortFilterSheet> with SingleTickerProv
border: Border.all(color: cs.primary.withValues(alpha: 0.15)),
),
child: Row(children: [
- Icon(Icons.calendar_month_rounded, size: 20, color: cs.primary),
+ Icon(Icons.travel_explore_rounded, size: 20, color: cs.primary),
const SizedBox(width: 12),
Expanded(
child: Column(
diff --git a/pubspec.yaml b/pubspec.yaml
index 993eb801..50c1dc55 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
name: absorb
description: An Audiobookshelf Client
publish_to: 'none'
-version: 1.9.3+234
+version: 1.9.3+236
environment:
sdk: '>=3.10.0 <4.0.0'