feat(device-sync): USB/SD card sync page (WIP)

Adds a new Device Sync page for transferring music from Navidrome to
USB drives or SD cards. Sidebar entry is hidden by default.

- Four new Tauri commands: sync_track_to_device, compute_sync_paths,
  list_device_dir_files, delete_device_file
- Filename template engine with cross-platform path sanitization
- 4-concurrent-worker download, live progress via device:sync:progress event
- Persistent source list (albums/playlists/artists) with checkbox deletion
- Expandable artist tree in browser panel (per-album selection)
- i18n: DE + EN complete; other locales have stub keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-14 00:02:13 +02:00
parent 58f99ae846
commit 17a5c92174
15 changed files with 1341 additions and 2 deletions
+28
View File
@@ -24,6 +24,7 @@ export const zhTranslation = {
mostPlayed: '最常播放',
radio: '网络电台',
folderBrowser: '文件夹浏览器',
deviceSync: '设备同步',
libraryScope: '资料库范围',
allLibraries: '所有资料库',
expandPlaylists: '展开播放列表',
@@ -1012,4 +1013,31 @@ export const zhTranslation = {
empty: '空文件夹',
error: '加载失败',
},
deviceSync: {
title: '设备同步',
targetFolder: '目标文件夹',
noFolderChosen: '未选择文件夹',
chooseFolder: '选择…',
filenameTemplate: '文件名模板',
templateHint: '变量:{artist}、{album}、{title}、{track_number}、{disc_number}、{year}',
cleanupButton: '删除不在选择范围内的文件',
cleanupNothingToDelete: '无需删除 — 设备已同步。',
confirmCleanup: '将从设备中删除 {{count}} 个不在当前选择范围内的文件。继续?',
cleanupComplete: '已从设备中删除 {{count}} 个文件。',
selectedSources: '已选来源',
noSourcesSelected: '未选择来源。点击浏览器中的项目以添加。',
clearAll: '全部清除',
tabPlaylists: '播放列表',
tabAlbums: '专辑',
tabArtists: '艺术家',
searchPlaceholder: '搜索…',
syncButton: '同步到设备',
cancel: '取消',
noTargetDir: '请先选择目标文件夹。',
noSources: '请至少选择一个来源。',
noTracks: '所选来源中未找到曲目。',
fetchError: '从服务器加载曲目失败。',
syncComplete: '同步完成。',
dismiss: '关闭',
},
};