Changeset 5e16b8a in Klonkt for src/services/music/index.js
- Timestamp:
- 08/15/2026 07:33:20 AM (4 weeks ago)
- Branches:
- main
- Children:
- e1da6a1
- Parents:
- 732272a
- File:
-
- 1 edited
-
src/services/music/index.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/music/index.js
r732272a r5e16b8a 247 247 * ooit een besloten variant, dan hoort daar het Follow/Accept-werk bij. 248 248 */ 249 export function buildLibrary(base, site, rows ) {249 export function buildLibrary(base, site, rows, { page = false } = {}) { 250 250 const id = libraryId(base, site); 251 251 const hostPosts = site.id ? trackHostPosts(site.id) : null; 252 252 const items = (rows || []).map((r) => buildTrackAudio(base, site, r, { hostPosts })); 253 253 return pagedCollection(id, items, { 254 page, 254 255 extra: { 255 256 type: 'Library', … … 265 266 266 267 /** De collectie van alle open tracks van een site (shaer-0nh, stap 3). */ 267 export function buildTrackCollection(base, site, rows ) {268 export function buildTrackCollection(base, site, rows, { page = false } = {}) { 268 269 // Eén zoekopdracht voor alle rijen samen; zie trackHostPosts. 269 270 const posts = site.id ? trackHostPosts(site.id) : null; 270 271 const items = (rows || []).map((r) => buildTrackAudio(base, site, r, { hostPosts: posts })); 271 return pagedCollection(`${actorId(base, site.slug)}/tracks`, items, { extra: { attributedTo: actorId(base, site.slug) } });272 return pagedCollection(`${actorId(base, site.slug)}/tracks`, items, { page, extra: { attributedTo: actorId(base, site.slug) } }); 272 273 } 273 274 … … 314 315 // collectie zelf, want ook een lijst mag niet verklappen wat er achter de 315 316 // poort staat. 316 export function listPlaylistsAP(base, site, enriched ) {317 export function listPlaylistsAP(base, site, enriched, { page = false } = {}) { 317 318 const rows = db.prepare( 318 319 'SELECT id, title, artist, year, cover_url FROM playlists WHERE site_id = ? ORDER BY created_at, id' … … 327 328 return stub; 328 329 }); 329 return pagedCollection(colId, items, { extra: { attributedTo: actorId(base, site.slug) } });330 return pagedCollection(colId, items, { page, extra: { attributedTo: actorId(base, site.slug) } }); 330 331 } 331 332
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)