SrGooglo 8482f2e457 Feat: Implement Music Library and overhaul Studio TV
- Introduces a new Music Library system for managing favorites (tracks,
  playlists, releases), replacing the previous TrackLike model.
- Completely revamps the Studio TV profile page, adding live statistics,
  stream configuration, restream management, and media URL display.
- Enhances the media player with a custom seekbar and improved audio
  playback logic for MPD and non-MPD sources.
- Lays foundational groundwork for chat encryption with new models and APIs.
- Refactors critical UI components like PlaylistView and PagePanel.
- Standardizes monorepo development scripts to use npm.
- Updates comty.js submodule and adds various new UI components.
2025-05-10 02:32:41 +00:00

28 lines
460 B
JavaScript

import { MusicRelease } from "@db_models"
export default async (req) => {
const { limit = 50, page = 0, user_id } = req.query
const trim = limit * page
const query = {
public: true,
}
if (user_id) {
query.user_id = user_id
}
const total_items = await MusicRelease.countDocuments(query)
const items = await MusicRelease.find(query)
.limit(limit)
.skip(trim)
.sort({ _id: -1 })
return {
total_items: total_items,
items: items,
}
}