From 73af1188fb2651b85126dd8c474c421cf525a2f0 Mon Sep 17 00:00:00 2001 From: Henning Weiss Date: Wed, 25 Dec 2024 12:23:25 +0100 Subject: [PATCH] WATCH_NEXT_TYPE_NEW now ordered by item creation date. --- .../jellyfin/androidtv/integration/LeanbackChannelWorker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/jellyfin/androidtv/integration/LeanbackChannelWorker.kt b/app/src/main/java/org/jellyfin/androidtv/integration/LeanbackChannelWorker.kt index 779d8244d6..d623b65c8c 100644 --- a/app/src/main/java/org/jellyfin/androidtv/integration/LeanbackChannelWorker.kt +++ b/app/src/main/java/org/jellyfin/androidtv/integration/LeanbackChannelWorker.kt @@ -498,7 +498,8 @@ class LeanbackChannelWorker( // First episode of the season item.indexNumber == 1 -> { setWatchNextType(WatchNextPrograms.WATCH_NEXT_TYPE_NEW) - setLastEngagementTimeUtcMillis(Instant.now().toEpochMilli()) + setLastEngagementTimeUtcMillis(item.dateCreated?.atZone(ZoneId.systemDefault())?.toInstant()?.toEpochMilli() + ?: Instant.now().toEpochMilli()) } // Default else -> {