jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.87k stars 489 forks source link

Using `Play next` or `Add to queue` replaces currently playing song #2685

Open hasezoey opened 1 year ago

hasezoey commented 1 year ago

Describe the bug

Using either Play next or Add to queue while a song is playing replaces the currently playing one instead of adding it to a queue

  1. start the app
  2. start a remote control (and connect to the app)
  3. play a song
  4. try to use Play next or Add to queue on a different song
  5. observe the currently playing song being replaced with the newly selected one, instead of it being added to a queue

also note that after it replaces it it also says "1 of 1" in the queue

Logs

No response

Application version

0.15.6

Where did you install the app from?

Amazon Appstore

Device information

Amazon AFTR

Android version

Fire OS 7.6.3.3

Jellyfin server version

10.8.9

hasezoey commented 1 year ago

also i dont if this is related, but using Play all from here does in fact not start with the selected song but the one that is the first in the full list and also plays / adds just the first song to the list instead of all

PS: the Play all from here does not just affect music, it also does for shows

jellyfin-bot commented 1 year ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

hasezoey commented 1 year ago

from what i can tell, this has not been addressed in any stable release yet, but it looks like it may be fixed for 0.16.0 for the "playback rewrite" (though i dont know of a way to run the beta app on firetv from the appstore)

hasezoey commented 1 year ago

i just re-tested, the current version is 0.15.11 (and jellyfin 10.8.10), and the same behavior (at add to queue and play next overwrite currently playing) is still present

jellyfin-bot commented 11 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

hasezoey commented 10 months ago

can confirm this issue still exists on the same device with app version 16.1 and jellyfin 10.8.13

out of curiosity i also tried some other modes like on a album "Play All", "Instant Mix" and "Random Play", all of which basically locked-up the app by repeated "1 Entry added" but not actually starting anything or changing the displayed playing title

will re-test when 16.2 becomes available for my device

nielsvanvelzen commented 10 months ago

There is a good chance this is fixed with 0.16.2 so let me know if it's still a problem once you've updated.

hasezoey commented 10 months ago

re-tested with 0.16.2, and sadly it is still the same behavior of only having one song in the queue and any "add to queue" will replace the current song

i tried some things to see what may have been the crash issue, and i came to the conclusion that using "random play" (on a album) inside the androidtv (while having or not having a remote control connected) will crash the app

