Skip to content

Commit aa09f96

Browse files
authored
Merge pull request #122 from tsirysndr/fix-covers-url
fix(webui): fix incorrect album art url
2 parents 3ac6428 + fb62ecf commit aa09f96

File tree

13 files changed

+61
-48
lines changed

13 files changed

+61
-48
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ curl -fsSL https://raw.githubusercontent.com/tsirysndr/rockbox-zig/HEAD/install.
125125
## 📦 Downloads
126126

127127
- `Linux`: intel:
128-
[rockbox_2025.02.16_x86_64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2025.02.16/rockbox_2025.02.16_x86_64-linux.tar.gz)
128+
[rockbox_2025.07.17_x86_64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2025.07.17/rockbox_2025.07.17_x86_64-linux.tar.gz)
129129
arm64:
130-
[rockbox_2025.02.16_aarch64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2025.02.16/rockbox_2025.02.16_aarch64-linux.tar.gz)
130+
[rockbox_2025.07.17_aarch64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2025.07.17/rockbox_2025.07.17_aarch64-linux.tar.gz)
131131

132132
## 🧙‍♂️ Systemd Service
133133

dist/debian/amd64/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: rockbox
2-
Version: 2025.02.16
2+
Version: 2025.07.17
33
Section: user/multimedia
44
Priority: optional
55
Architecture: amd64

dist/debian/arm64/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: rockbox
2-
Version: 2025.02.16
2+
Version: 2025.07.17
33
Section: user/multimedia
44
Priority: optional
55
Architecture: arm64

dist/rpm/amd64/rockbox.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: rockbox
2-
Version: 2025.02.16
2+
Version: 2025.07.17
33
Release: 1%{?dist}
44
Summary: High quality audio player
55

dist/rpm/arm64/rockbox.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: rockbox
2-
Version: 2025.02.16
2+
Version: 2025.07.17
33
Release: 1%{?dist}
44
Summary: High quality audio player
55

webui/rockbox/src/Components/AlbumDetails/AlbumDetailsWithData.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { FC, useEffect, useMemo, useState } from "react";
2-
import AlbumDetails from "./AlbumDetails";
32
import { useNavigate, useParams } from "react-router-dom";
3+
import { useRecoilValue } from "recoil";
44
import { useGetAlbumQuery, usePlayAlbumMutation } from "../../Hooks/GraphQL";
55
import { useTimeFormat } from "../../Hooks/useFormat";
66
import { Track } from "../../Types/track";
7-
import { useRecoilValue } from "recoil";
87
import { settingsState } from "../Settings/SettingsState";
8+
import AlbumDetails from "./AlbumDetails";
99

1010
const AlbumDetailsWithData: FC = () => {
1111
const { enableBlur } = useRecoilValue(settingsState);
@@ -27,7 +27,7 @@ const AlbumDetailsWithData: FC = () => {
2727
? {
2828
...data.album!,
2929
albumArt: data.album?.albumArt
30-
? `http://localhost:6062/covers/${data.album?.albumArt}`
30+
? `${location.protocol}//${location.host}/covers/${data.album?.albumArt}`
3131
: "",
3232
}
3333
: null,

webui/rockbox/src/Components/Albums/AlbumsWithData.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { FC, useEffect, useState } from "react";
2-
import Albums from "./Albums";
3-
import { useGetAlbumsQuery } from "../../Hooks/GraphQL";
42
import { useRecoilValue } from "recoil";
3+
import { useGetAlbumsQuery } from "../../Hooks/GraphQL";
54
import { filterState } from "../Filter/FilterState";
5+
import Albums from "./Albums";
66

77
const AlbumsWithData: FC = () => {
88
const filter = useRecoilValue(filterState);
@@ -17,7 +17,9 @@ const AlbumsWithData: FC = () => {
1717
id: x.id,
1818
title: x.title,
1919
artist: x.artist,
20-
cover: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "",
20+
cover: x.albumArt
21+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
22+
: "",
2123
year: x.year,
2224
artistId: x.artistId,
2325
}))
@@ -30,7 +32,9 @@ const AlbumsWithData: FC = () => {
3032
id: x.id,
3133
title: x.title,
3234
artist: x.artist,
33-
cover: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "",
35+
cover: x.albumArt
36+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
37+
: "",
3438
year: x.year,
3539
artistId: x.artistId,
3640
}))
@@ -45,7 +49,9 @@ const AlbumsWithData: FC = () => {
4549
id: x.id,
4650
title: x.title,
4751
artist: x.artist,
48-
cover: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "",
52+
cover: x.albumArt
53+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
54+
: "",
4955
year: x.year,
5056
artistId: x.artistId,
5157
}))

webui/rockbox/src/Components/ArtistDetails/ArtistDetailsWithData.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { FC } from "react";
2-
import ArtistDetails from "./ArtistDetails";
32
import { useNavigate, useParams } from "react-router-dom";
43
import {
54
useGetArtistQuery,
65
usePlayArtistTracksMutation,
76
} from "../../Hooks/GraphQL";
87
import { useTimeFormat } from "../../Hooks/useFormat";
8+
import ArtistDetails from "./ArtistDetails";
99

