From 254f276bf7977ebaa65651525c2ea145b6b72018 Mon Sep 17 00:00:00 2001 From: gotolombok Date: Sat, 31 Jan 2026 17:35:36 +0800 Subject: [PATCH] feat: Bump version to 1.1.0, add CHANGELOG.md, and implement concurrency support with enhanced session management. --- CHANGELOG.md | 20 ++++++++++++++++++++ package.json | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6cfd9ec --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [1.1.0] - 2026-01-31 + +### Added +- **Concurrency Support**: Implemented a per-request architecture where `MovieBoxAPI` and `SessionManager` are instantiated for each request. This isolates user sessions and prevents race conditions under high load. +- **Enhanced /download Endpoint**: The `/download` endpoint now mirrors the logic of `/sources`, including session warm-up and reliable resource retrieval for both Movies and Series. +- **Session Warm-up**: Implemented automatic scraping of the content detail page to capture necessary session cookies and `uid` before making API calls. +- **UID Propagation**: The `uid` is now correctly extracted and sent with all `/play` and `/download` requests, ensuring authorization. + +### Fixed +- **Empty Results**: Fixed an issue where `/sources` and `/download` returned empty arrays due to missing session data and incorrect headers. +- **Series Playback**: Resolved specific issues with Series content by standardizing the `Referer` path to `/movies/` (which is used by the upstream source for all content types). +- **API Stability**: Fixed "unresponsiveness" and cross-user session pollution by removing Singleton antipatterns. + +### Changed +- **Documentation**: Updated `API.md` and `README.md` to reflect the new architecture and endpoint requirements (removed `detailPath` from `/download` params). +- **Architecture**: Refactored `api.js` and `session.js` to export Classes instead of singletons. diff --git a/package.json b/package.json index 3ade250..848d3a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moviebox-api-node", - "version": "1.0.0", + "version": "1.1.0", "description": "Node.js port of the MovieBox API wrapper", "main": "index.js", "scripts": {