refactor(lib): move library-index hooks into lib/library/hooks

This commit is contained in:
Psychotoxical
2026-06-30 19:48:49 +02:00
parent 1f93984482
commit 777c72adf7
10 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ import { initMiniPlayerBridgeOnMain } from '@/features/miniPlayer';
import { runAdvancedModeMigration } from '../utils/migrations/advancedModeMigration';
import { bootstrapAllIndexedServers } from '@/lib/library/librarySession';
import { hydrateQueueFromIndex } from '@/features/playback/store/queueRestore';
import { useLibraryAnalysisBackfill } from '../hooks/useLibraryAnalysisBackfill';
import { useLibraryAnalysisBackfill } from '@/lib/library/hooks/useLibraryAnalysisBackfill';
import { useCoverArtPrefetch } from '../cover/useCoverArtPrefetch';
import { useLibraryCoverBackfill } from '../hooks/useLibraryCoverBackfill';
import { useCoverRevalidateScheduler } from '../cover/useCoverRevalidateScheduler';
+1 -1
View File
@@ -21,7 +21,7 @@ import {
ARTIST_LIST_ROW_EST,
} from '@/features/artist/utils/artistsHelpers';
import { useArtistsFiltering } from '@/features/artist/hooks/useArtistsFiltering';
import { useLibraryIgnoredArticles } from '@/hooks/useLibraryIgnoredArticles';
import { useLibraryIgnoredArticles } from '@/lib/library/hooks/useLibraryIgnoredArticles';
import { useArtistsBrowseCatalog } from '@/features/artist/hooks/useArtistsBrowseCatalog';
import { useBrowseArtistTextSearch } from '@/features/artist/hooks/useBrowseArtistTextSearch';
import { useMainstageInpageHeaderTight } from '@/lib/hooks/useMainstageInpageHeaderTight';
+1 -1
View File
@@ -21,7 +21,7 @@ import { useScopedBrowseSearchQuery } from '@/store/liveSearchScopeStore';
import { readComposerBrowseRestore } from '@/utils/navigation/albumDetailNavigation';
import { filterArtistsWithRoleAlbumCredits } from '@/lib/library/composerBrowse';
import { ALL_SENTINEL, artistLetterBucket } from '@/features/artist';
import { useLibraryIgnoredArticles } from '@/hooks/useLibraryIgnoredArticles';
import { useLibraryIgnoredArticles } from '@/lib/library/hooks/useLibraryIgnoredArticles';
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
import OverlayScrollArea from '@/ui/OverlayScrollArea';
@@ -5,7 +5,7 @@ import {
libraryStatusDisplayTrackCount,
libraryStatusIsReady,
} from '@/lib/library/libraryReady';
import type { LibraryServerConnection } from '@/hooks/useLibraryIndexSync';
import type { LibraryServerConnection } from '@/lib/library/hooks/useLibraryIndexSync';
interface ServerLibraryIndexControlsProps {
status: SyncStateDto | null;
@@ -9,7 +9,7 @@ import { buildCapabilityContext } from '@/serverCapabilities/context';
import { useLibraryIndexStore } from '@/store/libraryIndexStore';
import { libraryDeleteServerData, librarySyncClearSession } from '@/lib/api/library';
import { bootstrapIndexedServer } from '@/lib/library/librarySession';
import { useLibraryIndexSync } from '@/hooks/useLibraryIndexSync';
import { useLibraryIndexSync } from '@/lib/library/hooks/useLibraryIndexSync';
import ServerLibraryIndexControls from '@/features/settings/components/ServerLibraryIndexControls';
import type { ServerProfile } from '@/store/authStoreTypes';
import { pingWithCredentialsForProfile, scheduleInstantMixProbeForServer } from '@/lib/api/subsonic';
@@ -2,12 +2,12 @@ import { useEffect } from 'react';
import {
analysisSetPipelineParallelism,
libraryAnalysisBackfillConfigure,
} from '../api/analysis';
import { librarySqlServerId } from '../api/coverCache';
import { useAuthStore } from '../store/authStore';
import { useAnalysisStrategyStore } from '../store/analysisStrategyStore';
} from '@/api/analysis';
import { librarySqlServerId } from '@/api/coverCache';
import { useAuthStore } from '@/store/authStore';
import { useAnalysisStrategyStore } from '@/store/analysisStrategyStore';
import { DEFAULT_ADVANCED_PARALLELISM } from '@/lib/library/analysisStrategy';
import { serverIndexKeyForProfile } from '../utils/server/serverIndexKey';
import { serverIndexKeyForProfile } from '@/utils/server/serverIndexKey';
const DISABLED_CONFIGURE = {
enabled: false,
@@ -1,9 +1,9 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useAuthStore } from '../store/authStore';
import { useLibraryIndexStore } from '../store/libraryIndexStore';
import { showToast } from '../utils/ui/toast';
import { resolveIndexKey, serverIndexKeyForProfile } from '../utils/server/serverIndexKey';
import { useAuthStore } from '@/store/authStore';
import { useLibraryIndexStore } from '@/store/libraryIndexStore';
import { showToast } from '@/utils/ui/toast';
import { resolveIndexKey, serverIndexKeyForProfile } from '@/utils/server/serverIndexKey';
import {
libraryGetStatus,
librarySyncCancel,