Files which have a colon (:) in their name cannot be downloaded

Closed Beginner friendly
#375 0 comments 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
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
dart, flutter
Domain
backend, mobile

Research direction

Start with download_database.dart at DownloadDatabase.insertDownloadedSong (around line 197), then follow download_manager_provider.dart at downloadSong to see how the downloaded path is constructed. Reproduce with a track whose name contains a colon and check how its file is saved and recorded. Done means the download completes and the database can retrieve the file length for that track.

Written by the indexing model from the issue text.

Description

Trying to download some albums into the App and noticed that sometimes files are not downloaded. Today I noticed the pattern and all files have a ":" in their name.

Relevant excerpt from the log:

10-18 15:40:06.748 25045 25045 I flutter : [Download] "Zugabe: Nochmal Omma" finished with result: TaskStatus.complete (exception: null)
10-18 15:40:06.750 25045 25045 I flutter : Error in downloadSong: type=PathNotFoundException, message=PathNotFoundException: Cannot retrieve length of file, path = '/data/user/0/com.prodigytech.jellybox/app_flutter/music/0BQSjXLi09nHOLjrgMsRgd/Zugabe: Nochmal Omma.flac' (OS Error: No such file or directory, errno = 2)
10-18 15:40:06.750 25045 25045 I flutter : #0      _File.throwIfError (dart:io/file_impl.dart:779)
10-18 15:40:06.750 25045 25045 I flutter : #1      _File.lengthSync (dart:io/file_impl.dart:457)
10-18 15:40:06.750 25045 25045 I flutter : #2      DownloadDatabase.insertDownloadedSong (package:jplayer/src/data/storages/download_database.dart:197)
10-18 15:40:06.750 25045 25045 I flutter : <asynchronous suspension>
10-18 15:40:06.750 25045 25045 I flutter : #3      DownloadManagerNotifier.downloadSong (package:jplayer/src/domain/providers/download_manager_provider.dart:51)
10-18 15:40:06.750 25045 25045 I flutter : <asynchronous suspension>
10-18 15:40:06.750 25045 25045 I flutter : #4      _ContextMenuActions.download.<anonymous closure> (package:jplayer/src/presentation/widgets/context_menu.dart:764)
10-18 15:40:06.750 25045 25045 I flutter : <asynchronous suspension>
10-18 15:40:06.751 25045 25045 D WM-Processor: e d1f1c9fb-1d8f-48d1-9730-5d38b5acaaa4 executed; reschedule = false
10-18 15:40:06.751 25045 25045 D WM-GreedyScheduler: Stopping tracking for WorkGenerationalId(workSpecId=d1f1c9fb-1d8f-48d1-9730-5d38b5acaaa4, generation=0)
10-18 15:40:06.751 25045 25045 D WM-SystemJobService: d1f1c9fb-1d8f-48d1-9730-5d38b5acaaa4 executed on JobScheduler
10-18 15:40:06.755 25045 25095 D WM-GreedyScheduler: Cancelling work ID d1f1c9fb-1d8f-48d1-9730-5d38b5acaaa4
10-18 15:40:06.758 25045 25093 D WM-NetworkStateTracker: Unregistering network callback
10-18 15:40:06.763 25045 25093 D WM-PackageManagerHelper: androidx.work.impl.background.systemalarm.RescheduleReceiver disabled
Dominant language
Dart
Stars
702
Forks
25
Avg merge
4h 50m
Merged PRs (30d)
77

Getting set up

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 avdept/JellyBoxPlayer

All issues in avdept/JellyBoxPlayer

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.