Skip to content

Commit dd463a9

Browse files
committed
refactor: 清理未使用代码
1 parent 8acd496 commit dd463a9

19 files changed

Lines changed: 5 additions & 103 deletions

‎src/main/curatedLibrarySync/engine.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ let resumeWaiters: Array<() => void> = []
9393
let powerMonitorBound = false
9494
let sessionFailures: CuratedLibrarySyncFailureItem[] = []
9595
let sessionConflicts: CuratedLibrarySyncConflictItem[] = []
96-
let sessionAttemptedTransfers = false
9796
let sessionCompletedWork = false
9897

9998
const bindPowerMonitor = () => {
@@ -299,7 +298,6 @@ const uploadMissingBlobs = async (files: CuratedLocalFile[]): Promise<Set<string
299298
const seen = new Set<string>()
300299
const failed = new Set<string>()
301300
let index = 0
302-
sessionAttemptedTransfers = true
303301
for (const file of files) {
304302
throwIfCancelled()
305303
await waitIfSuspended()
@@ -567,7 +565,6 @@ const waitForFirstSnapshotUnlock = async (): Promise<
567565
const applyCtx = (): ApplyRemoteContext => ({
568566
signal: abortController?.signal || new AbortController().signal,
569567
onTransferFailure: (payload) => {
570-
sessionAttemptedTransfers = true
571568
recordFailure({
572569
direction: payload.direction,
573570
name: payload.name,
@@ -903,7 +900,6 @@ export const runCuratedLibrarySync = async (
903900
abortController = new AbortController()
904901
sessionFailures = []
905902
sessionConflicts = []
906-
sessionAttemptedTransfers = false
907903
sessionCompletedWork = false
908904
try {
909905
dismissProgress()

‎src/main/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ if (devInstanceLock) {
311311
process.on('exit', releaseDevInstanceLock)
312312
}
313313

314-
const platform = process.platform
315314
const ffmpegPath = resolveBundledFfmpegPath()
316315
process.env.FRKB_FFMPEG_PATH = ffmpegPath
317316
void ensureExecutableOnMac(ffmpegPath)

‎src/main/ipc/playlistHandlers.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ import { prepareExternalPlaybackPlaylistAnalysis } from '../services/pioneerDevi
4242
import type {
4343
IBatchRenameExecutionRequestItem,
4444
IBatchRenameTemplateSegment,
45-
IBatchRenameTrackInput,
46-
ISongInfo
45+
IBatchRenameTrackInput
4746
} from '../../types/globals'
4847
import { assertLibraryMergeMutationAllowed } from '../services/libraryMerge/runtime'
4948

‎src/main/ipc/rekordboxDesktopLibraryHandlers.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ import type {
5858
RekordboxDesktopCopyTracksToStorageResponse
5959
} from '../../shared/rekordboxDesktopPlaylist'
6060
import type { RekordboxDesktopCleanupCopiedTracksRequest } from '../../shared/rekordboxDesktopPlaylist'
61-
import { assertLibraryMergeMutationAllowed } from '../services/libraryMerge/runtime'
6261
import type { IPioneerPlaylistTrack } from '../../types/globals'
6362

6463
export function registerRekordboxDesktopLibraryHandlers() {

‎src/main/librarySetup.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import mainWindow from './window/mainWindow'
2-
import { beginLibrarySetup, getLibrarySetupState, sendLibrarySetupState } from './librarySetupState'
2+
import { beginLibrarySetup, sendLibrarySetupState } from './librarySetupState'
33
import type { LibrarySetupErrorHint, LibrarySetupMode } from '../shared/librarySetup'
44

55
export const openLibrarySetupWindow = (options?: {

‎src/main/services/keyAnalysis/persistence.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import { emitSongGridUpdated } from '../songGridEvents'
2020
import {
2121
createSongBeatGridMapV2FromFixedGrid,
2222
normalizeSongBeatGridDownbeatBeatOffset,
23-
normalizeSongBeatGridMapV2,
24-
projectSongBeatGridMapV2ToFixedGrid
23+
normalizeSongBeatGridMapV2
2524
} from '../../../shared/songBeatGridMapV2'
2625
import { getBeatThisRuntimeAvailabilitySnapshot } from '../../workers/beatThisRuntime'
2726
import {
@@ -42,10 +41,8 @@ import {
4241
normalizeKeyAnalysisAlgorithmVersion
4342
} from '../keyAnalysisAlgorithmVersion'
4443
import {
45-
isValidBpm,
4644
isValidFirstBeatMs,
4745
normalizePath,
48-
type BpmAnalysisResult,
4946
type DoneEntry,
5047
type KeyAnalysisJob,
5148
type KeyAnalysisResult

‎src/main/services/libraryMerge/service.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
LibraryMergeError,
2323
type LibraryMergeOptions,
2424
type LibraryMergePhase,
25-
type LibraryMergeProgress,
2625
type LibraryMergeResult,
2726
type LibraryMergeScope
2827
} from './types'

‎src/main/window/miniPlayerOverlay.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ let latestTooltip: {
4949
source: BrowserWindow
5050
} | null = null
5151
let tooltipMeasuredSize: { width: number; height: number } | null = null
52-
let closingMenuFromBlur = false
5352
let ignoreMenuBlurUntil = 0
5453

5554
const isUsableWindow = (target: BrowserWindow | null): target is BrowserWindow =>
@@ -347,11 +346,7 @@ const ensureOverlayWindow = () => {
347346
overlayWindow.on('blur', () => {
348347
if (!latestOverlay || latestOverlay.state.kind !== 'menu') return
349348
if (Date.now() < ignoreMenuBlurUntil) return
350-
closingMenuFromBlur = true
351349
finishOverlay({ type: 'dismiss' })
352-
setTimeout(() => {
353-
closingMenuFromBlur = false
354-
}, 280)
355350
})
356351
overlayWindow.once('ready-to-show', () => {
357352
if (!latestOverlay || !isUsableWindow(overlayWindow)) return

‎src/main/workers/keyAnalysisWorker.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
buildUnifiedDisplayWaveformDetailFromMixxx,
66
UNIFIED_DISPLAY_WAVEFORM_CACHE_VERSION,
77
UNIFIED_DISPLAY_WAVEFORM_DETAIL_RATE,
8-
UNIFIED_DISPLAY_WAVEFORM_PARAMETER_VERSION,
98
type UnifiedDisplayWaveformDetailData
109
} from '../../shared/unifiedDisplayWaveform'
1110
import {

‎src/renderer/src/composables/horizontalBrowse/horizontalBrowseStableCanvasPresentation.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -399,16 +399,6 @@ export const createHorizontalBrowseStableCanvasPresentationController = (
399399
playbackClock = null
400400
return
401401
}
402-
// Revision handoff keeps the old rendered frame moving with its own viewport math
403-
// until the replacement frame is ready. Applying the new viewport to the old frame
404-
// can exceed overscan for one tick and stop the playback RAF.
405-
const handoffFrame =
406-
canUseRevisionHandoffFrame(currentFrame) && currentFrame ? currentFrame : null
407-
// Revision handoff keeps the old frame's geometry, but its playback position must still
408-
// follow the current presentation clock. The handoff frame can carry a stale playbackRate
409-
// while live tempo preview is reanchoring the clock on every input frame; advancing from
410-
// that stale frame rate makes the stable canvas drift away from render-sync currentSeconds,
411-
// then snap back when the replacement frame is promoted.
412402
const estimatedSeconds = estimatePlaybackSeconds()
413403
const result = apply(estimatedSeconds, {
414404
allowReanchor: true,

0 commit comments

Comments
 (0)