chore(frontend): remove live song-list refresh during S3 sync per request; refresh now only on manual actions/page reload
This commit is contained in:
parent
482460a8b7
commit
83b4682b0e
@ -128,8 +128,7 @@ const RekordboxReader: React.FC = () => {
|
|||||||
totalDuration,
|
totalDuration,
|
||||||
loadNextPage,
|
loadNextPage,
|
||||||
searchSongs,
|
searchSongs,
|
||||||
searchQuery,
|
searchQuery
|
||||||
refresh
|
|
||||||
} = usePaginatedSongs({ pageSize: 100, playlistName: currentPlaylist });
|
} = usePaginatedSongs({ pageSize: 100, playlistName: currentPlaylist });
|
||||||
|
|
||||||
// Export library to XML
|
// Export library to XML
|
||||||
@ -661,12 +660,7 @@ const RekordboxReader: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Background Job Progress */}
|
{/* Background Job Progress */}
|
||||||
<BackgroundJobProgress
|
<BackgroundJobProgress />
|
||||||
onTickWhileS3Sync={() => {
|
|
||||||
// Light refresh to pick up newly set hasS3File flags promptly
|
|
||||||
refresh();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -45,15 +45,12 @@ interface BackgroundJobProgressProps {
|
|||||||
jobId?: string;
|
jobId?: string;
|
||||||
onJobComplete?: (result: any) => void;
|
onJobComplete?: (result: any) => void;
|
||||||
onJobError?: (error: string) => void;
|
onJobError?: (error: string) => void;
|
||||||
// Called on each polling tick while an S3 sync job is running
|
|
||||||
onTickWhileS3Sync?: () => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BackgroundJobProgress: React.FC<BackgroundJobProgressProps> = ({
|
export const BackgroundJobProgress: React.FC<BackgroundJobProgressProps> = ({
|
||||||
jobId,
|
jobId,
|
||||||
onJobComplete,
|
onJobComplete,
|
||||||
onJobError,
|
onJobError,
|
||||||
onTickWhileS3Sync,
|
|
||||||
}) => {
|
}) => {
|
||||||
const [jobs, setJobs] = useState<JobProgress[]>([]);
|
const [jobs, setJobs] = useState<JobProgress[]>([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@ -113,11 +110,6 @@ export const BackgroundJobProgress: React.FC<BackgroundJobProgressProps> = ({
|
|||||||
if (jobId) {
|
if (jobId) {
|
||||||
updateJobProgress(jobId);
|
updateJobProgress(jobId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify consumer while an S3 sync is running (to refresh song list, etc.)
|
|
||||||
if (onTickWhileS3Sync && activeJobs.some(j => j.type === 's3-sync')) {
|
|
||||||
onTickWhileS3Sync();
|
|
||||||
}
|
|
||||||
}, 2000); // Poll every 2 seconds for less frequent updates
|
}, 2000); // Poll every 2 seconds for less frequent updates
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user