From 1423a325285d972d1364fe6b9e59535453dd2854 Mon Sep 17 00:00:00 2001 From: afkarxyz Date: Sun, 23 Nov 2025 10:32:53 +0700 Subject: [PATCH] v5.9 --- app.go | 85 ++++-- backend/deezer.go | 48 ++-- backend/filename.go | 46 ++++ backend/qobuz.go | 41 ++- backend/spotify_metadata.go | 12 +- backend/tidal.go | 28 +- frontend/package.json | 1 + frontend/package.json.md5 | 2 +- frontend/pnpm-lock.yaml | 69 +++++ frontend/src/App.tsx | 6 +- frontend/src/components/AlbumInfo.tsx | 4 +- frontend/src/components/ArtistInfo.tsx | 4 +- .../src/components/DownloadProgressToast.tsx | 6 +- frontend/src/components/PlaylistInfo.tsx | 4 +- frontend/src/components/SearchBar.tsx | 4 +- frontend/src/components/Settings.tsx | 12 +- frontend/src/components/TitleBar.tsx | 86 +++--- frontend/src/components/TrackInfo.tsx | 3 +- frontend/src/components/ui/button.tsx | 2 +- frontend/src/components/ui/context-menu.tsx | 252 ++++++++++++++++++ .../src/components/ui/input-with-context.tsx | 214 +++++++++++++++ frontend/src/hooks/useDownload.ts | 12 +- frontend/src/main.tsx | 2 +- frontend/src/types/api.ts | 2 + main.go | 2 + wails.json | 2 +- 26 files changed, 803 insertions(+), 146 deletions(-) create mode 100644 backend/filename.go create mode 100644 frontend/src/components/ui/context-menu.tsx create mode 100644 frontend/src/components/ui/input-with-context.tsx diff --git a/app.go b/app.go index 7adeb9a..fbb3e5c 100644 --- a/app.go +++ b/app.go @@ -4,7 +4,10 @@ import ( "context" "encoding/json" "fmt" + "os" + "path/filepath" "spotiflac/backend" + "strings" "time" ) @@ -34,26 +37,28 @@ type SpotifyMetadataRequest struct { // DownloadRequest represents the request structure for downloading tracks type DownloadRequest struct { - ISRC string `json:"isrc"` - Service string `json:"service"` - Query string `json:"query,omitempty"` - TrackName string `json:"track_name,omitempty"` - ArtistName string `json:"artist_name,omitempty"` - AlbumName string `json:"album_name,omitempty"` - ApiURL string `json:"api_url,omitempty"` - OutputDir string `json:"output_dir,omitempty"` - AudioFormat string `json:"audio_format,omitempty"` - FilenameFormat string `json:"filename_format,omitempty"` - TrackNumber bool `json:"track_number,omitempty"` - Position int `json:"position,omitempty"` // Position in playlist/album (1-based) + ISRC string `json:"isrc"` + Service string `json:"service"` + Query string `json:"query,omitempty"` + TrackName string `json:"track_name,omitempty"` + ArtistName string `json:"artist_name,omitempty"` + AlbumName string `json:"album_name,omitempty"` + ApiURL string `json:"api_url,omitempty"` + OutputDir string `json:"output_dir,omitempty"` + AudioFormat string `json:"audio_format,omitempty"` + FilenameFormat string `json:"filename_format,omitempty"` + TrackNumber bool `json:"track_number,omitempty"` + Position int `json:"position,omitempty"` // Position in playlist/album (1-based) + UseAlbumTrackNumber bool `json:"use_album_track_number,omitempty"` // Use album track number instead of playlist position } // DownloadResponse represents the response structure for download operations type DownloadResponse struct { - Success bool `json:"success"` - Message string `json:"message"` - File string `json:"file,omitempty"` - Error string `json:"error,omitempty"` + Success bool `json:"success"` + Message string `json:"message"` + File string `json:"file,omitempty"` + Error string `json:"error,omitempty"` + AlreadyExists bool `json:"already_exists,omitempty"` } // GetSpotifyMetadata fetches metadata from Spotify @@ -114,6 +119,21 @@ func (a *App) DownloadTrack(req DownloadRequest) (DownloadResponse, error) { req.FilenameFormat = "title-artist" } + // Early check: if we have track metadata, check if file already exists + if req.TrackName != "" && req.ArtistName != "" { + expectedFilename := backend.BuildExpectedFilename(req.TrackName, req.ArtistName, req.FilenameFormat, req.TrackNumber, req.Position, req.UseAlbumTrackNumber) + expectedPath := filepath.Join(req.OutputDir, expectedFilename) + + if fileInfo, err := os.Stat(expectedPath); err == nil && fileInfo.Size() > 0 { + return DownloadResponse{ + Success: true, + Message: "File already exists", + File: expectedPath, + AlreadyExists: true, + }, nil + } + } + // Set downloading state backend.SetDownloading(true) defer backend.SetDownloading(false) @@ -126,23 +146,17 @@ func (a *App) DownloadTrack(req DownloadRequest) (DownloadResponse, error) { if req.ApiURL == "" || req.ApiURL == "auto" { downloader := backend.NewTidalDownloader("") - filename, err = downloader.DownloadWithFallback(searchQuery, req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName) + filename, err = downloader.DownloadWithFallback(searchQuery, req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName, req.UseAlbumTrackNumber) } else { downloader := backend.NewTidalDownloader(req.ApiURL) - filename, err = downloader.Download(searchQuery, req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName) + filename, err = downloader.Download(searchQuery, req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName, req.UseAlbumTrackNumber) } } else if req.Service == "qobuz" { downloader := backend.NewQobuzDownloader() - err = downloader.DownloadByISRC(req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName) - if err == nil { - filename = "Downloaded via Qobuz" - } + filename, err = downloader.DownloadByISRC(req.ISRC, req.OutputDir, req.AudioFormat, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName, req.UseAlbumTrackNumber) } else { downloader := backend.NewDeezerDownloader() - err = downloader.DownloadByISRC(req.ISRC, req.OutputDir, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName) - if err == nil { - filename = "Downloaded via Deezer" - } + filename, err = downloader.DownloadByISRC(req.ISRC, req.OutputDir, req.FilenameFormat, req.TrackNumber, req.Position, req.TrackName, req.ArtistName, req.AlbumName, req.UseAlbumTrackNumber) } if err != nil { @@ -152,10 +166,23 @@ func (a *App) DownloadTrack(req DownloadRequest) (DownloadResponse, error) { }, err } + // Check if file already existed + alreadyExists := false + if strings.HasPrefix(filename, "EXISTS:") { + alreadyExists = true + filename = strings.TrimPrefix(filename, "EXISTS:") + } + + message := "Download completed successfully" + if alreadyExists { + message = "File already exists" + } + return DownloadResponse{ - Success: true, - Message: "Download completed successfully", - File: filename, + Success: true, + Message: message, + File: filename, + AlreadyExists: alreadyExists, }, nil } diff --git a/backend/deezer.go b/backend/deezer.go index a861cbb..224a574 100644 --- a/backend/deezer.go +++ b/backend/deezer.go @@ -8,7 +8,6 @@ import ( "net/http" "os" "path/filepath" - "regexp" "strings" "time" ) @@ -162,17 +161,7 @@ func (d *DeezerDownloader) DownloadCoverArt(coverURL, filepath string) error { return err } -func sanitizeFilename(name string) string { - re := regexp.MustCompile(`[<>:"/\\|?*]`) - sanitized := re.ReplaceAllString(name, "_") - sanitized = strings.TrimSpace(sanitized) - if sanitized == "" { - return "Unknown" - } - return sanitized -} - -func buildFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int) string { +func buildFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int, useAlbumTrackNumber bool) string { var filename string // Build base filename based on format @@ -186,20 +175,24 @@ func buildFilename(title, artist string, trackNumber int, format string, include } // Add track number prefix if enabled - // Only use track number for bulk downloads (when position > 0) if includeTrackNumber && position > 0 { - filename = fmt.Sprintf("%02d. %s", position, filename) + // Use album track number if in album folder structure, otherwise use playlist position + numberToUse := position + if useAlbumTrackNumber && trackNumber > 0 { + numberToUse = trackNumber + } + filename = fmt.Sprintf("%02d. %s", numberToUse, filename) } return filename + ".flac" } -func (d *DeezerDownloader) DownloadByISRC(isrc, outputDir, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string) error { +func (d *DeezerDownloader) DownloadByISRC(isrc, outputDir, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string, useAlbumTrackNumber bool) (string, error) { fmt.Printf("Fetching track info for ISRC: %s\n", isrc) track, err := d.GetTrackByISRC(isrc) if err != nil { - return err + return "", err } // Use Spotify metadata if provided, otherwise fallback to Deezer metadata @@ -235,19 +228,24 @@ func (d *DeezerDownloader) DownloadByISRC(isrc, outputDir, filenameFormat string downloadURL, err := d.GetDownloadURL(track.ID) if err != nil { - return err + return "", err } safeArtist := sanitizeFilename(artists) safeTitle := sanitizeFilename(trackTitle) // Build filename based on format settings - filename := buildFilename(safeTitle, safeArtist, track.TrackPos, filenameFormat, includeTrackNumber, position) + filename := buildFilename(safeTitle, safeArtist, track.TrackPos, filenameFormat, includeTrackNumber, position, useAlbumTrackNumber) filepath := filepath.Join(outputDir, filename) + if fileInfo, err := os.Stat(filepath); err == nil && fileInfo.Size() > 0 { + fmt.Printf("File already exists: %s (%.2f MB)\n", filepath, float64(fileInfo.Size())/(1024*1024)) + return "EXISTS:" + filepath, nil + } + fmt.Println("Downloading FLAC file...") if err := d.DownloadFile(downloadURL, filepath); err != nil { - return err + return "", err } fmt.Printf("Downloaded: %s\n", filepath) @@ -264,10 +262,14 @@ func (d *DeezerDownloader) DownloadByISRC(isrc, outputDir, filenameFormat string } fmt.Println("Embedding metadata and cover art...") - // Only use track number for bulk downloads (when position > 0) + // Use album track number if in album folder structure, otherwise use playlist position trackNumberToEmbed := 0 if position > 0 { - trackNumberToEmbed = position + if useAlbumTrackNumber && track.TrackPos > 0 { + trackNumberToEmbed = track.TrackPos + } else { + trackNumberToEmbed = position + } } metadata := Metadata{ @@ -281,9 +283,9 @@ func (d *DeezerDownloader) DownloadByISRC(isrc, outputDir, filenameFormat string } if err := EmbedMetadata(filepath, metadata, coverPath); err != nil { - return fmt.Errorf("failed to embed metadata: %w", err) + return "", fmt.Errorf("failed to embed metadata: %w", err) } fmt.Println("Metadata embedded successfully!") - return nil + return filepath, nil } diff --git a/backend/filename.go b/backend/filename.go new file mode 100644 index 0000000..d635525 --- /dev/null +++ b/backend/filename.go @@ -0,0 +1,46 @@ +package backend + +import ( + "fmt" + "regexp" + "strings" +) + +// BuildExpectedFilename builds the expected filename based on track metadata and settings +func BuildExpectedFilename(trackName, artistName, filenameFormat string, includeTrackNumber bool, position int, useAlbumTrackNumber bool) string { + // Sanitize track name and artist name + safeTitle := sanitizeFilename(trackName) + safeArtist := sanitizeFilename(artistName) + + var filename string + + // Build base filename based on format + switch filenameFormat { + case "artist-title": + filename = fmt.Sprintf("%s - %s", safeArtist, safeTitle) + case "title": + filename = safeTitle + default: // "title-artist" + filename = fmt.Sprintf("%s - %s", safeTitle, safeArtist) + } + + // Add track number prefix if enabled + // Note: We can't determine the exact track number without fetching from API + // So we only add it if position > 0 (bulk download) + if includeTrackNumber && position > 0 { + filename = fmt.Sprintf("%02d. %s", position, filename) + } + + return filename + ".flac" +} + +// sanitizeFilename removes invalid characters from filename +func sanitizeFilename(name string) string { + re := regexp.MustCompile(`[<>:"/\\|?*]`) + sanitized := re.ReplaceAllString(name, "_") + sanitized = strings.TrimSpace(sanitized) + if sanitized == "" { + return "Unknown" + } + return sanitized +} diff --git a/backend/qobuz.go b/backend/qobuz.go index 474e2b3..7a46049 100644 --- a/backend/qobuz.go +++ b/backend/qobuz.go @@ -222,7 +222,7 @@ func (q *QobuzDownloader) DownloadCoverArt(coverURL, filepath string) error { return err } -func buildQobuzFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int) string { +func buildQobuzFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int, useAlbumTrackNumber bool) string { var filename string // Build base filename based on format @@ -236,27 +236,31 @@ func buildQobuzFilename(title, artist string, trackNumber int, format string, in } // Add track number prefix if enabled - // Only use track number for bulk downloads (when position > 0) if includeTrackNumber && position > 0 { - filename = fmt.Sprintf("%02d. %s", position, filename) + // Use album track number if in album folder structure, otherwise use playlist position + numberToUse := position + if useAlbumTrackNumber && trackNumber > 0 { + numberToUse = trackNumber + } + filename = fmt.Sprintf("%02d. %s", numberToUse, filename) } return filename + ".flac" } -func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string) error { +func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string, useAlbumTrackNumber bool) (string, error) { fmt.Printf("Fetching track info for ISRC: %s\n", isrc) // Create output directory if it doesn't exist if outputDir != "." { if err := os.MkdirAll(outputDir, 0755); err != nil { - return fmt.Errorf("failed to create output directory: %w", err) + return "", fmt.Errorf("failed to create output directory: %w", err) } } track, err := q.SearchByISRC(isrc) if err != nil { - return err + return "", err } // Use Spotify metadata if provided, otherwise fallback to Qobuz metadata @@ -294,11 +298,11 @@ func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameForma fmt.Println("Getting download URL...") downloadURL, err := q.GetDownloadURL(track.ID, quality) if err != nil { - return fmt.Errorf("failed to get download URL: %w", err) + return "", fmt.Errorf("failed to get download URL: %w", err) } if downloadURL == "" { - return fmt.Errorf("received empty download URL") + return "", fmt.Errorf("received empty download URL") } // Show partial URL for security @@ -312,12 +316,17 @@ func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameForma safeTitle := sanitizeFilename(trackTitle) // Build filename based on format settings - filename := buildQobuzFilename(safeTitle, safeArtist, track.TrackNumber, filenameFormat, includeTrackNumber, position) + filename := buildQobuzFilename(safeTitle, safeArtist, track.TrackNumber, filenameFormat, includeTrackNumber, position, useAlbumTrackNumber) filepath := filepath.Join(outputDir, filename) + if fileInfo, err := os.Stat(filepath); err == nil && fileInfo.Size() > 0 { + fmt.Printf("File already exists: %s (%.2f MB)\n", filepath, float64(fileInfo.Size())/(1024*1024)) + return "EXISTS:" + filepath, nil + } + fmt.Printf("Downloading FLAC file to: %s\n", filepath) if err := q.DownloadFile(downloadURL, filepath); err != nil { - return fmt.Errorf("failed to download file: %w", err) + return "", fmt.Errorf("failed to download file: %w", err) } fmt.Printf("Downloaded: %s\n", filepath) @@ -340,10 +349,14 @@ func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameForma releaseYear = track.ReleaseDateOriginal[:4] } - // Only use track number for bulk downloads (when position > 0) + // Use album track number if in album folder structure, otherwise use playlist position trackNumberToEmbed := 0 if position > 0 { - trackNumberToEmbed = position + if useAlbumTrackNumber && track.TrackNumber > 0 { + trackNumberToEmbed = track.TrackNumber + } else { + trackNumberToEmbed = position + } } metadata := Metadata{ @@ -357,9 +370,9 @@ func (q *QobuzDownloader) DownloadByISRC(isrc, outputDir, quality, filenameForma } if err := EmbedMetadata(filepath, metadata, coverPath); err != nil { - return fmt.Errorf("failed to embed metadata: %w", err) + return "", fmt.Errorf("failed to embed metadata: %w", err) } fmt.Println("Metadata embedded successfully!") - return nil + return filepath, nil } diff --git a/backend/spotify_metadata.go b/backend/spotify_metadata.go index 3c11ada..9873791 100644 --- a/backend/spotify_metadata.go +++ b/backend/spotify_metadata.go @@ -29,7 +29,7 @@ const ( trackBaseURL = "https://api.spotify.com/v1/tracks/%s" artistBaseURL = "https://api.spotify.com/v1/artists/%s" artistAlbumsBaseURL = "https://api.spotify.com/v1/artists/%s/albums" - secretBytesRemotePath = "https://raw.githubusercontent.com/afkarxyz/secretBytes/refs/heads/main/secrets/secretBytes.json" + secretBytesRemotePath = "https://cdn.jsdelivr.net/gh/afkarxyz/secretBytes@refs/heads/main/secrets/secretBytes.json" ) var ( @@ -873,8 +873,16 @@ func (c *SpotifyMetadataClient) generateTOTP(ctx context.Context) (string, int64 } func (c *SpotifyMetadataClient) fetchSecretBytes(ctx context.Context) ([]secretEntry, bool, error) { - req, err := http.NewRequestWithContext(ctx, http.MethodGet, secretBytesRemotePath, nil) + // Add cache busting parameter with current timestamp + urlWithCacheBust := fmt.Sprintf("%s?t=%d", secretBytesRemotePath, time.Now().Unix()) + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, urlWithCacheBust, nil) if err == nil { + // Add headers to bypass cache + req.Header.Set("Cache-Control", "no-cache, no-store, must-revalidate") + req.Header.Set("Pragma", "no-cache") + req.Header.Set("Expires", "0") + resp, err := c.httpClient.Do(req) if err == nil { body, readErr := io.ReadAll(resp.Body) diff --git a/backend/tidal.go b/backend/tidal.go index 9c22a6b..b2b5a49 100644 --- a/backend/tidal.go +++ b/backend/tidal.go @@ -333,7 +333,7 @@ func (t *TidalDownloader) DownloadFile(url, filepath string) error { return nil } -func (t *TidalDownloader) Download(query, isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string) (string, error) { +func (t *TidalDownloader) Download(query, isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string, useAlbumTrackNumber bool) (string, error) { if outputDir != "." { if err := os.MkdirAll(outputDir, 0755); err != nil { return "", fmt.Errorf("directory error: %w", err) @@ -386,12 +386,12 @@ func (t *TidalDownloader) Download(query, isrc, outputDir, quality, filenameForm } // Build filename based on format settings - filename := buildTidalFilename(trackTitle, artistName, trackInfo.TrackNumber, filenameFormat, includeTrackNumber, position) + filename := buildTidalFilename(trackTitle, artistName, trackInfo.TrackNumber, filenameFormat, includeTrackNumber, position, useAlbumTrackNumber) outputFilename := filepath.Join(outputDir, filename) if fileInfo, err := os.Stat(outputFilename); err == nil && fileInfo.Size() > 0 { fmt.Printf("File already exists: %s (%.2f MB)\n", outputFilename, float64(fileInfo.Size())/(1024*1024)) - return outputFilename, nil + return "EXISTS:" + outputFilename, nil } downloadURL, err := t.GetDownloadURL(trackInfo.ID, quality) @@ -427,10 +427,14 @@ func (t *TidalDownloader) Download(query, isrc, outputDir, quality, filenameForm releaseYear = trackInfo.Album.ReleaseDate[:4] } - // Only use track number for bulk downloads (when position > 0) + // Use album track number if in album folder structure, otherwise use playlist position trackNumberToEmbed := 0 if position > 0 { - trackNumberToEmbed = position + if useAlbumTrackNumber && trackInfo.TrackNumber > 0 { + trackNumberToEmbed = trackInfo.TrackNumber + } else { + trackNumberToEmbed = position + } } metadata := Metadata{ @@ -453,7 +457,7 @@ func (t *TidalDownloader) Download(query, isrc, outputDir, quality, filenameForm return outputFilename, nil } -func (t *TidalDownloader) DownloadWithFallback(query, isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string) (string, error) { +func (t *TidalDownloader) DownloadWithFallback(query, isrc, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName string, useAlbumTrackNumber bool) (string, error) { apis, err := t.GetAvailableAPIs() if err != nil { return "", fmt.Errorf("no APIs available for fallback: %w", err) @@ -465,7 +469,7 @@ func (t *TidalDownloader) DownloadWithFallback(query, isrc, outputDir, quality, fallbackDownloader := NewTidalDownloader(apiURL) - result, err := fallbackDownloader.Download(query, isrc, outputDir, quality, filenameFormat, includeTrackNumber, position, spotifyTrackName, spotifyArtistName, spotifyAlbumName) + result, err := fallbackDownloader.Download(query, isrc, outputDir, quality, filenameFormat, includeTrackNumber, position, spotifyTrackName, spotifyArtistName, spotifyAlbumName, useAlbumTrackNumber) if err == nil { fmt.Printf("✓ Success with: %s\n", apiURL) return result, nil @@ -482,7 +486,7 @@ func (t *TidalDownloader) DownloadWithFallback(query, isrc, outputDir, quality, return "", fmt.Errorf("all %d APIs failed. Last error: %v", len(apis), lastError) } -func buildTidalFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int) string { +func buildTidalFilename(title, artist string, trackNumber int, format string, includeTrackNumber bool, position int, useAlbumTrackNumber bool) string { var filename string // Build base filename based on format @@ -496,9 +500,13 @@ func buildTidalFilename(title, artist string, trackNumber int, format string, in } // Add track number prefix if enabled - // Only use track number for bulk downloads (when position > 0) if includeTrackNumber && position > 0 { - filename = fmt.Sprintf("%02d. %s", position, filename) + // Use album track number if in album folder structure, otherwise use playlist position + numberToUse := position + if useAlbumTrackNumber && trackNumber > 0 { + numberToUse = trackNumber + } + filename = fmt.Sprintf("%02d. %s", numberToUse, filename) } return filename + ".flac" diff --git a/frontend/package.json b/frontend/package.json index f41f77e..73b4e02 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-label": "^2.1.8", "@radix-ui/react-progress": "^1.1.8", diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 800e711..b96d780 100644 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -e00813ca84dd3deaade9854c0df093cd \ No newline at end of file +72728e016fdcbb66d395ba3a681b8945 \ No newline at end of file diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 9bd95aa..7ef570e 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@radix-ui/react-checkbox': specifier: ^1.3.3 version: 1.3.3(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-context-menu': + specifier: ^2.2.16 + version: 2.2.16(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-dialog': specifier: ^1.1.15 version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) @@ -641,6 +644,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-context-menu@2.2.16': + resolution: {integrity: sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-context@1.1.2': resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: @@ -738,6 +754,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-menu@2.1.16': + resolution: {integrity: sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-popper@1.2.8': resolution: {integrity: sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==} peerDependencies: @@ -2479,6 +2508,20 @@ snapshots: optionalDependencies: '@types/react': 19.2.6 + '@radix-ui/react-context-menu@2.2.16(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-context': 1.1.2(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-menu': 2.1.16(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.6)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + optionalDependencies: + '@types/react': 19.2.6 + '@types/react-dom': 19.2.3(@types/react@19.2.6) + '@radix-ui/react-context@1.1.2(@types/react@19.2.6)(react@19.2.0)': dependencies: react: 19.2.0 @@ -2565,6 +2608,32 @@ snapshots: '@types/react': 19.2.6 '@types/react-dom': 19.2.3(@types/react@19.2.6) + '@radix-ui/react-menu@2.1.16(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.6)(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.6)(react@19.2.0) + aria-hidden: 1.2.6 + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + react-remove-scroll: 2.7.1(@types/react@19.2.6)(react@19.2.0) + optionalDependencies: + '@types/react': 19.2.6 + '@types/react-dom': 19.2.3(@types/react@19.2.6) + '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.6))(@types/react@19.2.6)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@floating-ui/react-dom': 2.1.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 60eafdf..3b78a7b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -40,7 +40,7 @@ function App() { const [hasUpdate, setHasUpdate] = useState(false); const ITEMS_PER_PAGE = 50; - const CURRENT_VERSION = "5.8"; + const CURRENT_VERSION = "5.9"; const download = useDownload(); const metadata = useMetadata(); @@ -307,7 +307,7 @@ function App() { Cancel @@ -333,7 +333,7 @@ function App() { Cancel diff --git a/frontend/src/components/AlbumInfo.tsx b/frontend/src/components/AlbumInfo.tsx index 10a385b..dff3e36 100644 --- a/frontend/src/components/AlbumInfo.tsx +++ b/frontend/src/components/AlbumInfo.tsx @@ -91,7 +91,6 @@ export function AlbumInfo({
)} {downloadedTracks.size > 0 && ( - diff --git a/frontend/src/components/ArtistInfo.tsx b/frontend/src/components/ArtistInfo.tsx index 0d758db..4da3dda 100644 --- a/frontend/src/components/ArtistInfo.tsx +++ b/frontend/src/components/ArtistInfo.tsx @@ -146,7 +146,6 @@ export function ArtistInfo({ )} {downloadedTracks.size > 0 && ( - diff --git a/frontend/src/components/DownloadProgressToast.tsx b/frontend/src/components/DownloadProgressToast.tsx index 4cac862..289d145 100644 --- a/frontend/src/components/DownloadProgressToast.tsx +++ b/frontend/src/components/DownloadProgressToast.tsx @@ -13,12 +13,12 @@ export function DownloadProgressToast() {
-
-

+

+

{progress.mb_downloaded.toFixed(2)} MB

{progress.speed_mbps > 0 && ( -

+

{progress.speed_mbps.toFixed(2)} MB/s

)} diff --git a/frontend/src/components/PlaylistInfo.tsx b/frontend/src/components/PlaylistInfo.tsx index bc4a42d..f020648 100644 --- a/frontend/src/components/PlaylistInfo.tsx +++ b/frontend/src/components/PlaylistInfo.tsx @@ -97,7 +97,6 @@ export function PlaylistInfo({
)} {downloadedTracks.size > 0 && ( - diff --git a/frontend/src/components/SearchBar.tsx b/frontend/src/components/SearchBar.tsx index 81e2fbf..b2504e8 100644 --- a/frontend/src/components/SearchBar.tsx +++ b/frontend/src/components/SearchBar.tsx @@ -1,5 +1,5 @@ import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; +import { InputWithContext } from "@/components/ui/input-with-context"; import { Card, CardContent } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; import { Search, Info, XCircle } from "lucide-react"; @@ -35,7 +35,7 @@ export function SearchBar({ url, loading, onUrlChange, onFetch }: SearchBarProps
-
- handleDownloadPathChange(e.target.value)} @@ -329,8 +329,8 @@ export function Settings() { - -

Adds track numbers based on the order in the album, playlist, or discography list

+ +

Adds track numbers to filenames. Uses album track numbers when Album Subfolder is enabled, otherwise uses playlist position

@@ -340,7 +340,7 @@ export function Settings() { checked={tempSettings.artistSubfolder} onCheckedChange={(checked) => setTempSettings(prev => ({ ...prev, artistSubfolder: checked as boolean }))} /> - +
setTempSettings(prev => ({ ...prev, albumSubfolder: checked as boolean }))} /> - +
diff --git a/frontend/src/components/TitleBar.tsx b/frontend/src/components/TitleBar.tsx index 19f7561..f5a45f2 100644 --- a/frontend/src/components/TitleBar.tsx +++ b/frontend/src/components/TitleBar.tsx @@ -18,43 +18,53 @@ export function TitleBar() { }; return ( -
- - - -
+ <> + {/* Draggable area */} +
+ + {/* Window control buttons */} +
+ + + +
+ ); } diff --git a/frontend/src/components/TrackInfo.tsx b/frontend/src/components/TrackInfo.tsx index e5d8f4c..f7f9095 100644 --- a/frontend/src/components/TrackInfo.tsx +++ b/frontend/src/components/TrackInfo.tsx @@ -51,7 +51,6 @@ export function TrackInfo({
{isDownloaded && ( - diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsx index 21409a0..4b7a125 100644 --- a/frontend/src/components/ui/button.tsx +++ b/frontend/src/components/ui/button.tsx @@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { variants: { variant: { diff --git a/frontend/src/components/ui/context-menu.tsx b/frontend/src/components/ui/context-menu.tsx new file mode 100644 index 0000000..8c4234d --- /dev/null +++ b/frontend/src/components/ui/context-menu.tsx @@ -0,0 +1,252 @@ +"use client" + +import * as React from "react" +import * as ContextMenuPrimitive from "@radix-ui/react-context-menu" +import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function ContextMenu({ + ...props +}: React.ComponentProps) { + return +} + +function ContextMenuTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuGroup({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuSub({ + ...props +}: React.ComponentProps) { + return +} + +function ContextMenuRadioGroup({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuSubTrigger({ + className, + inset, + children, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + {children} + + + ) +} + +function ContextMenuSubContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function ContextMenuItem({ + className, + inset, + variant = "default", + ...props +}: React.ComponentProps & { + inset?: boolean + variant?: "default" | "destructive" +}) { + return ( + + ) +} + +function ContextMenuCheckboxItem({ + className, + children, + checked, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function ContextMenuRadioItem({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function ContextMenuLabel({ + className, + inset, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + ) +} + +function ContextMenuSeparator({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuShortcut({ + className, + ...props +}: React.ComponentProps<"span">) { + return ( + + ) +} + +export { + ContextMenu, + ContextMenuTrigger, + ContextMenuContent, + ContextMenuItem, + ContextMenuCheckboxItem, + ContextMenuRadioItem, + ContextMenuLabel, + ContextMenuSeparator, + ContextMenuShortcut, + ContextMenuGroup, + ContextMenuPortal, + ContextMenuSub, + ContextMenuSubContent, + ContextMenuSubTrigger, + ContextMenuRadioGroup, +} diff --git a/frontend/src/components/ui/input-with-context.tsx b/frontend/src/components/ui/input-with-context.tsx new file mode 100644 index 0000000..37c3ca4 --- /dev/null +++ b/frontend/src/components/ui/input-with-context.tsx @@ -0,0 +1,214 @@ +import * as React from "react"; +import { Input } from "@/components/ui/input"; +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuSeparator, + ContextMenuTrigger, +} from "@/components/ui/context-menu"; +import { Scissors, Copy, Clipboard, Type } from "lucide-react"; + +export interface InputWithContextProps + extends React.InputHTMLAttributes { + onValueChange?: (value: string) => void; +} + +const InputWithContext = React.forwardRef( + ({ className, type, onValueChange, onChange, ...props }, ref) => { + const inputRef = React.useRef(null); + const [hasSelection, setHasSelection] = React.useState(false); + const [canPaste, setCanPaste] = React.useState(false); + + // Combine refs + React.useImperativeHandle(ref, () => inputRef.current as HTMLInputElement); + + // Check selection state + const updateSelectionState = () => { + const input = inputRef.current; + if (!input) return; + const start = input.selectionStart ?? 0; + const end = input.selectionEnd ?? 0; + setHasSelection(start !== end); + }; + + // Check clipboard permission + const checkClipboard = async () => { + try { + const text = await navigator.clipboard.readText(); + setCanPaste(text.length > 0); + } catch { + setCanPaste(false); + } + }; + + React.useEffect(() => { + checkClipboard(); + }, []); + + const handleCut = async () => { + const input = inputRef.current; + if (!input) return; + + const start = input.selectionStart ?? 0; + const end = input.selectionEnd ?? 0; + const selectedText = input.value.substring(start, end); + + if (selectedText) { + try { + await navigator.clipboard.writeText(selectedText); + const newValue = input.value.substring(0, start) + input.value.substring(end); + + // Update value and trigger change + input.value = newValue; + input.setSelectionRange(start, start); + + // Trigger React onChange + if (onChange) { + const event = { + target: input, + currentTarget: input, + } as React.ChangeEvent; + onChange(event); + } + + if (onValueChange) { + onValueChange(newValue); + } + + input.focus(); + } catch (err) { + console.error("Failed to cut:", err); + } + } + }; + + const handleCopy = async () => { + const input = inputRef.current; + if (!input) return; + + const start = input.selectionStart ?? 0; + const end = input.selectionEnd ?? 0; + const selectedText = input.value.substring(start, end); + + if (selectedText) { + try { + await navigator.clipboard.writeText(selectedText); + input.focus(); + } catch (err) { + console.error("Failed to copy:", err); + } + } + }; + + const handlePaste = async () => { + const input = inputRef.current; + if (!input) return; + + try { + const text = await navigator.clipboard.readText(); + const start = input.selectionStart ?? 0; + const end = input.selectionEnd ?? 0; + + const newValue = + input.value.substring(0, start) + text + input.value.substring(end); + + // Update value and trigger change + input.value = newValue; + const newPosition = start + text.length; + input.setSelectionRange(newPosition, newPosition); + + // Trigger React onChange + if (onChange) { + const event = { + target: input, + currentTarget: input, + } as React.ChangeEvent; + onChange(event); + } + + if (onValueChange) { + onValueChange(newValue); + } + + input.focus(); + await checkClipboard(); + } catch (err) { + console.error("Failed to paste:", err); + } + }; + + const handleSelectAll = () => { + const input = inputRef.current; + if (!input) return; + input.select(); + input.focus(); + updateSelectionState(); + }; + + const handleInputChange = (e: React.ChangeEvent) => { + if (onChange) { + onChange(e); + } + if (onValueChange) { + onValueChange(e.target.value); + } + }; + + return ( + + + + + + + + Cut + Ctrl+X + + + + Copy + Ctrl+C + + + + Paste + Ctrl+V + + + + + Select All + Ctrl+A + + + + ); + } +); + +InputWithContext.displayName = "InputWithContext"; + +export { InputWithContext }; diff --git a/frontend/src/hooks/useDownload.ts b/frontend/src/hooks/useDownload.ts index 4c7c322..c9afb1d 100644 --- a/frontend/src/hooks/useDownload.ts +++ b/frontend/src/hooks/useDownload.ts @@ -33,6 +33,7 @@ export function useDownload() { const os = settings.operatingSystem; let outputDir = settings.downloadPath; + let useAlbumTrackNumber = false; if (playlistName) { outputDir = joinPath(os, outputDir, sanitizePath(playlistName, os)); @@ -40,6 +41,7 @@ export function useDownload() { if (isArtistDiscography) { if (settings.albumSubfolder && albumName) { outputDir = joinPath(os, outputDir, sanitizePath(albumName, os)); + useAlbumTrackNumber = true; // Use album track number for discography with album subfolder } } else { if (settings.artistSubfolder && artistName) { @@ -48,6 +50,7 @@ export function useDownload() { if (settings.albumSubfolder && albumName) { outputDir = joinPath(os, outputDir, sanitizePath(albumName, os)); + useAlbumTrackNumber = true; // Use album track number when both artist and album subfolders are used } } } @@ -66,6 +69,7 @@ export function useDownload() { filename_format: settings.filenameFormat, track_number: settings.trackNumber, position, + use_album_track_number: useAlbumTrackNumber, }); if (tidalResponse.success) { @@ -88,6 +92,7 @@ export function useDownload() { filename_format: settings.filenameFormat, track_number: settings.trackNumber, position, + use_album_track_number: useAlbumTrackNumber, }); if (deezerResponse.success) { @@ -112,6 +117,7 @@ export function useDownload() { filename_format: settings.filenameFormat, track_number: settings.trackNumber, position, + use_album_track_number: useAlbumTrackNumber, }); }; @@ -143,7 +149,11 @@ export function useDownload() { ); if (response.success) { - toast.success(response.message); + if (response.already_exists) { + toast.info(response.message); + } else { + toast.success(response.message); + } setDownloadedTracks((prev) => new Set(prev).add(isrc)); } else { toast.error(response.error || "Download failed"); diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index f1c75e1..94db4ce 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -7,6 +7,6 @@ import { Toaster } from '@/components/ui/sonner' createRoot(document.getElementById('root')!).render( - + , ) diff --git a/frontend/src/types/api.ts b/frontend/src/types/api.ts index 6daffd1..54c2eab 100644 --- a/frontend/src/types/api.ts +++ b/frontend/src/types/api.ts @@ -109,6 +109,7 @@ export interface DownloadRequest { filename_format?: string; track_number?: boolean; position?: number; + use_album_track_number?: boolean; } export interface DownloadResponse { @@ -116,6 +117,7 @@ export interface DownloadResponse { message: string; file?: string; error?: string; + already_exists?: boolean; } export interface HealthResponse { diff --git a/main.go b/main.go index 5cd2e96..acc1baf 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,8 @@ func main() { Title: "SpotiFLAC", Width: 1024, Height: 600, + MinWidth: 1024, + MinHeight: 600, Frameless: true, AssetServer: &assetserver.Options{ Assets: assets, diff --git a/wails.json b/wails.json index 319804b..1f281f6 100644 --- a/wails.json +++ b/wails.json @@ -11,7 +11,7 @@ }, "info": { "productName": "SpotiFLAC", - "productVersion": "5.8" + "productVersion": "5.9" }, "wailsjsdir": "./frontend", "assetdir": "./frontend/dist",