A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

Merge pull request #122 from tsirysndr/fix-covers-url

fix(webui): fix incorrect album art url

authored by tsiry-sandratraina.com and committed by

GitHub aa09f969 3ac64282

+61 -48
+2 -2
README.md
··· 125 125 ## 📦 Downloads 126 126 127 127 - `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) 129 129 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) 131 131 132 132 ## 🧙‍♂️ Systemd Service 133 133
+1 -1
dist/debian/amd64/DEBIAN/control
··· 1 1 Package: rockbox 2 - Version: 2025.02.16 2 + Version: 2025.07.17 3 3 Section: user/multimedia 4 4 Priority: optional 5 5 Architecture: amd64
+1 -1
dist/debian/arm64/DEBIAN/control
··· 1 1 Package: rockbox 2 - Version: 2025.02.16 2 + Version: 2025.07.17 3 3 Section: user/multimedia 4 4 Priority: optional 5 5 Architecture: arm64
+1 -1
dist/rpm/amd64/rockbox.spec
··· 1 1 Name: rockbox 2 - Version: 2025.02.16 2 + Version: 2025.07.17 3 3 Release: 1%{?dist} 4 4 Summary: High quality audio player 5 5
+1 -1
dist/rpm/arm64/rockbox.spec
··· 1 1 Name: rockbox 2 - Version: 2025.02.16 2 + Version: 2025.07.17 3 3 Release: 1%{?dist} 4 4 Summary: High quality audio player 5 5
+3 -3
webui/rockbox/src/Components/AlbumDetails/AlbumDetailsWithData.tsx
··· 1 1 import { FC, useEffect, useMemo, useState } from "react"; 2 - import AlbumDetails from "./AlbumDetails"; 3 2 import { useNavigate, useParams } from "react-router-dom"; 3 + import { useRecoilValue } from "recoil"; 4 4 import { useGetAlbumQuery, usePlayAlbumMutation } from "../../Hooks/GraphQL"; 5 5 import { useTimeFormat } from "../../Hooks/useFormat"; 6 6 import { Track } from "../../Types/track"; 7 - import { useRecoilValue } from "recoil"; 8 7 import { settingsState } from "../Settings/SettingsState"; 8 + import AlbumDetails from "./AlbumDetails"; 9 9 10 10 const AlbumDetailsWithData: FC = () => { 11 11 const { enableBlur } = useRecoilValue(settingsState); ··· 27 27 ? { 28 28 ...data.album!, 29 29 albumArt: data.album?.albumArt 30 - ? `http://localhost:6062/covers/${data.album?.albumArt}` 30 + ? `${location.protocol}//${location.host}/covers/${data.album?.albumArt}` 31 31 : "", 32 32 } 33 33 : null,
+11 -5
webui/rockbox/src/Components/Albums/AlbumsWithData.tsx
··· 1 1 import { FC, useEffect, useState } from "react"; 2 - import Albums from "./Albums"; 3 - import { useGetAlbumsQuery } from "../../Hooks/GraphQL"; 4 2 import { useRecoilValue } from "recoil"; 3 + import { useGetAlbumsQuery } from "../../Hooks/GraphQL"; 5 4 import { filterState } from "../Filter/FilterState"; 5 + import Albums from "./Albums"; 6 6 7 7 const AlbumsWithData: FC = () => { 8 8 const filter = useRecoilValue(filterState); ··· 17 17 id: x.id, 18 18 title: x.title, 19 19 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 + : "", 21 23 year: x.year, 22 24 artistId: x.artistId, 23 25 })) ··· 30 32 id: x.id, 31 33 title: x.title, 32 34 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 + : "", 34 38 year: x.year, 35 39 artistId: x.artistId, 36 40 })) ··· 45 49 id: x.id, 46 50 title: x.title, 47 51 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 + : "", 49 55 year: x.year, 50 56 artistId: x.artistId, 51 57 }))
+7 -3
webui/rockbox/src/Components/ArtistDetails/ArtistDetailsWithData.tsx
··· 1 1 import { FC } from "react"; 2 - import ArtistDetails from "./ArtistDetails"; 3 2 import { useNavigate, useParams } from "react-router-dom"; 4 3 import { 5 4 useGetArtistQuery, 6 5 usePlayArtistTracksMutation, 7 6 } from "../../Hooks/GraphQL"; 8 7 import { useTimeFormat } from "../../Hooks/useFormat"; 8 + import ArtistDetails from "./ArtistDetails"; 9 9 10 10 const ArtistDetailsWithData: FC = () => { 11 11 const navigate = useNavigate(); ··· 21 21 data?.artist?.tracks.map((x) => ({ 22 22 ...x, 23 23 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 + : "", 25 27 })) || []; 26 28 const albums = 27 29 data?.artist?.albums.map((x) => ({ 28 30 ...x, 29 - cover: x.albumArt ? `http://localhost:6062/covers/${x.albumArt}` : "", 31 + cover: x.albumArt 32 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 33 + : "", 30 34 })) || []; 31 35 32 36 const onPlayAll = (shuffle: boolean) => {
+8 -8
webui/rockbox/src/Components/ControlBar/ControlBarWithData.tsx
··· 1 + import _ from "lodash"; 1 2 import { FC, useEffect } from "react"; 2 - import ControlBar from "./ControlBar"; 3 + import { useRecoilState } from "recoil"; 3 4 import { 4 5 useCurrentlyPlayingSongSubscription, 5 6 useGetCurrentTrackQuery, ··· 17 18 useSeekMutation, 18 19 useUnlikeTrackMutation, 19 20 } from "../../Hooks/GraphQL"; 20 - import { CurrentTrack } from "../../Types/track"; 21 - import _ from "lodash"; 22 - import { useRecoilState } from "recoil"; 23 - import { controlBarState } from "./ControlBarState"; 24 21 import { usePlayQueue } from "../../Hooks/usePlayQueue"; 25 22 import { useResumePlaylist } from "../../Hooks/useResumePlaylist"; 23 + import { useSettings } from "../../Hooks/useSettings"; 24 + import { CurrentTrack } from "../../Types/track"; 26 25 import { likesState } from "../Likes/LikesState"; 27 26 import { settingsState } from "../Settings/SettingsState"; 28 - import { useSettings } from "../../Hooks/useSettings"; 27 + import ControlBar from "./ControlBar"; 28 + import { controlBarState } from "./ControlBarState"; 29 29 30 30 const ControlBarWithData: FC = () => { 31 31 const [{ nowPlaying, locked, resumeIndex }, setControlBarState] = ··· 120 120 cover: currentSong?.albumArt 121 121 ? currentSong?.albumArt.startsWith("http") 122 122 ? currentSong.albumArt 123 - : `http://localhost:6062/covers/${currentSong?.albumArt}` 123 + : `${location.protocol}//${location.host}/covers/${currentSong?.albumArt}` 124 124 : "", 125 125 duration: currentSong?.length || 0, 126 126 progress: currentSong?.elapsed || 0, ··· 150 150 cover: data.currentTrack?.albumArt 151 151 ? data.currentTrack?.albumArt.startsWith("http") 152 152 ? data.currentTrack?.albumArt 153 - : `http://localhost:6062/covers/${data.currentTrack?.albumArt}` 153 + : `${location.protocol}//${location.host}/covers/${data.currentTrack?.albumArt}` 154 154 : "", 155 155 duration: data.currentTrack?.length || 0, 156 156 progress: data.currentTrack?.elapsed || 0,
+6 -6
webui/rockbox/src/Components/Likes/LikesWithData.tsx
··· 1 1 import { FC, useEffect } from "react"; 2 - import Likes from "./Likes"; 2 + import { useRecoilState, useRecoilValue } from "recoil"; 3 3 import { 4 4 useGetLikedTracksQuery, 5 5 usePlayLikedTracksMutation, 6 6 } from "../../Hooks/GraphQL"; 7 7 import { useTimeFormat } from "../../Hooks/useFormat"; 8 - import { useRecoilState, useRecoilValue } from "recoil"; 9 - import { likedTracks, likesState } from "./LikesState"; 10 8 import { filterState } from "../Filter/FilterState"; 9 + import Likes from "./Likes"; 10 + import { likedTracks, likesState } from "./LikesState"; 11 11 12 12 const LikesWithData: FC = () => { 13 13 const filter = useRecoilValue(filterState); ··· 30 30 album: x.album, 31 31 time: formatTime(x.length), 32 32 albumArt: x.albumArt 33 - ? `http://localhost:6062/covers/${x.albumArt}` 33 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 34 34 : undefined, 35 35 albumId: x.albumId, 36 36 artistId: x.artistId, ··· 49 49 album: x.album, 50 50 time: formatTime(x.length), 51 51 albumArt: x.albumArt 52 - ? `http://localhost:6062/covers/${x.albumArt}` 52 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 53 53 : undefined, 54 54 albumId: x.albumId, 55 55 artistId: x.artistId, ··· 82 82 album: x.album, 83 83 time: formatTime(x.length), 84 84 albumArt: x.albumArt 85 - ? `http://localhost:6062/covers/${x.albumArt}` 85 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 86 86 : undefined, 87 87 albumId: x.albumId, 88 88 artistId: x.artistId,
+5 -5
webui/rockbox/src/Components/Tracks/TracksWithData.tsx
··· 1 1 import { FC, useEffect, useState } from "react"; 2 - import Tracks from "./Tracks"; 2 + import { useRecoilValue } from "recoil"; 3 3 import { usePlayAllTracksMutation, useTracksQuery } from "../../Hooks/GraphQL"; 4 4 import { useTimeFormat } from "../../Hooks/useFormat"; 5 5 import { Track } from "../../Types/track"; 6 - import { useRecoilValue } from "recoil"; 7 6 import { filterState } from "../Filter/FilterState"; 7 + import Tracks from "./Tracks"; 8 8 9 9 const TracksWithData: FC = () => { 10 10 const filter = useRecoilValue(filterState); ··· 24 24 album: x.album, 25 25 time: formatTime(x.length), 26 26 albumArt: x.albumArt 27 - ? `http://localhost:6062/covers/${x.albumArt}` 27 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 28 28 : undefined, 29 29 albumId: x.albumId, 30 30 artistId: x.artistId, ··· 43 43 album: x.album, 44 44 time: formatTime(x.length), 45 45 albumArt: x.albumArt 46 - ? `http://localhost:6062/covers/${x.albumArt}` 46 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 47 47 : undefined, 48 48 albumId: x.albumId, 49 49 artistId: x.artistId, ··· 68 68 album: x.album, 69 69 time: formatTime(x.length), 70 70 albumArt: x.albumArt 71 - ? `http://localhost:6062/covers/${x.albumArt}` 71 + ? `${location.protocol}//${location.host}/covers/${x.albumArt}` 72 72 : undefined, 73 73 albumId: x.albumId, 74 74 artistId: x.artistId,
+8 -8
webui/rockbox/src/Hooks/usePlayQueue.tsx
··· 1 + import _ from "lodash"; 1 2 import { useMemo } from "react"; 3 + import { useRecoilValue } from "recoil"; 4 + import { controlBarState } from "../Components/ControlBar/ControlBarState"; 5 + import { deviceState } from "../Components/ControlBar/DeviceList/DeviceState"; 2 6 import { 3 7 useGetCurrentPlaylistQuery, 4 8 usePlaylistChangedSubscription, 5 9 } from "./GraphQL"; 6 - import _ from "lodash"; 7 - import { useRecoilValue } from "recoil"; 8 - import { controlBarState } from "../Components/ControlBar/ControlBarState"; 9 - import { deviceState } from "../Components/ControlBar/DeviceList/DeviceState"; 10 10 11 11 export const usePlayQueue = () => { 12 12 const { currentDevice } = useRecoilValue(deviceState); ··· 30 30 cover: x.albumArt 31 31 ? x.albumArt.startsWith("http") 32 32 ? x.albumArt 33 - : `http://localhost:6062/covers/${x.albumArt}` 33 + : `${location.protocol}//${location.host}/covers/${x.albumArt}` 34 34 : undefined, 35 35 })); 36 36 } ··· 45 45 cover: x.albumArt 46 46 ? x.albumArt.startsWith("http") 47 47 ? x.albumArt 48 - : `http://localhost:6062/covers/${x.albumArt}` 48 + : `${location.protocol}//${location.host}/covers/${x.albumArt}` 49 49 : undefined, 50 50 })); 51 51 // eslint-disable-next-line react-hooks/exhaustive-deps ··· 64 64 cover: x.albumArt 65 65 ? x.albumArt.startsWith("http") 66 66 ? x.albumArt 67 - : `http://localhost:6062/covers/${x.albumArt}` 67 + : `${location.protocol}//${location.host}/covers/${x.albumArt}` 68 68 : undefined, 69 69 })); 70 70 } ··· 79 79 cover: x.albumArt 80 80 ? x.albumArt.startsWith("http") 81 81 ? x.albumArt 82 - : `http://localhost:6062/covers/${x.albumArt}` 82 + : `${location.protocol}//${location.host}/covers/${x.albumArt}` 83 83 : undefined, 84 84 })); 85 85 }, [data, playlistSubscription, resumeIndex]);
+7 -4
webui/rockbox/src/Hooks/useResumePlaylist.tsx
··· 1 1 import { useEffect } from "react"; 2 + import { useRecoilState } from "recoil"; 3 + import { controlBarState } from "../Components/ControlBar/ControlBarState"; 2 4 import { 3 5 useGetCurrentPlaylistQuery, 4 6 useGetGlobalStatusQuery, ··· 6 8 useResumePlaylistMutation, 7 9 useResumePlaylistTrackMutation, 8 10 } from "./GraphQL"; 9 - import { useRecoilState } from "recoil"; 10 - import { controlBarState } from "../Components/ControlBar/ControlBarState"; 11 11 12 12 export const useResumePlaylist = () => { 13 13 const [{ nowPlaying, resumeIndex }, setControlBarState] = ··· 33 33 return; 34 34 } 35 35 36 - if (globalStatusData.globalStatus.resumeIndex > -1 && getPlaybackStatusData?.status !== 1) { 36 + if ( 37 + globalStatusData.globalStatus.resumeIndex > -1 && 38 + getPlaybackStatusData?.status !== 1 39 + ) { 37 40 resumePlaylist() 38 41 .then((res) => { 39 42 if (res.data?.playlistResume === 0) { ··· 76 79 : currentSong?.albumArt 77 80 ? currentSong?.albumArt.startsWith("http") 78 81 ? currentSong.albumArt 79 - : `http://localhost:6062/covers/${currentSong?.albumArt}` 82 + : `${location.protocol}//${location.host}/covers/${currentSong?.albumArt}` 80 83 : "", 81 84 duration: 82 85 getPlaybackStatusData?.status === 1