feat: combine upload and Openverse into one import page
Adding music took two navigation items that each did half the job. The new Import page has both sources as tabs and one shared list of what was added in this session, with the reason for every failure and a link to the library. From computer: drop several MP3 or WAV files or pick them with a multi-select dialog. Files are imported one by one on a background thread with a progress bar, and a failing file does not stop the rest. Openverse: search and download show a progress ring with a status text. Results that are already in the library or have no duration are marked in their row and cannot be imported; a double-click imports. To detect duplicates, songs now store the Openverse result id. The repository adds the column to existing databases and a unique index keeps one song per Openverse result. Refs #13 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a762a2f571
commit
0a0d8e1d4c
17 files changed
+582
-266
No files matched your search
@@ -23,10 +23,11 @@ On first start the app creates its data under `%LOCALAPPDATA%\Radiosender`:
|
||||
|
||||
## Usage
|
||||
|
||||
1. **Upload**: pick MP3 or WAV files. The app copies them into the music folder, reads title and artist from the file tags and measures the duration.
|
||||
2. **Openverse**: search the [Openverse](https://openverse.org) audio catalog and add a result. The app downloads the file and stores its license and attribution with the song.
|
||||
3. **Library**: lists and searches all songs. Edit title, artist, license and attribution, or delete a song.
|
||||
4. **Schedule**:
|
||||
1. **Import**: one page for both ways of adding music. Every result, added or failed, is listed under "Added in this session", with a link to the Library.
|
||||
- **From computer**: drop MP3 or WAV files on the page or click **Choose files...**; several files at once are fine. The app copies each file into the music folder, reads title and artist from the file tags and measures the duration. A file that fails is reported and the others still get imported.
|
||||
- **Openverse**: search the [Openverse](https://openverse.org) audio catalog, preview a result and import it with **Import to library** or a double-click. The app downloads the file and stores its license and attribution with the song. Results that are already in the library or have no duration are marked and cannot be imported.
|
||||
2. **Library**: lists and searches all songs. Edit title, artist, license and attribution, or delete a song.
|
||||
3. **Schedule**:
|
||||
1. Enter the number of hours (1 to 24) and click **Create schedule**. The plan starts at the next full hour.
|
||||
2. The timeline shows every item with start time, type (song, news, ad, moderator), title and duration.
|
||||
3. **Start** puts the plan on air on the real clock. Before the planned start the now-playing card shows when the broadcast begins; if the plan has already begun, playback joins at the next item. **Stop** ends it. The now-playing card shows the current item, its progress and the volume.
|
||||
@@ -89,8 +90,8 @@ For each downloaded track the app stores the license (for example `CC BY 4.0`) a
|
||||
| Remaining time filled with music | Songs fill each slot | Done |
|
||||
| Music comes from a SQLite database | `SongRepository`, `radiosender.db` | Done |
|
||||
| Library can be extended at any time: add, edit, delete | Library page and `SongEditWindow` | Done |
|
||||
| Add by simple upload | Upload page (MP3, WAV) | Done |
|
||||
| Add through the Openverse API | Openverse page | Done |
|
||||
| Add by simple upload | Import page, "From computer" (MP3, WAV, several files, drag and drop) | Done |
|
||||
| Add through the Openverse API | Import page, "Openverse" | Done |
|
||||
| Music player is a singleton class | `MusicPlayer.Instance` | Done |
|
||||
| Hot swap: a requested song replaces an item during the planned run, everything after adapts | Song request on the Schedule page; `ScheduleGenerator.Replace`, `PlaybackEngine.ReplaceUpcoming` | Done |
|
||||
| News and ad blocks are shown | Timeline with type labels, now-playing card | Done |
|
||||
|
||||
Reference in new issue
Block a user