mirror of
https://github.com/afkarxyz/SpotiDownloader.git
synced 2026-04-27 05:15:56 +03:00
[PR #108] [MERGED] Fix batch downloads ignoring selected filename format and preserve leading/trailing underscores #296
Labels
No labels
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SpotiDownloader#296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/afkarxyz/SpotiDownloader/pull/108
Author: @Laynholt
Created: 2/25/2026
Status: ✅ Merged
Merged: 2/25/2026
Merged by: @afkarxyz
Base:
main← Head:main📝 Commits (2)
beb1933Fix filename template in batch downloadsdc10f90Preserve boundary underscores in sanitized names📊 Changes
3 files changed (+4 additions, -4 deletions)
View changed files
📝
backend/filemanager.go(+1 -1)📝
backend/filename.go(+1 -1)📝
frontend/src/hooks/useDownload.ts(+2 -2)📄 Description
This PR combines two fixes related to filename generation and sanitization.
1. Batch “Download All” now respects the selected filename template
Previously, batch downloads always produced files in
Title - Artistformat because they relied on the legacysettings.filenameFormatfield. This PR updates batch download requests to use the current setting,settings.filenameTemplate, so “Download All” follows the user’s chosen filename format/template.Change:
useDownload.ts: usesettings.filenameTemplate(current setting) instead of legacysettings.filenameFormatin batch download requests.Result:
2. Preserve leading/trailing underscores during sanitization
This PR fixes an issue where underscores at the boundaries of generated names were removed during sanitization/rename generation.
Example (before):
Spotify\Tes_T_Name_\_fobecameSpotify\Tes_T_Name\foExample (after):
Spotify\Tes_T_Name_\_fois preserved correctlyChanges:
backend/filename.go:SanitizeFilenameno longer trims_(trims spaces only)backend/filemanager.go: stop trimming_when generating rename filenamesResult:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.