Uploaded crash log --- client: Jellyfin for Android TV client_version: 0.16.2 client_repository: https://github.com/jellyfin/jellyfin-androidtv type: crash_report format: markdown --- ### Logs ***Stack Trace***: ```log java.util.NoSuchElementException: Cannot get random in empty range: 0..-1 at kotlin.ranges.RangesKt___RangesKt.random(_Ranges.kt:193) at org.jellyfin.playback.core.queue.DefaultPlayerQueueState$replaceQueue$1.invokeSuspend(PlayerQueueState.kt:104) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@f302f42, Dispatchers.Default] ``` ***Logcat***: ```log 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.intercept.EngineInterceptor$intercept$2.invokeSuspend(java.lang.Object) (EngineInterceptor.kt:75) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(java.lang.Object) (ContinuationImpl.kt:33) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.DispatchedTask.run() (DispatchedTask.kt:108) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.internal.LimitedDispatcher$Worker.run() (LimitedDispatcher.kt:115) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.TaskImpl.run() (Tasks.kt:103) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(kotlinx.coroutines.scheduling.Task) (CoroutineScheduler.kt:584) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(kotlinx.coroutines.scheduling.Task) (CoroutineScheduler.kt:793) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker() (CoroutineScheduler.kt:697) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run() (CoroutineScheduler.kt:684) 12-30 15:17:00.744 I/lyfin.androidt(14199): Caused by: java.lang.ClassNotFoundException: Didn't find class "java.lang.ClassValue" on path: DexPathList[[zip file "/data/app/org.jellyfin.androidtv-57LiVWBMVaTHnjjZhUFt2g==/base.apk"],nativeLibraryDirectories=[/data/app/org.jellyfin.androidtv-57LiVWBMVaTHnjjZhUFt2g==/lib/arm, /data/app/org.jellyfin.androidtv-57LiVWBMVaTHnjjZhUFt2g==/base.apk!/lib/armeabi-v7a, /system/lib]] 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 12-30 15:17:00.744 I/lyfin.androidt(14199): at boolean org.acra.util.BundleKt$$ExternalSyntheticApiModelOutline0.m(java.nio.file.attribute.BasicFileAttributes) (D8$$SyntheticClass:-1) 12-30 15:17:00.744 I/lyfin.androidt(14199): at okio.FileMetadata okio.NioSystemFileSystem.metadataOrNull(java.nio.file.Path) (NioSystemFileSystem.kt:58) 12-30 15:17:00.744 I/lyfin.androidt(14199): at okio.FileMetadata okio.NioSystemFileSystem.metadataOrNull(okio.Path) (NioSystemFileSystem.kt:35) 12-30 15:17:00.744 I/lyfin.androidt(14199): at okio.FileMetadata okio.ForwardingFileSystem.metadataOrNull(okio.Path) (ForwardingFileSystem.kt:155) 12-30 15:17:00.744 I/lyfin.androidt(14199): at boolean okio.internal.-FileSystem.commonExists(okio.FileSystem, okio.Path) (FileSystem.kt:41) 12-30 15:17:00.744 I/lyfin.androidt(14199): at boolean okio.FileSystem.exists(okio.Path) (FileSystem.kt:39) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void coil.disk.DiskLruCache.initialize() (DiskLruCache.kt:179) 12-30 15:17:00.744 I/lyfin.androidt(14199): at coil.disk.DiskLruCache$Snapshot coil.disk.DiskLruCache.get(java.lang.String) (DiskLruCache.kt:365) 12-30 15:17:00.744 I/lyfin.androidt(14199): at coil.disk.DiskCache$Snapshot coil.disk.RealDiskCache.openSnapshot(java.lang.String) (RealDiskCache.kt:29) 12-30 15:17:00.744 I/lyfin.androidt(14199): at coil.disk.DiskCache$Snapshot coil.fetch.HttpUriFetcher.readFromDiskCache() (HttpUriFetcher.kt:127) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.fetch.HttpUriFetcher.fetch(kotlin.coroutines.Continuation) (HttpUriFetcher.kt:40) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.intercept.EngineInterceptor.fetch(coil.ComponentRegistry, coil.request.ImageRequest, java.lang.Object, coil.request.Options, coil.EventListener, kotlin.coroutines.Continuation) (EngineInterceptor.kt:165) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.intercept.EngineInterceptor.execute(coil.request.ImageRequest, java.lang.Object, coil.request.Options, coil.EventListener, kotlin.coroutines.Continuation) (EngineInterceptor.kt:122) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.intercept.EngineInterceptor.access$execute(coil.intercept.EngineInterceptor, coil.request.ImageRequest, java.lang.Object, coil.request.Options, coil.EventListener, kotlin.coroutines.Continuation) (EngineInterceptor.kt:41) 12-30 15:17:00.744 I/lyfin.androidt(14199): at java.lang.Object coil.intercept.EngineInterceptor$intercept$2.invokeSuspend(java.lang.Object) (EngineInterceptor.kt:75) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(java.lang.Object) (ContinuationImpl.kt:33) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.DispatchedTask.run() (DispatchedTask.kt:108) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.internal.LimitedDispatcher$Worker.run() (LimitedDispatcher.kt:115) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.TaskImpl.run() (Tasks.kt:103) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(kotlinx.coroutines.scheduling.Task) (CoroutineScheduler.kt:584) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(kotlinx.coroutines.scheduling.Task) (CoroutineScheduler.kt:793) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker() (CoroutineScheduler.kt:697) 12-30 15:17:00.744 I/lyfin.androidt(14199): at void kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run() (CoroutineScheduler.kt:684) 12-30 15:17:00.744 I/lyfin.androidt(14199): 12-30 15:17:00.753 I/org.jellyfin.sdk.api.client.KtorClient(14199): GET http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Resume?limit=50&fields=PrimaryImageAspectRatio&fields=Overview&fields=ItemCounts&fields=DisplayPreferencesId&fields=ChildCount&mediaTypes=Audio&imageTypeLimit=1&enableTotalRecordCount=false&enableImages=true&excludeActiveSessions=false 12-30 15:17:00.761 I/org.jellyfin.sdk.api.client.KtorClient(14199): GET http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Views?includeHidden=false 12-30 15:17:00.928 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Views?format=json 12-30 15:17:01.026 I/WM-WorkerWrapper(14199): Worker result SUCCESS for Work [ id=9bb2f320-2932-4b1f-8af4-c73dbb1d8a4d, tags={ org.jellyfin.androidtv.integration.LeanbackChannelWorker } ] 12-30 15:17:01.070 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=faedb14c-fad9-ffcd-e729-e92d816f32d5&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount%2CSeriesPrimaryImage&Limit=50&GroupItems=true&format=json 12-30 15:17:01.077 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=31182e37-84c4-844b-1843-02d103ca5ea9&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount%2CSeriesPrimaryImage&Limit=50&GroupItems=true&format=json 12-30 15:17:01.078 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=9403711a-fa65-061e-9967-086eac702a66&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount%2CSeriesPrimaryImage&Limit=50&GroupItems=true&format=json 12-30 15:17:01.081 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=f679bbf3-8c1b-6131-59cf-18c1d48a23cc&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount%2CSeriesPrimaryImage&Limit=50&GroupItems=true&format=json 12-30 15:17:01.082 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Shows/NextUp?Fields=PrimaryImageAspectRatio%2COverview%2CChildCount&UserId=1cb49d64-ac50-431d-af0f-9a7260fcbc77&Limit=50&ImageTypeLimit=1&format=json 12-30 15:17:01.085 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=7e64e319-657a-9516-ec78-490da03edccb&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount%2CSeriesPrimaryImage&Limit=50&GroupItems=true&format=json 12-30 15:17:01.194 W/libEGL (14199): EGLNativeWindowType 0xe17a7008 disconnect failed 12-30 15:17:01.381 I/ConfigStore(14199): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs retrieved: 1000000 (default) 12-30 15:17:01.381 I/ConfigStore(14199): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs retrieved: 1000000 (default) 12-30 15:17:01.791 I/AutoBitrate(14199): Auto bitrate set to: 20075282 12-30 15:17:02.966 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:02.999 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.048 I/chatty (14199): uid=10192(org.jellyfin.androidtv) identical 2 lines 12-30 15:17:03.073 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by android.widget.TextView{43ca0a1 V.ED..... ......ID 120,40-1578,126 #7f0b02f5 app:id/title} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by android.widget.LinearLayout{447a2c6 V.E...... ......ID 120,132-1598,172 #7f0b01a7 app:id/infoRow} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{13cd287 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{a74f5b4 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{3e1a5dd V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{d8b2552 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.078 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{90a1023 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.088 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?ParentId=7e64e319-657a-9516-ec78-490da03edccb&SortBy=SortName&ImageTypeLimit=1&recursive=true&Filters=IsFavorite&Fields=PrimaryImageAspectRatio%2COverview%2CItemCounts%2CDisplayPreferencesId%2CChildCount&Limit=60&IncludeItemTypes=MusicAlbum%2CMusicArtist&format=json 12-30 15:17:03.089 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?SortBy=DateCreated&ImageTypeLimit=1&recursive=true&Fields=PrimaryImageAspectRatio%2CCumulativeRunTimeTicks%2CChildCount&sortOrder=Descending&Limit=60&IncludeItemTypes=Playlist&format=json 12-30 15:17:03.140 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.165 I/chatty (14199): uid=10192(org.jellyfin.androidtv) identical 1 line 12-30 15:17:03.188 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.208 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.227 W/lyfin.androidt(14199): Accessing hidden method Landroid/view/RenderNode;->getScaleX()F (dark greylist, linking) 12-30 15:17:03.230 W/View (14199): requestLayout() improperly called by android.widget.TextView{43ca0a1 V.ED..... ......ID 120,40-1578,126 #7f0b02f5 app:id/title} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by android.widget.LinearLayout{447a2c6 V.E...... ......ID 120,132-1598,172 #7f0b01a7 app:id/infoRow} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{757f793 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{c9563d0 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{2e50fc9 V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{4cd26ce V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.231 W/View (14199): requestLayout() improperly called by androidx.compose.ui.platform.ViewLayerContainer{e8079ef V.E...... ......ID 0,0-0,0} during layout: running second layout pass 12-30 15:17:03.242 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?SortBy=DatePlayed&EnableTotalRecordCount=false&ImageTypeLimit=1&recursive=true&Filters=IsPlayed&IncludeItemTypes=Audio&ParentId=7e64e319-657a-9516-ec78-490da03edccb&Fields=PrimaryImageAspectRatio%2COverview%2CItemCounts%2CDisplayPreferencesId%2CChildCount&sortOrder=Descending&Limit=50&format=json 12-30 15:17:03.305 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/Latest?ParentId=7e64e319-657a-9516-ec78-490da03edccb&Fields=PrimaryImageAspectRatio%2COverview%2CChildCount&IncludeItemTypes=Audio&Limit=50&GroupItems=true&format=json 12-30 15:17:03.497 W/View (14199): requestLayout() improperly called by android.widget.LinearLayout{447a2c6 V.E...... ......ID 120,132-1598,172 #7f0b01a7 app:id/infoRow} during layout: running second layout pass 12-30 15:17:03.497 W/View (14199): requestLayout() improperly called by android.widget.TextView{43ca0a1 V.ED..... ......ID 120,40-1578,126 #7f0b02f5 app:id/title} during layout: running second layout pass 12-30 15:17:04.692 I/org.jellyfin.sdk.api.client.KtorClient(14199): GET http://192.168.2.6:8096/DisplayPreferences/7e64e319-657a-9516-ec78-490da03edccbAL?userId=1cb49d64-ac50-431d-af0f-9a7260fcbc77&client=jellyfin-androidtv 12-30 15:17:04.768 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?ParentId=7e64e319-657a-9516-ec78-490da03edccb&SortBy=SortName&recursive=true&Fields=PrimaryImageAspectRatio%2CChildCount%2CMediaSources%2CMediaStreams%2CDisplayPreferencesId&sortOrder=Ascending&Limit=25&IncludeItemTypes=MusicAlbum&format=json 12-30 15:17:05.554 I/ItemListFragment(14199): Got playback state change event IDLE for item 12-30 15:17:05.564 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/2b62f718-9a25-0317-fae1-0e63142ff0b0?format=json 12-30 15:17:05.640 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?ParentId=2b62f7189a250317fae10e63142ff0b0&SortBy=SortName&recursive=true&Fields=PrimaryImageAspectRatio%2CGenres%2CChildCount&Limit=200&IncludeItemTypes=Audio&format=json 12-30 15:17:06.624 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items/2b62f7189a250317fae10e63142ff0b0?format=json 12-30 15:17:06.648 I/jellyfin-apiclient(14199): Response received from: http://192.168.2.6:8096/Users/1cb49d64-ac50-431d-af0f-9a7260fcbc77/Items?ArtistIds=2b62f718-9a25-0317-fae1-0e63142ff0b0&SortBy=SortName&MediaTypes=Audio&recursive=true&Fields=PrimaryImageAspectRatio%2CGenres%2CChildCount&Limit=150&IsMissing=false&IsVirtualUnaired=false&format=json 12-30 15:17:06.649 I/HomeRowsFragment(14199): Updating audio queue in HomeFragment (onQueueStatusChanged) 12-30 15:17:06.652 E/ACRA (14199): ACRA caught a NoSuchElementException for org.jellyfin.androidtv 12-30 15:17:06.652 E/ACRA (14199): java.util.NoSuchElementException: Cannot get random in empty range: 0..-1 12-30 15:17:06.652 E/ACRA (14199): at kotlin.ranges.RangesKt___RangesKt.random(_Ranges.kt:193) 12-30 15:17:06.652 E/ACRA (14199): at org.jellyfin.playback.core.queue.DefaultPlayerQueueState$replaceQueue$1.invokeSuspend(PlayerQueueState.kt:104) 12-30 15:17:06.652 E/ACRA (14199): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 12-30 15:17:06.652 E/ACRA (14199): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) 12-30 15:17:06.652 E/ACRA (14199): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) 12-30 15:17:06.652 E/ACRA (14199): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) 12-30 15:17:06.652 E/ACRA (14199): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) 12-30 15:17:06.652 E/ACRA (14199): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) 12-30 15:17:06.652 E/ACRA (14199): Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@f302f42, Dispatchers.Default] ``` ### App information ***App version***: `0.16.2` (`160299`) ***Package name***: `org.jellyfin.androidtv` ***Build***: ```json {"BOARD":"raven","BOOTLOADER":"unknown","BRAND":"Amazon","CPU_ABI":"armeabi-v7a","CPU_ABI2":"armeabi","DEVICE":"raven","DISPLAY":"PS7664.3772N","FINGERPRINT":"Amazon\/raven\/raven:9\/PS7664.3772N\/0029159767040:user\/amz-p,release-keys","HARDWARE":"amlogic","HOST":"i3-ri-14-use1a-b-16-04-fos-87","ID":"PS7664.3772N","IS_DEBUGGABLE":false,"IS_EMULATOR":false,"MANUFACTURER":"Amazon","MODEL":"AFTR","PERMISSIONS_REVIEW_REQUIRED":false,"PRODUCT":"raven","RADIO":"unknown","SUPPORTED_32_BIT_ABIS":["armeabi-v7a","armeabi"],"SUPPORTED_64_BIT_ABIS":[],"SUPPORTED_ABIS":["armeabi-v7a","armeabi"],"TAGS":"amz-p,release-keys","TIME":1695416576000,"TYPE":"user","UNKNOWN":"unknown","USER":"build","VERSION":{"ACTIVE_CODENAMES":[],"BASE_OS":"PPR1.180610.009","CODENAME":"REL","FIRST_SDK_INT":28,"INCREMENTAL":"0029159767172","PREVIEW_SDK_INT":0,"RELEASE":"9","RESOURCES_SDK_INT":28,"SDK":"28","SDK_INT":28,"SECURITY_PATCH":"2023-08-01"}} ``` ***Build config***: ```json {"APPLICATION_ID":"org.jellyfin.androidtv","BUILD_TYPE":"release","DEBUG":false,"DEVELOPMENT":false,"VERSION_CODE":160299,"VERSION_NAME":"0.16.2"} ``` ### Device information ***Android version***: `9` ***Device brand***: `Amazon` ***Device product***: `raven` ***Device model***: `AFTR` ### Crash information ***Start time***: `2023-12-30T15:16:59.528+01:00` ***Crash time***: `2023-12-30T15:17:06.679+01:00`

