Skip to content

[ISSUE] Consolidate duplicated hard-coded audio manifests into a single source of truth #388

Description

@uttamdeepk22

📝 Issue Description

The audio manifest is currently duplicated in multiple locations:

  • src/services/audioApi.js
  • src/ReaderScreen/components/AudioPlayer/hooks/useAudioManifest/index.js

Both contain near-identical hard-coded manifests with URLs, durations, and file sizes for all banis and artists.

As a result, when an audio file is replaced or its metadata changes, the following need to remain in sync:

  • Backend
  • src/services/audioApi.js
  • src/ReaderScreen/components/AudioPlayer/hooks/useAudioManifest/index.js

This duplication increases maintenance effort and the risk of inconsistencies.

🔍 Type of Issue

  • Question
  • Documentation Issue
  • Performance Issue
  • Accessibility Issue
  • Localization Issue
  • Other (please specify) - Code Maintenance / Refactoring

Suggested direction

The emergency manifest already exists in useAudioManifest.

Either:

  • remove the duplicate manifest from audioApi.js, or
  • have both locations consume a single shared manifest.

Context

Created to track the remaining review comment from PR #376 so it is not lost during the merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions