Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

bug: ContinueWatchingSelector sorts episodes by string comparison instead of proper date parsing causing wrong resume order

Open Beginner friendly
#367 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
android, kotlin
Domain
mobile

Research direction

Start in app/src/main/kotlin/com/arflix/tv/util/ContinueWatchingSelector.kt and read selectInProgressEpisode() to see how updatedAt values are selected and what timestamp formats the app supplies. Check for existing tests covering episode selection. Done means the most recently watched in-progress episode is selected correctly when timestamps use different formats or timezone offsets.

Written by the indexing model from the issue text.

Description

🐛 Bug Report

Description

In app/src/main/kotlin/com/arflix/tv/util/ContinueWatchingSelector.kt, the selectInProgressEpisode() function sorts in-progress episodes using .maxByOrNull { it.updatedAt ?: "" }. This compares updatedAt as a plain string instead of parsing it as a date, which can return wrong results when timestamps have different formats or timezones.

Steps to Reproduce
  1. Open app/src/main/kotlin/com/arflix/tv/util/ContinueWatchingSelector.kt
  2. Find selectInProgressEpisode() function
  3. Notice this line:
    .maxByOrNull { it.updatedAt ?: "" }
  4. If updatedAt contains ISO timestamps like "2026-01-10T10:00:00Z" vs "2025-12-31T23:59:59Z", string comparison works accidentally — but any format variation breaks ordering
Expected Behavior

Episodes should be sorted by properly parsed date/time so the most recently watched episode is always selected correctly regardless of timestamp format.

Actual Behavior

String comparison is used which works accidentally for ISO dates but will silently break if timestamp format ever changes or contains timezone offsets.

Proposed Fix
// Current (fragile string comparison)
.maxByOrNull { it.updatedAt ?: "" }

// Fix (proper date parsing)
.maxByOrNull { snapshot ->
    snapshot.updatedAt?.let {
        runCatching { 
            java.time.Instant.parse(it).epochSecond 
        }.getOrDefault(0L)
    } ?: 0L
}
Environment
  • Platform: Android TV / Google TV
  • Language: Kotlin
Additional Context

Files to modify: app/src/main/kotlin/com/arflix/tv/util/ContinueWatchingSelector.kt

Impact: Medium — affects Continue Watching row accuracy
Effort: Small — single line change

Dominant language
Kotlin
Stars
760
Forks
122
Avg merge
15h 3m
Merged PRs (30d)
62

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ProdigyV21/ARVIO

All issues in ProdigyV21/ARVIO

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.