Skip to content

Commit 9318829

Browse files
authored
Merge pull request #72 from pSpitzner/rc1_fix_69_all_albums_lib_view
should fix #69 and make the library album view load quicker
2 parents e5e06b4 + ecbb35f commit 9318829

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

backend/beets_flask/server/routes/library/resources.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,6 @@ class AlbumResponseMinimal(TypedDict):
676676
id: int
677677
# Name of the album
678678
name: str
679-
# Path to the album
680-
path: str
681679
# Primary artist for the album
682680
albumartist: str
683681
# Year the album was published
@@ -743,8 +741,6 @@ def _rep_Album(
743741

744742
out: dict[str, Any] = dict()
745743

746-
out["path"] = beets_util.displayable_path(album.path)
747-
748744
if minimal:
749745
keys = ["id", "name", "albumartist", "year", "added"]
750746
else:

frontend/src/components/inbox/cards/importedCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ function AlbumInfo({ album }: { album: AlbumResponseMinimalExpanded }) {
142142
return (
143143
<Box>
144144
<Box component="ul" sx={{ m: 0 }}>
145-
<li>Path: {album.path}</li>
146145
<li>
147146
size:{" "}
148147
{humanizeBytes(

frontend/src/pythonTypes.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ export interface ItemResponseMinimal {
225225
export interface AlbumResponseMinimalExpanded {
226226
id: number;
227227
name: string;
228-
path: string;
229228
albumartist: string;
230229
year: number;
231230
added: Date;
@@ -238,7 +237,6 @@ export interface AlbumResponseMinimalExpanded {
238237
export interface AlbumResponseMinimal {
239238
id: number;
240239
name: string;
241-
path: string;
242240
albumartist: string;
243241
year: number;
244242
added: Date;
@@ -285,7 +283,6 @@ export interface ItemResponse {
285283
export interface AlbumResponseExpanded {
286284
id: number;
287285
name: string;
288-
path: string;
289286
albumartist: string;
290287
year: number;
291288
added: Date;
@@ -308,7 +305,6 @@ export interface AlbumSource {
308305
export interface AlbumResponse {
309306
id: number;
310307
name: string;
311-
path: string;
312308
albumartist: string;
313309
year: number;
314310
added: Date;

frontend/src/routes/library/(resources)/album.$albumId.route.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Box, useTheme } from "@mui/material";
33
import { useSuspenseQuery } from "@tanstack/react-query";
44
import { createFileRoute, Outlet } from "@tanstack/react-router";
55

6-
import { albumQueryOptions, artQueryOptions } from "@/api/library";
6+
import { albumQueryOptions } from "@/api/library";
77
import { BackIconButton } from "@/components/common/inputs/back";
88
import { Loading } from "@/components/common/loading";
99
import { NavigationTabs } from "@/components/common/navigation";
@@ -28,10 +28,9 @@ export const Route = createFileRoute("/library/(resources)/album/$albumId")({
2828
)
2929
);
3030

31-
const p2 = queryClient.ensureQueryData(
32-
artQueryOptions({ type: "album", id: params.albumId })
33-
);
34-
await Promise.all([p1, p2]);
31+
// don't wait for cover-art here. we want to show main content fast
32+
// and handle errors for artwork with ui placeholder.
33+
await Promise.all([p1]);
3534
},
3635
pendingComponent: PendingComponent,
3736
component: RouteComponent,

0 commit comments

Comments
 (0)