captbaritone / captbaritone/webamp

Feature Request: Add an option to override the file open dialog for songs and skins.

Open
#1,243 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
796
PR merge metrics
No merged PRs in 30d

Description

It would be nice to have options to override the default behavior for invoking Add File/Add Directory and Load Skin, much like the option exists for `handleLoadListEvent`, `handleAddUrlEvent`, etc.

My workaround is to intercept and stop propagation of pointer events that overlap the `ADD` button, show my own file dialog (for the webtop OS's file system), and then call the `webamp.appendTracks()` or `webamp.setSkinFromUrl()`.

Use case: the webtop OS I've integrated this into has its own cloud-based file system and is intended for the user to use it across multiple devices, particularly ones that don't really use the native file system extensively (like chromebooks and mobile). It also manages its own way of transferring files from the local file system into the OS if the user needs to. Therefore it makes more sense to override the open file dialog in this particular case rather than showing the native system dialog which in some cases gives odd results (like prompting the user to record a voice message on Android).

Expected behavior (e.g.):
![image](https://github.com/captbaritone/webamp/assets/774207/49f49e77-0726-437b-bdcc-69763ccd9887)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing handleLoadListEvent and handleAddUrlEvent options to the Add File/Add Directory and Load Skin entry points. Compare those flows with appendTracks() and setSkinFromUrl(); done means callers can supply custom file-dialog behavior without intercepting pointer events, while preserving the native dialog by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.