Skip to content

Bug: Offline download progress is never updated in the UI #16

@windoze95

Description

@windoze95

Description

When downloading a video for offline use, the UI does not show progress and the CircularProgressIndicator spins infinitely without a percentage.

This happens for two reasons:

  1. In lib/services/offline_service.dart (~line 63), the download loop writes progress directly to Hive via _box.put. However, OfflineVideosNotifier does not use box.watch() or a ValueListenableBuilder, so it doesn't rebuild the UI when the box changes.
  2. In lib/providers/offline_provider.dart (~line 38), offlineProgressProvider is defined as a static empty map (Map<String, double> build() => {};). There are no functions exposed to update this map, so VideoListTile always reads null for the progress value.

Suggested Fix

  • Either emit progress updates to the offlineProgressProvider explicitly during the onReceiveProgress callback.
  • Or listen to Hive box changes directly using a stream/listener in the notifier.

File Paths

  • lib/services/offline_service.dart
  • lib/providers/offline_provider.dart
  • lib/widgets/video_list_tile.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions