Skip to content

Cache tracks only after a minimum listening time instead of at playback start #3033

@kairosci

Description

@kairosci

Checklist

  • I've checked that there is no other issue about this feature request.
  • This issue contains only one feature request.
  • The title of this issue accurately describes the feature request.

Feature description

Currently, tracks are cached immediately when playback starts.

I would like the caching process to begin only after the user has listened to the track for a certain minimum duration, for example:

  • After 30 seconds of playback, or
  • After 50% of the track duration has been played.

The exact threshold could be fixed (e.g., 30 seconds) or dynamically calculated (e.g., half of the track length).

This change would ensure that only tracks that the user has actually listened to are stored in cache, rather than tracks that were started unintentionally or skipped immediately.

Ideally, this logic should:

  • Track effective playback time (excluding paused time).
  • Avoid caching if the track is skipped before reaching the threshold.
  • Trigger caching only once the minimum listening condition is satisfied.

Why do you want this feature?

At the moment, when a track starts playing, it is immediately cached. This creates a problem:

  • Tracks that start accidentally
  • Tracks that are skipped after a few seconds
  • Tracks previewed briefly

are still cached.

As a result, the cache gets filled with unwanted content, reducing its effectiveness and potentially consuming unnecessary storage space.

Delaying caching until a meaningful listening threshold is reached would:

  • Improve cache efficiency
  • Prioritize actually listened content
  • Reduce storage waste
  • Improve overall user experience

Additional information

This behavior would be similar to how many streaming services determine whether a track counts as “played” (often after 30 seconds).

If helpful, the listening threshold could potentially be configurable in the future, but a fixed default value (e.g., 30 seconds) would already significantly improve the current behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions