@@ -156,7 +156,8 @@ export function createLibraryStore(Alpine) {
156156
157157 for ( const [ section , data ] of Object . entries ( cached ) ) {
158158 // Accept standard sections or playlist-* sections
159- const isValidSection = validSections . includes ( section ) || section . startsWith ( 'playlist-' ) ;
159+ const isValidSection = validSections . includes ( section ) ||
160+ section . startsWith ( 'playlist-' ) ;
160161 if ( isValidSection && data ?. totalTracks > 0 ) {
161162 // Strip any legacy tracks array from persisted cache to save memory
162163 const { tracks : _tracks , ...summary } = data ;
@@ -170,7 +171,7 @@ export function createLibraryStore(Alpine) {
170171 sections : Object . keys ( this . _sectionCache ) ,
171172 totalTracks : Object . values ( this . _sectionCache ) . reduce (
172173 ( sum , s ) => sum + ( s . totalTracks || 0 ) ,
173- 0
174+ 0 ,
174175 ) ,
175176 } ) ;
176177 return true ;
@@ -350,7 +351,9 @@ export function createLibraryStore(Alpine) {
350351
351352 // Show cached summary stats if available (previous tracks stay visible during fetch)
352353 if ( cached ) {
353- console . log ( '[library]' , 'loadFavorites_with_cache_summary' , { totalTracks : cached . totalTracks } ) ;
354+ console . log ( '[library]' , 'loadFavorites_with_cache_summary' , {
355+ totalTracks : cached . totalTracks ,
356+ } ) ;
354357 this . totalTracks = cached . totalTracks ;
355358 this . totalDuration = cached . totalDuration ;
356359 this . _lastLoadedSection = section ;
@@ -400,7 +403,9 @@ export function createLibraryStore(Alpine) {
400403
401404 // Show cached summary stats if available (previous tracks stay visible during fetch)
402405 if ( cached ) {
403- console . log ( '[library]' , 'loadRecentlyPlayed_with_cache_summary' , { totalTracks : cached . totalTracks } ) ;
406+ console . log ( '[library]' , 'loadRecentlyPlayed_with_cache_summary' , {
407+ totalTracks : cached . totalTracks ,
408+ } ) ;
404409 this . totalTracks = cached . totalTracks ;
405410 this . totalDuration = cached . totalDuration ;
406411 this . _lastLoadedSection = section ;
@@ -450,7 +455,9 @@ export function createLibraryStore(Alpine) {
450455
451456 // Show cached summary stats if available (previous tracks stay visible during fetch)
452457 if ( cached ) {
453- console . log ( '[library]' , 'loadRecentlyAdded_with_cache_summary' , { totalTracks : cached . totalTracks } ) ;
458+ console . log ( '[library]' , 'loadRecentlyAdded_with_cache_summary' , {
459+ totalTracks : cached . totalTracks ,
460+ } ) ;
454461 this . totalTracks = cached . totalTracks ;
455462 this . totalDuration = cached . totalDuration ;
456463 this . _lastLoadedSection = section ;
@@ -500,7 +507,9 @@ export function createLibraryStore(Alpine) {
500507
501508 // Show cached summary stats if available (previous tracks stay visible during fetch)
502509 if ( cached ) {
503- console . log ( '[library]' , 'loadTop25_with_cache_summary' , { totalTracks : cached . totalTracks } ) ;
510+ console . log ( '[library]' , 'loadTop25_with_cache_summary' , {
511+ totalTracks : cached . totalTracks ,
512+ } ) ;
504513 this . totalTracks = cached . totalTracks ;
505514 this . totalDuration = cached . totalDuration ;
506515 this . _lastLoadedSection = section ;
@@ -768,8 +777,10 @@ export function createLibraryStore(Alpine) {
768777
769778 // Tiebreaker 4: Artist (if not primary sort key)
770779 if ( sortKey !== 'artist' ) {
771- const aArtist = this . _stripIgnoredPrefix ( a . album_artist || a . artist || '' , ignoreWords ) . toLowerCase ( ) ;
772- const bArtist = this . _stripIgnoredPrefix ( b . album_artist || b . artist || '' , ignoreWords ) . toLowerCase ( ) ;
780+ const aArtist = this . _stripIgnoredPrefix ( a . album_artist || a . artist || '' , ignoreWords )
781+ . toLowerCase ( ) ;
782+ const bArtist = this . _stripIgnoredPrefix ( b . album_artist || b . artist || '' , ignoreWords )
783+ . toLowerCase ( ) ;
773784 if ( aArtist < bArtist ) return - 1 ;
774785 if ( aArtist > bArtist ) return 1 ;
775786 }
0 commit comments