Commit Graph

17 Commits

Author SHA1 Message Date
8523b14aae fix up links and add link to header 2025-06-22 05:33:02 -04:00
343c9fc812 Changes to track.ejs 2025-06-22 05:28:53 -04:00
3cbd2a7c6a Add search box to track pages 2025-06-22 05:22:54 -04:00
8b66682f8d Add advanced search 2025-06-22 05:05:40 -04:00
7bd03f0630 fix css 2025-06-22 04:57:52 -04:00
af7b2da88f fix new tab 2025-06-22 02:59:44 -04:00
c8e3e34d3e Update Readme 2025-06-22 02:57:32 -04:00
b12b3882f3 Add pagination and WebSocket support for track listings
This commit introduces pagination and real-time updates to the music site, improving performance and user experience for browsing tracks across genres. Key changes include:

music_site.js:

Added Socket.IO for real-time communication between client and server.

Implemented pagination with TRACKS_PER_PAGE (4 tracks per page) in getTracks function, returning paginated tracks, current page, total pages, and total tracks.

Enhanced slug generation with usedSlugs Map to ensure uniqueness within genres.

Updated routes and WebSocket handlers to support pagination:

Modified getTracks to handle page parameters and return paginated data.

Added io.on('connection') to handle request_page events and emit page_data or error.

Updated / and /sitemap.xml to work with paginated track data.

Adjusted track retrieval in /:genre/track/:slug and /json/:genre to use allTracks for consistency.

index.ejs:

Added pagination controls (Previous/Next buttons) for each genre section, displaying current page and total pages.

Introduced page-container divs to manage paginated track displays, with active class for the current page.

Implemented client-side WebSocket logic with Socket.IO to request and render new pages dynamically.

Added page caching (pageCache) to store rendered pages and reduce server requests.

Enhanced lazy loading of iframes to apply to dynamically loaded pages.

Updated styling for page-container and iframes to ensure proper layout and responsiveness.

These changes enable users to navigate through tracks efficiently without loading all tracks at once, reduce server load, and provide a smoother browsing experience with real-time updates.
2025-06-22 02:54:41 -04:00
2f55294c3d moving to soundcloud.ts 2025-06-22 02:13:47 -04:00
3292de107a Adding Lofi playlist 2025-04-20 02:18:17 -04:00
659c792402 fix sitemap generator endpoint 2025-04-05 05:18:19 -04:00
d207dc9001 Delete cache_rap.json 2025-04-05 03:25:26 -04:00
b4e4939852 Delete cache_metal.json 2025-04-05 03:25:22 -04:00
af97ec9208 Delete cache_altrock.json 2025-04-05 03:25:17 -04:00
a62c4899de Delete cache.json.save 2025-04-05 03:25:06 -04:00
2442fb14ed edit ignore 2025-04-05 03:24:46 -04:00
826cf22c97 first 2025-04-05 03:22:34 -04:00