fix(search): use v2_search_playlists command for playlist search
Playlist search tab was invoking legacy 'search_playlists' command which no longer exists. Updated both initial search and load-more to use 'v2_search_playlists', matching the other search tabs. Closes #129 cc
This commit is contained in:
1 file changed
+2
-2
@@ -547,7 +547,7 @@
|
|||||||
artistResults = results;
|
artistResults = results;
|
||||||
console.log('Artist results:', artistResults);
|
console.log('Artist results:', artistResults);
|
||||||
} else if (activeTab === 'playlists') {
|
} else if (activeTab === 'playlists') {
|
||||||
const results = await invoke<SearchResults<Playlist>>('search_playlists', {
|
const results = await invoke<SearchResults<Playlist>>('v2_search_playlists', {
|
||||||
query: searchQuery,
|
query: searchQuery,
|
||||||
limit: PAGE_SIZE,
|
limit: PAGE_SIZE,
|
||||||
offset: 0
|
offset: 0
|
||||||
@@ -619,7 +619,7 @@
|
|||||||
};
|
};
|
||||||
} else if (activeTab === 'playlists' && playlistResults && hasMorePlaylists) {
|
} else if (activeTab === 'playlists' && playlistResults && hasMorePlaylists) {
|
||||||
const newOffset = playlistResults.offset + playlistResults.items.length;
|
const newOffset = playlistResults.offset + playlistResults.items.length;
|
||||||
const moreResults = await invoke<SearchResults<Playlist>>('search_playlists', {
|
const moreResults = await invoke<SearchResults<Playlist>>('v2_search_playlists', {
|
||||||
query: query.trim(),
|
query: query.trim(),
|
||||||
limit: PAGE_SIZE,
|
limit: PAGE_SIZE,
|
||||||
offset: newOffset
|
offset: newOffset
|
||||||
|
|||||||
Reference in new issue
Block a user