feat(artist): increase album and track limits
- Increase initial artist albums fetch from 500 to 1000 - Increase load more albums batch from 50 to 200 - Increase top tracks display from 5 to 20 - Prefer full biography content over summary - Increase bio truncate threshold from 500 to 800 characters cp
This commit is contained in:
1 parent
bba12f2832
commit
e281932340
3 files changed
+8
-8
No files matched your search
@@ -236,13 +236,13 @@
|
||||
// Search for tracks by artist name
|
||||
const results = await invoke<SearchResults>('search_tracks', {
|
||||
query: artist.name,
|
||||
limit: 10,
|
||||
limit: 30,
|
||||
offset: 0
|
||||
});
|
||||
// Filter to only include tracks by this artist
|
||||
topTracks = results.items.filter(track =>
|
||||
track.performer?.name?.toLowerCase() === artist.name.toLowerCase()
|
||||
).slice(0, 5);
|
||||
).slice(0, 20);
|
||||
} catch (err) {
|
||||
console.error('Failed to load top tracks:', err);
|
||||
} finally {
|
||||
@@ -335,14 +335,14 @@
|
||||
imageError = true;
|
||||
}
|
||||
|
||||
// Get biography text (prefer summary, fall back to content)
|
||||
// Get biography text (prefer content for full text, fall back to summary)
|
||||
let bioText = $derived(
|
||||
artist.biography?.summary || artist.biography?.content || null
|
||||
artist.biography?.content || artist.biography?.summary || null
|
||||
);
|
||||
|
||||
// Truncate bio for collapsed view
|
||||
let truncatedBio = $derived(
|
||||
bioText && bioText.length > 500 ? bioText.slice(0, 500) + '...' : bioText
|
||||
bioText && bioText.length > 800 ? bioText.slice(0, 800) + '...' : bioText
|
||||
);
|
||||
|
||||
let hasMoreAlbums = $derived(!!onLoadMore && artist.albumsFetched < artist.totalAlbums);
|
||||
|
||||
Reference in new issue
Block a user