[PR #384] [CLOSED] feat: Add Batch Download functionality (Text input & .txt file support) #540

Closed
opened 2026-02-27 19:04:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/afkarxyz/SpotiFLAC/pull/384
Author: @leonardosolari
Created: 1/25/2026
Status: Closed

Base: mainHead: batch-download


📝 Commits (3)

  • d5b6bdc feat: add LayersIcon component and useBatchProcessor hook for batch download logic
  • 0f054c7 feat: implement batch download functionality
  • 2f3631b Merge branch 'main' into batch-download

📊 Changes

7 files changed (+1174 additions, -302 deletions)

View changed files

📝 app.go (+5 -1)
📝 backend/file_dialog.go (+27 -0)
📝 frontend/src/App.tsx (+503 -203)
frontend/src/components/BatchDownloadDialog.tsx (+224 -0)
📝 frontend/src/components/Sidebar.tsx (+121 -98)
frontend/src/components/ui/layers.tsx (+77 -0)
frontend/src/hooks/useBatchProcessor.ts (+217 -0)

📄 Description

Description

This PR implements a new Batch Download feature, allowing users to queue multiple Spotify URLs (tracks, albums, playlists) at once.

Currently, adding multiple separate links requires manual input one by one. This feature streamlines the process by offering a dedicated interface to process a list of URLs.

Features

  • New Sidebar Action: Added a "Batch Download" button (Layers icon) in the sidebar.
  • Batch Dialog: A dedicated modal that accepts input via:
    • Text Area: Paste a list of URLs (one per line).
    • File Upload: Load a .txt file containing the list of URLs.
  • Smart Processing:
    • Validates URLs (filters for spotify.com).
    • Fetches metadata sequentially with a slight delay to prevent rate-limiting.
    • Automatically identifies the content type (Track, Album, Playlist) and queues downloads accordingly.
  • Real-time Feedback: Shows a progress bar and a scrollable log of operations (info, success, errors) during processing.

Technical Changes

Frontend

  • Created BatchDownloadDialog.tsx for the UI.
  • Created useBatchProcessor.ts hook to handle the logic, parsing, and queueing.
  • Added LayersIcon.tsx component.
  • Updated App.tsx and Sidebar.tsx to integrate the new dialog.

Backend (Go)

  • Added SelectTextFileDialog in file_dialog.go to filter for .txt files specifically, distinct from the audio file picker.
  • Exposed the method in app.go.

How to Test

  1. Click the new "Batch Download" icon in the sidebar (below Home).
  2. Paste a list of mixed Spotify URLs (tracks and albums) OR click "From File" to load a list.
  3. Click "Start Batch".
  4. Observe the logs processing items and adding them to the global Download Queue.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/afkarxyz/SpotiFLAC/pull/384 **Author:** [@leonardosolari](https://github.com/leonardosolari) **Created:** 1/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `batch-download` --- ### 📝 Commits (3) - [`d5b6bdc`](https://github.com/afkarxyz/SpotiFLAC/commit/d5b6bdc4c4de096ecf720b87b882db0f35e11cbc) feat: add LayersIcon component and useBatchProcessor hook for batch download logic - [`0f054c7`](https://github.com/afkarxyz/SpotiFLAC/commit/0f054c7ab764bb1d9debd811ba3b85f4346d119e) feat: implement batch download functionality - [`2f3631b`](https://github.com/afkarxyz/SpotiFLAC/commit/2f3631b017228570d39d95be351b92a096356e74) Merge branch 'main' into batch-download ### 📊 Changes **7 files changed** (+1174 additions, -302 deletions) <details> <summary>View changed files</summary> 📝 `app.go` (+5 -1) 📝 `backend/file_dialog.go` (+27 -0) 📝 `frontend/src/App.tsx` (+503 -203) ➕ `frontend/src/components/BatchDownloadDialog.tsx` (+224 -0) 📝 `frontend/src/components/Sidebar.tsx` (+121 -98) ➕ `frontend/src/components/ui/layers.tsx` (+77 -0) ➕ `frontend/src/hooks/useBatchProcessor.ts` (+217 -0) </details> ### 📄 Description ## Description This PR implements a new **Batch Download** feature, allowing users to queue multiple Spotify URLs (tracks, albums, playlists) at once. Currently, adding multiple separate links requires manual input one by one. This feature streamlines the process by offering a dedicated interface to process a list of URLs. ## Features - **New Sidebar Action:** Added a "Batch Download" button (Layers icon) in the sidebar. - **Batch Dialog:** A dedicated modal that accepts input via: - **Text Area:** Paste a list of URLs (one per line). - **File Upload:** Load a `.txt` file containing the list of URLs. - **Smart Processing:** - Validates URLs (filters for `spotify.com`). - Fetches metadata sequentially with a slight delay to prevent rate-limiting. - Automatically identifies the content type (Track, Album, Playlist) and queues downloads accordingly. - **Real-time Feedback:** Shows a progress bar and a scrollable log of operations (info, success, errors) during processing. ## Technical Changes ### Frontend - Created `BatchDownloadDialog.tsx` for the UI. - Created `useBatchProcessor.ts` hook to handle the logic, parsing, and queueing. - Added `LayersIcon.tsx` component. - Updated `App.tsx` and `Sidebar.tsx` to integrate the new dialog. ### Backend (Go) - Added `SelectTextFileDialog` in `file_dialog.go` to filter for `.txt` files specifically, distinct from the audio file picker. - Exposed the method in `app.go`. ## How to Test 1. Click the new "Batch Download" icon in the sidebar (below Home). 2. Paste a list of mixed Spotify URLs (tracks and albums) OR click "From File" to load a list. 3. Click "Start Batch". 4. Observe the logs processing items and adding them to the global Download Queue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:04:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SpotiFLAC#540
No description provided.