[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix queue panel cover refreshing

Kasper (Sep 25, 2024, 9:29 AM +0200) b6d64df2 5e7562f4

+18 -11
+1
CHANGELOG.md
··· 17 17 - Small design updates to tracklist header & filter textbox 18 18 - Respect user's locale time 19 19 - Make sidebar not focusable by mouse 20 + - Fix covers updates sometimes not being reflected in the queue panel 20 21 - Fix dragging tracks to up next/autoplay queue boundary 21 22 - Fix button edge not clickable due to zoom 22 23 - Fix dragging of covers in queue
+1 -1
src/components/Cover.svelte
··· 16 16 </svg> 17 17 {:else} 18 18 <img 19 - class="cover poinraer-events-none" 19 + class="cover" 20 20 class:invisible={success === null} 21 21 src="trackimg:?path={encodeURIComponent( 22 22 join_paths(paths.tracksDir, track.file),
+16 -10
src/components/QueueItem.svelte
··· 8 8 let track: Track 9 9 $: $track_metadata_updated, (track = methods.getTrack(id)) 10 10 11 - let success: boolean | null = null 11 + $: src = 12 + 'trackimg:?path=' + 13 + encodeURIComponent(join_paths(paths.tracksDir, track.file)) + 14 + '&cache_db_path=' + 15 + encodeURIComponent(paths.cacheDb) + 16 + '&date_modified=' + 17 + encodeURIComponent(track.dateModified) 18 + 19 + let failed_src: string | null = null 20 + let loaded = false 12 21 </script> 13 22 14 23 <div class="box"> 15 - {#if success === false} 24 + {#if src === failed_src && failed_src !== null} 16 25 <svg 17 26 class="cover" 18 27 xmlns="http://www.w3.org/2000/svg" ··· 27 36 {:else} 28 37 <img 29 38 class="cover" 30 - class:invisible={success === null} 31 - src="trackimg:?path={encodeURIComponent( 32 - join_paths(paths.tracksDir, track.file), 33 - )}&cache_db_path={encodeURIComponent(paths.cacheDb)}&date_modified={encodeURIComponent( 34 - track.dateModified, 35 - )}" 39 + class:invisible={!loaded} 40 + {src} 36 41 alt="" 37 42 on:load={() => { 38 - success = true 43 + loaded = true 44 + failed_src = null 39 45 }} 40 46 on:error={() => { 41 - success = false 47 + failed_src = src 42 48 }} 43 49 /> 44 50 {/if}