1010
const ArtistDetailsWithData: FC = () => {
1111
const navigate = useNavigate();
@@ -21,12 +21,16 @@ const ArtistDetailsWithData: FC = () => {
2121
data?.artist?.tracks.map((x) => ({
2222
...x,
2323
time: formatTime(x.length),
24-
albumArt: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "",
24+
albumArt: x.albumArt
25+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
26+
: "",
2527
})) || [];
2628
const albums =
2729
data?.artist?.albums.map((x) => ({
2830
...x,
29-
cover: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "",
31+
cover: x.albumArt
32+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
33+
: "",
3034
})) || [];
3135

3236
const onPlayAll = (shuffle: boolean) => {

webui/rockbox/src/Components/ControlBar/ControlBarWithData.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import _ from "lodash";
12
import { FC, useEffect } from "react";
2-
import ControlBar from "./ControlBar";
3+
import { useRecoilState } from "recoil";
34
import {
45
useCurrentlyPlayingSongSubscription,
56
useGetCurrentTrackQuery,
@@ -17,15 +18,14 @@ import {
1718
useSeekMutation,
1819
useUnlikeTrackMutation,
1920
} from "../../Hooks/GraphQL";
20-
import { CurrentTrack } from "../../Types/track";
21-
import _ from "lodash";
22-
import { useRecoilState } from "recoil";
23-
import { controlBarState } from "./ControlBarState";
2421
import { usePlayQueue } from "../../Hooks/usePlayQueue";
2522
import { useResumePlaylist } from "../../Hooks/useResumePlaylist";
23+
import { useSettings } from "../../Hooks/useSettings";
24+
import { CurrentTrack } from "../../Types/track";
2625
import { likesState } from "../Likes/LikesState";
2726
import { settingsState } from "../Settings/SettingsState";
28-
import { useSettings } from "../../Hooks/useSettings";
27+
import ControlBar from "./ControlBar";
28+
import { controlBarState } from "./ControlBarState";
2929

3030
const ControlBarWithData: FC = () => {
3131
const [{ nowPlaying, locked, resumeIndex }, setControlBarState] =
@@ -120,7 +120,7 @@ const ControlBarWithData: FC = () => {
120120
cover: currentSong?.albumArt
121121
? currentSong?.albumArt.startsWith("http")
122122
? currentSong.albumArt
123-
: `http://localhost:6062/covers/${currentSong?.albumArt}`
123+
: `${location.protocol}//${location.host}/covers/${currentSong?.albumArt}`
124124
: "",
125125
duration: currentSong?.length || 0,
126126
progress: currentSong?.elapsed || 0,
@@ -150,7 +150,7 @@ const ControlBarWithData: FC = () => {
150150
cover: data.currentTrack?.albumArt
151151
? data.currentTrack?.albumArt.startsWith("http")
152152
? data.currentTrack?.albumArt
153-
: `http://localhost:6062/covers/${data.currentTrack?.albumArt}`
153+
: `${location.protocol}//${location.host}/covers/${data.currentTrack?.albumArt}`
154154
: "",
155155
duration: data.currentTrack?.length || 0,
156156
progress: data.currentTrack?.elapsed || 0,

webui/rockbox/src/Components/Likes/LikesWithData.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { FC, useEffect } from "react";
2-
import Likes from "./Likes";
2+
import { useRecoilState, useRecoilValue } from "recoil";
33
import {
44
useGetLikedTracksQuery,
55
usePlayLikedTracksMutation,
66
} from "../../Hooks/GraphQL";
77
import { useTimeFormat } from "../../Hooks/useFormat";
8-
import { useRecoilState, useRecoilValue } from "recoil";
9-
import { likedTracks, likesState } from "./LikesState";
108
import { filterState } from "../Filter/FilterState";
9+
import Likes from "./Likes";
10+
import { likedTracks, likesState } from "./LikesState";
1111

1212
const LikesWithData: FC = () => {
1313
const filter = useRecoilValue(filterState);
@@ -30,7 +30,7 @@ const LikesWithData: FC = () => {
3030
album: x.album,
3131
time: formatTime(x.length),
3232
albumArt: x.albumArt
33-
? `http://localhost:6062/covers/${x.albumArt}`
33+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
3434
: undefined,
3535
albumId: x.albumId,
3636
artistId: x.artistId,
@@ -49,7 +49,7 @@ const LikesWithData: FC = () => {
4949
album: x.album,
5050
time: formatTime(x.length),
5151
albumArt: x.albumArt
52-
? `http://localhost:6062/covers/${x.albumArt}`
52+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
5353
: undefined,
5454
albumId: x.albumId,
5555
artistId: x.artistId,
@@ -82,7 +82,7 @@ const LikesWithData: FC = () => {
8282
album: x.album,
8383
time: formatTime(x.length),
8484
albumArt: x.albumArt
85-
? `http://localhost:6062/covers/${x.albumArt}`
85+
? `${location.protocol}//${location.host}/covers/${x.albumArt}`
8686
: undefined,
8787
albumId: x.albumId,
8888
artistId: x.artistId,

0 commit comments

Comments
 (0)