refactor(mobile): drop older-server album format fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22cb6b6ccc
commit
4b0a104f7b
1 file changed
+3
-18
@@ -89,21 +89,6 @@ export default function AlbumScreen() {
|
||||
[album]
|
||||
)
|
||||
|
||||
// Servers from before the album format fields (#61, 2026-11-03) omit them,
|
||||
// so derive them from the tracks there. Current servers skip this query.
|
||||
const formatTracks = useCachedQuery(
|
||||
api.library.getSongsForPlayback,
|
||||
album && (album.hasLossless === undefined || album.hasAtmos === undefined)
|
||||
? { ids: songIds }
|
||||
: "skip"
|
||||
)
|
||||
const hasLossless =
|
||||
album?.hasLossless ??
|
||||
formatTracks?.some((track) => track && "lossless" in track.files)
|
||||
const hasAtmos =
|
||||
album?.hasAtmos ??
|
||||
formatTracks?.some((track) => track && "atmos" in track.files)
|
||||
|
||||
useEffect(() => {
|
||||
if (album) {
|
||||
rememberSongs(albumDetailSongs(album))
|
||||
@@ -375,7 +360,7 @@ export default function AlbumScreen() {
|
||||
{metadata}
|
||||
</PaletteText>
|
||||
) : null}
|
||||
{hasLossless ? (
|
||||
{album.hasLossless ? (
|
||||
<>
|
||||
{metadata ? (
|
||||
<PaletteText
|
||||
@@ -393,9 +378,9 @@ export default function AlbumScreen() {
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
{hasAtmos ? (
|
||||
{album.hasAtmos ? (
|
||||
<>
|
||||
{metadata || hasLossless ? (
|
||||
{metadata || album.hasLossless ? (
|
||||
<PaletteText
|
||||
tone="secondaryForeground"
|
||||
style={{ color: palette.secondaryForeground }}
|
||||
|
||||
Reference in new issue
Block a user