Additional information (guessing by the error), the album i tried running had more than 10 songs, but it also happens with all other albums (with any number from 1 to over 20)


(unrelated this issue) i dont see any way to clear the queue from inside the androidtv app

hasezoey commented 10 months ago

after a bit of debugging and looking through the code (after having had trouble setting logging up properly), i found that the remote control event will ALWAYS only select the first element and ALWAYS use "PlayNow" even if the message type is different, see:

https://github.com/jellyfin/jellyfin-androidtv/blob/7198df297f06cde2ad765105b7716b4ff84542d4/app/src/main/java/org/jellyfin/androidtv/data/eventhandling/SocketHandler.kt#L128

Example "Play Album":

12-30 18:38:58.513 24974 25047 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"Play","MessageId":"55814f3fd2d244b5aa129ea0c546f686","Data":{"ItemIds":["0203fe2daaa0c3d89a1d42828d88016a"
,"f3f1847d096b9d58c713e9bdfc453473","a8dd55114dcfe2111607a642245ee870","ab3379b65bd8229d18d6b322a28d7166","98904799de40dc7e5243ce08260e720b","2b5d8e2d0ec13e402be52d739ab7204a","fef72bf6379ba84eeb8e344262181783","f9304e6b6641bc3ba63f
3a4bc2ff1e7d"],"PlayCommand":"PlayNow","ControllingUserId":"1cb49d64ac50431daf0f9a7260fcbc77"}}

Example on track PlayNext:

12-30 18:42:28.382 24974 25047 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"Mess
ageType":"Play","MessageId":"21bbf1640b2b466a9523dcd6d0b2d89f","Data":{"ItemIds":["f3f1847d096b9d58c713e9bdfc453473"
],"PlayCommand":"PlayNext","ControllingUserId":"1cb49d64ac50431daf0f9a7260fcbc77"}}

PS: the "crash on album random play" does not exist on the current master branch (7198df297f06cde2ad765105b7716b4ff84542d4), but does not actually play anything (empty / old state)

jellyfin-bot commented 6 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

hasezoey commented 6 months ago

Still relevant with app version 0.16.10 (and server version 10.8.13)

jellyfin-bot commented 2 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

pbasov commented 2 months ago

I think I'm having the same issue. If I try to cast an album from my phone to android tv box, I get only a single track queued and nothing else. Really annoying, makes casting half-useless. You basically have to set a queue from the remote and only then it's possible to skip tracks from the phone.

hasezoey commented 2 months ago

Can confirm this is still a issue in version 0.17.4 (server version 10.9.10)