A cross platform Audiobookshelf client for Android and iOS
Dart
Fix startup hang, continue-listening order, and AA speed icons
Nathan Poulsondeb249036e53
diff --git a/android/app/src/main/res/drawable/ic_speed_075.xml b/android/app/src/main/res/drawable/ic_speed_075.xmlindex c6379c46..e02b387a 100644--- a/android/app/src/main/res/drawable/ic_speed_075.xml+++ b/android/app/src/main/res/drawable/ic_speed_075.xml@@ -4,14 +4,26 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "0.75x" in 7-segment style (compact) — scaled 1.4x -->+ <!-- "0.75x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M5.8,8.75 h2.2 v0.75 h-2.2 Z M7.65,9.15 h0.75 v2.65 h-0.75 Z M7.65,12.2 h0.75 v2.65 h-0.75 Z M5.8,14.5 h2.2 v0.75 h-2.2 Z M5.4,12.2 h0.75 v2.65 h-0.75 Z M5.4,9.15 h0.75 v2.65 h-0.75 Z M8.7,14.5 h0.75 v0.75 h-0.75 Z M10.0,8.75 h2.2 v0.75 h-2.2 Z M11.85,9.15 h0.75 v2.65 h-0.75 Z M11.85,12.2 h0.75 v2.65 h-0.75 Z M13.3,8.75 h2.2 v0.75 h-2.2 Z M15.15,12.2 h0.75 v2.65 h-0.75 Z M13.3,14.5 h2.2 v0.75 h-2.2 Z M12.9,9.15 h0.75 v2.65 h-0.75 Z M13.3,11.625 h2.2 v0.75 h-2.2 Z M16.5,10.3 L16.8,10.0 L18.9,13.7 L18.6,14.0 Z M18.6,10.0 L18.9,10.3 L16.8,14.0 L16.5,13.7 Z"/>+ <!-- 0 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M6.6,9.2 C6.6,8.7 7.0,8.5 7.4,8.5 C7.8,8.5 8.2,8.7 8.2,9.2 L8.2,14.8 C8.2,15.3 7.8,15.5 7.4,15.5 C7.0,15.5 6.6,15.3 6.6,14.8 Z M7.3,9.2 L7.3,14.8 C7.3,14.9 7.35,15.0 7.4,15.0 C7.45,15.0 7.5,14.9 7.5,14.8 L7.5,9.2 C7.5,9.1 7.45,9.0 7.4,9.0 C7.35,9.0 7.3,9.1 7.3,9.2 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M8.8,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 7 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M10.2,8.7 L12.4,8.7 L12.4,9.4 L11.4,15.3 L10.7,15.3 L11.7,9.4 L10.2,9.4 Z"/>+ <!-- 5 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M13.0,8.7 L15.2,8.7 L15.2,9.4 L13.7,9.4 L13.7,11.6 L14.6,11.6 C15.0,11.6 15.3,12.0 15.3,12.4 L15.3,14.8 C15.3,15.2 15.0,15.5 14.6,15.5 L13.0,15.5 L13.0,14.8 L14.5,14.8 C14.55,14.8 14.6,14.75 14.6,14.7 L14.6,12.5 C14.6,12.4 14.55,12.3 14.5,12.3 L13.0,12.3 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M16.4,10.5 L17.3,9.3 L18.0,9.3 L16.8,11.0 L18.1,12.8 L17.4,12.8 L16.4,11.5 L15.5,12.8 L14.8,12.8 L16.1,11.0 L14.8,9.3 L15.5,9.3 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_100.xml b/android/app/src/main/res/drawable/ic_speed_100.xmlindex 2824111d..e99eac36 100644--- a/android/app/src/main/res/drawable/ic_speed_100.xml+++ b/android/app/src/main/res/drawable/ic_speed_100.xml@@ -4,14 +4,23 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "1.0x" in 7-segment style — scaled 1.4x -->+ <!-- "1.0x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M8.03,8.95 h0.75 v6.1 h-0.75 Z M10.3,14.5 h0.75 v0.75 h-0.75 Z M11.7,8.75 h2.2 v0.75 h-2.2 Z M13.55,9.15 h0.75 v2.65 h-0.75 Z M13.55,12.2 h0.75 v2.65 h-0.75 Z M11.7,14.5 h2.2 v0.75 h-2.2 Z M11.3,12.2 h0.75 v2.65 h-0.75 Z M11.3,9.15 h0.75 v2.65 h-0.75 Z M14.7,10.3 L15.0,10.0 L17.1,13.7 L16.8,14.0 Z M16.8,10.0 L17.1,10.3 L15.0,14.0 L14.7,13.7 Z"/>+ <!-- 1 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,9.4 L8.0,8.7 L9.0,8.7 L9.0,9.4 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M10.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 0 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M11.6,9.2 C11.6,8.7 12.0,8.5 12.4,8.5 C12.8,8.5 13.2,8.7 13.2,9.2 L13.2,14.8 C13.2,15.3 12.8,15.5 12.4,15.5 C12.0,15.5 11.6,15.3 11.6,14.8 Z M12.3,9.2 L12.3,14.8 C12.3,14.9 12.35,15.0 12.4,15.0 C12.45,15.0 12.5,14.9 12.5,14.8 L12.5,9.2 C12.5,9.1 12.45,9.0 12.4,9.0 C12.35,9.0 12.3,9.1 12.3,9.2 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M14.8,11.0 L13.5,9.3 L14.2,9.3 L15.2,10.5 L16.2,9.3 L16.9,9.3 L15.6,11.0 L16.9,12.8 L16.2,12.8 L15.2,11.5 L14.2,12.8 L13.5,12.8 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_125.xml b/android/app/src/main/res/drawable/ic_speed_125.xmlindex 21e62c8d..9afc67c2 100644--- a/android/app/src/main/res/drawable/ic_speed_125.xml+++ b/android/app/src/main/res/drawable/ic_speed_125.xml@@ -4,14 +4,26 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "1.25x" in 7-segment style (compact) — scaled 1.4x -->+ <!-- "1.25x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M6.53,8.95 h0.75 v6.1 h-0.75 Z M8.7,14.5 h0.75 v0.75 h-0.75 Z M10.0,8.75 h2.2 v0.75 h-2.2 Z M11.85,9.15 h0.75 v2.65 h-0.75 Z M10.0,14.5 h2.2 v0.75 h-2.2 Z M9.6,12.2 h0.75 v2.65 h-0.75 Z M10.0,11.625 h2.2 v0.75 h-2.2 Z M13.3,8.75 h2.2 v0.75 h-2.2 Z M15.15,12.2 h0.75 v2.65 h-0.75 Z M13.3,14.5 h2.2 v0.75 h-2.2 Z M12.9,9.15 h0.75 v2.65 h-0.75 Z M13.3,11.625 h2.2 v0.75 h-2.2 Z M16.5,10.3 L16.8,10.0 L18.9,13.7 L18.6,14.0 Z M18.6,10.0 L18.9,10.3 L16.8,14.0 L16.5,13.7 Z"/>+ <!-- 1 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,9.4 L6.0,8.7 L7.0,8.7 L7.0,9.4 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M8.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 2 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M9.6,9.2 C9.6,8.7 10.0,8.5 10.4,8.5 L11.2,8.5 C11.6,8.5 11.8,8.7 11.8,9.2 L11.8,11.5 C11.8,11.9 11.5,12.2 11.1,12.2 L10.3,12.2 L10.3,14.6 L11.8,14.6 L11.8,15.3 L9.6,15.3 L9.6,11.8 C9.6,11.5 9.8,11.5 10.1,11.5 L11.1,11.5 L11.1,9.2 L10.3,9.2 Z"/>+ <!-- 5 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.6 L14.0,11.6 C14.4,11.6 14.7,12.0 14.7,12.4 L14.7,14.8 C14.7,15.2 14.4,15.5 14.0,15.5 L12.4,15.5 L12.4,14.8 L13.9,14.8 C13.95,14.8 14.0,14.75 14.0,14.7 L14.0,12.5 C14.0,12.4 13.95,12.3 13.9,12.3 L12.4,12.3 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M16.0,10.5 L16.9,9.3 L17.6,9.3 L16.4,11.0 L17.7,12.8 L17.0,12.8 L16.0,11.5 L15.1,12.8 L14.4,12.8 L15.7,11.0 L14.4,9.3 L15.1,9.3 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_150.xml b/android/app/src/main/res/drawable/ic_speed_150.xmlindex c91e927e..1a561bb9 100644--- a/android/app/src/main/res/drawable/ic_speed_150.xml+++ b/android/app/src/main/res/drawable/ic_speed_150.xml@@ -4,14 +4,23 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "1.5x" in 7-segment style — scaled 1.4x -->+ <!-- "1.5x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M8.03,8.95 h0.75 v6.1 h-0.75 Z M10.3,14.5 h0.75 v0.75 h-0.75 Z M11.7,8.75 h2.2 v0.75 h-2.2 Z M13.55,12.2 h0.75 v2.65 h-0.75 Z M11.7,14.5 h2.2 v0.75 h-2.2 Z M11.3,9.15 h0.75 v2.65 h-0.75 Z M11.7,11.625 h2.2 v0.75 h-2.2 Z M14.7,10.3 L15.0,10.0 L17.1,13.7 L16.8,14.0 Z M16.8,10.0 L17.1,10.3 L15.0,14.0 L14.7,13.7 Z"/>+ <!-- 1 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M8.8,8.7 L9.5,8.7 L9.5,15.3 L8.8,15.3 Z M8.0,9.4 L8.0,8.7 L9.0,8.7 L9.0,9.4 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M10.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 5 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M11.6,8.7 L13.8,8.7 L13.8,9.4 L12.3,9.4 L12.3,11.6 L13.2,11.6 C13.6,11.6 13.9,12.0 13.9,12.4 L13.9,14.8 C13.9,15.2 13.6,15.5 13.2,15.5 L11.6,15.5 L11.6,14.8 L13.1,14.8 C13.15,14.8 13.2,14.75 13.2,14.7 L13.2,12.5 C13.2,12.4 13.15,12.3 13.1,12.3 L11.6,12.3 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M15.5,11.0 L14.2,9.3 L14.9,9.3 L15.9,10.5 L16.9,9.3 L17.6,9.3 L16.3,11.0 L17.6,12.8 L16.9,12.8 L15.9,11.5 L14.9,12.8 L14.2,12.8 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_175.xml b/android/app/src/main/res/drawable/ic_speed_175.xmlindex d8a962e3..0bb671ab 100644--- a/android/app/src/main/res/drawable/ic_speed_175.xml+++ b/android/app/src/main/res/drawable/ic_speed_175.xml@@ -4,14 +4,26 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "1.75x" in 7-segment style (compact) — scaled 1.4x -->+ <!-- "1.75x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M6.53,8.95 h0.75 v6.1 h-0.75 Z M8.7,14.5 h0.75 v0.75 h-0.75 Z M10.0,8.75 h2.2 v0.75 h-2.2 Z M11.85,9.15 h0.75 v2.65 h-0.75 Z M11.85,12.2 h0.75 v2.65 h-0.75 Z M13.3,8.75 h2.2 v0.75 h-2.2 Z M15.15,12.2 h0.75 v2.65 h-0.75 Z M13.3,14.5 h2.2 v0.75 h-2.2 Z M12.9,9.15 h0.75 v2.65 h-0.75 Z M13.3,11.625 h2.2 v0.75 h-2.2 Z M16.5,10.3 L16.8,10.0 L18.9,13.7 L18.6,14.0 Z M18.6,10.0 L18.9,10.3 L16.8,14.0 L16.5,13.7 Z"/>+ <!-- 1 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M6.8,8.7 L7.5,8.7 L7.5,15.3 L6.8,15.3 Z M6.0,9.4 L6.0,8.7 L7.0,8.7 L7.0,9.4 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M8.2,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 7 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M9.6,8.7 L11.8,8.7 L11.8,9.4 L10.8,15.3 L10.1,15.3 L11.1,9.4 L9.6,9.4 Z"/>+ <!-- 5 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M12.4,8.7 L14.6,8.7 L14.6,9.4 L13.1,9.4 L13.1,11.6 L14.0,11.6 C14.4,11.6 14.7,12.0 14.7,12.4 L14.7,14.8 C14.7,15.2 14.4,15.5 14.0,15.5 L12.4,15.5 L12.4,14.8 L13.9,14.8 C13.95,14.8 14.0,14.75 14.0,14.7 L14.0,12.5 C14.0,12.4 13.95,12.3 13.9,12.3 L12.4,12.3 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M16.0,10.5 L16.9,9.3 L17.6,9.3 L16.4,11.0 L17.7,12.8 L17.0,12.8 L16.0,11.5 L15.1,12.8 L14.4,12.8 L15.7,11.0 L14.4,9.3 L15.1,9.3 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_200.xml b/android/app/src/main/res/drawable/ic_speed_200.xmlindex f6a7351f..2b95a049 100644--- a/android/app/src/main/res/drawable/ic_speed_200.xml+++ b/android/app/src/main/res/drawable/ic_speed_200.xml@@ -4,14 +4,23 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "2.0x" in 7-segment style — scaled 1.4x -->+ <!-- "2.0x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M7.3,8.75 h2.2 v0.75 h-2.2 Z M9.15,9.15 h0.75 v2.65 h-0.75 Z M7.3,14.5 h2.2 v0.75 h-2.2 Z M6.9,12.2 h0.75 v2.65 h-0.75 Z M7.3,11.625 h2.2 v0.75 h-2.2 Z M10.3,14.5 h0.75 v0.75 h-0.75 Z M11.7,8.75 h2.2 v0.75 h-2.2 Z M13.55,9.15 h0.75 v2.65 h-0.75 Z M13.55,12.2 h0.75 v2.65 h-0.75 Z M11.7,14.5 h2.2 v0.75 h-2.2 Z M11.3,12.2 h0.75 v2.65 h-0.75 Z M11.3,9.15 h0.75 v2.65 h-0.75 Z M14.7,10.3 L15.0,10.0 L17.1,13.7 L16.8,14.0 Z M16.8,10.0 L17.1,10.3 L15.0,14.0 L14.7,13.7 Z"/>+ <!-- 2 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M7.6,9.2 C7.6,8.7 8.0,8.5 8.4,8.5 L9.2,8.5 C9.6,8.5 9.8,8.7 9.8,9.2 L9.8,11.5 C9.8,11.9 9.5,12.2 9.1,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.8 C7.6,11.5 7.8,11.5 8.1,11.5 L9.1,11.5 L9.1,9.2 L8.3,9.2 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M10.4,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 0 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M11.8,9.2 C11.8,8.7 12.2,8.5 12.6,8.5 C13.0,8.5 13.4,8.7 13.4,9.2 L13.4,14.8 C13.4,15.3 13.0,15.5 12.6,15.5 C12.2,15.5 11.8,15.3 11.8,14.8 Z M12.5,9.2 L12.5,14.8 C12.5,14.9 12.55,15.0 12.6,15.0 C12.65,15.0 12.7,14.9 12.7,14.8 L12.7,9.2 C12.7,9.1 12.65,9.0 12.6,9.0 C12.55,9.0 12.5,9.1 12.5,9.2 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M15.0,11.0 L13.7,9.3 L14.4,9.3 L15.4,10.5 L16.4,9.3 L17.1,9.3 L15.8,11.0 L17.1,12.8 L16.4,12.8 L15.4,11.5 L14.4,12.8 L13.7,12.8 Z"/></group></vector>diff --git a/android/app/src/main/res/drawable/ic_speed_250.xml b/android/app/src/main/res/drawable/ic_speed_250.xmlindex 2e2742e5..31a3fd06 100644--- a/android/app/src/main/res/drawable/ic_speed_250.xml+++ b/android/app/src/main/res/drawable/ic_speed_250.xml@@ -4,14 +4,23 @@android:viewportWidth="24"android:viewportHeight="24"android:tint="?attr/colorControlNormal">- <!-- "2.5x" in 7-segment style — scaled 1.4x -->+ <!-- "2.5x" rounded sans-serif --><groupandroid:scaleX="1.4"android:scaleY="1.4"android:pivotX="12"android:pivotY="12">- <path- android:fillColor="@android:color/white"- android:pathData="M7.3,8.75 h2.2 v0.75 h-2.2 Z M9.15,9.15 h0.75 v2.65 h-0.75 Z M7.3,14.5 h2.2 v0.75 h-2.2 Z M6.9,12.2 h0.75 v2.65 h-0.75 Z M7.3,11.625 h2.2 v0.75 h-2.2 Z M10.3,14.5 h0.75 v0.75 h-0.75 Z M11.7,8.75 h2.2 v0.75 h-2.2 Z M13.55,12.2 h0.75 v2.65 h-0.75 Z M11.7,14.5 h2.2 v0.75 h-2.2 Z M11.3,9.15 h0.75 v2.65 h-0.75 Z M11.7,11.625 h2.2 v0.75 h-2.2 Z M14.7,10.3 L15.0,10.0 L17.1,13.7 L16.8,14.0 Z M16.8,10.0 L17.1,10.3 L15.0,14.0 L14.7,13.7 Z"/>+ <!-- 2 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M7.6,9.2 C7.6,8.7 8.0,8.5 8.4,8.5 L9.2,8.5 C9.6,8.5 9.8,8.7 9.8,9.2 L9.8,11.5 C9.8,11.9 9.5,12.2 9.1,12.2 L8.3,12.2 L8.3,14.6 L9.8,14.6 L9.8,15.3 L7.6,15.3 L7.6,11.8 C7.6,11.5 7.8,11.5 8.1,11.5 L9.1,11.5 L9.1,9.2 L8.3,9.2 Z"/>+ <!-- dot -->+ <path android:fillColor="@android:color/white"+ android:pathData="M10.4,14.6 a0.45,0.45 0 1,1 0.9,0 a0.45,0.45 0 1,1 -0.9,0"/>+ <!-- 5 -->+ <path android:fillColor="@android:color/white"+ android:pathData="M11.8,8.7 L14.0,8.7 L14.0,9.4 L12.5,9.4 L12.5,11.6 L13.4,11.6 C13.8,11.6 14.1,12.0 14.1,12.4 L14.1,14.8 C14.1,15.2 13.8,15.5 13.4,15.5 L11.8,15.5 L11.8,14.8 L13.3,14.8 C13.35,14.8 13.4,14.75 13.4,14.7 L13.4,12.5 C13.4,12.4 13.35,12.3 13.3,12.3 L11.8,12.3 Z"/>+ <!-- x -->+ <path android:fillColor="@android:color/white"+ android:pathData="M15.5,11.0 L14.2,9.3 L14.9,9.3 L15.9,10.5 L16.9,9.3 L17.6,9.3 L16.3,11.0 L17.6,12.8 L16.9,12.8 L15.9,11.5 L14.9,12.8 L14.2,12.8 Z"/></group></vector>diff --git a/lib/main.dart b/lib/main.dartindex 35451ad7..794724b5 100644--- a/lib/main.dart+++ b/lib/main.dart@@ -280,10 +280,20 @@ class _AuthGateState extends State<AuthGate> {}Future<void> _initServices() async {+ // Start auth restoration immediately — it doesn't depend on audio/cast/+ // download services and must not be blocked by a hanging service init.+ if (mounted) {+ context.read<AuthProvider>().tryRestoreSession();+ }+// Register the audio handler FIRST so Android Auto's MediaBrowserService// can connect immediately on cold start (app force-closed → AA launches it).+ // Timeout prevents a hung audio subsystem from blocking all other services.try {- await AudioPlayerService.init();+ await AudioPlayerService.init().timeout(+ const Duration(seconds: 10),+ onTimeout: () => debugPrint('AudioService init timed out — continuing without it'),+ );} catch (e) {debugPrint('AudioService init failed: $e');}@@ -314,10 +324,6 @@ class _AuthGateState extends State<AuthGate> {} catch (e) {debugPrint('Service init failed: $e');}-- if (mounted) {- context.read<AuthProvider>().tryRestoreSession();- }}@overridediff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dartindex f6983399..fbde8283 100644--- a/lib/screens/home_screen.dart+++ b/lib/screens/home_screen.dart@@ -30,6 +30,10 @@ class _HomeScreenState extends State<HomeScreen> {bool _lastHideEbook = false;bool _lastIsPodcast = false;+ // Track player state to know when to re-fetch personalized sections.+ String? _lastKnownItemId;+ bool _lastKnownPlaying = false;+@overridevoid initState() {super.initState();@@ -106,10 +110,23 @@ class _HomeScreenState extends State<HomeScreen> {}void _onPlayerChanged() {- if (mounted) {- context.read<LibraryProvider>().refreshLocalProgress();- setState(() {});+ if (!mounted) return;+ final lib = context.read<LibraryProvider>();+ lib.refreshLocalProgress();++ // Re-fetch personalized sections when the playing item changes or+ // playback stops — this updates the "Continue Listening" order.+ final currentId = _player.currentItemId;+ final playing = _player.isPlaying;+ final itemChanged = currentId != _lastKnownItemId;+ final stopped = _lastKnownPlaying && !playing;+ _lastKnownItemId = currentId;+ _lastKnownPlaying = playing;+ if (itemChanged || stopped) {+ lib.loadPersonalizedView();}++ setState(() {});}void _showLibraryPicker(BuildContext context, ColorScheme cs, TextTheme tt, List<dynamic> allLibraries, LibraryProvider lib) {