From cd17f85f81901fbe6163d707ea96208a9f836d4c Mon Sep 17 00:00:00 2001 From: nuttylmao <76841561+nuttylmao@users.noreply.github.com> Date: Mon, 29 Jun 2026 04:44:51 +1000 Subject: [PATCH] Update README.md --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7de05c3..1ba412d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ This lightweight system tray application allows evelopers can easily create thei Simply open run the application, and a local web server will run in the background, accessible via `http://127.0.0.1:5000/now-playing/` +## Quick Start +1. Download the latest `.exe` from the [Releases page](releases). +2. Run the application — a tray icon will appear. +3. Right-click the icon to view the API. + ### Endpoints | Method | Endpoint | Description | @@ -13,10 +18,46 @@ Simply open run the application, and a local web server will run in the backgrou | `GET` | `/now-playing` | Returns the current media state as JSON. | | `GET` | `/sessions` | Returns a list of all active media sessions. | -## Quick Start -1. Download the latest `.exe` from the [Releases page](releases). -2. Run the application — a tray icon will appear. -3. Right-click the icon to view the API. +### Data Schema +The `/now-playing` endpoint provides a real-time snapshot of your active media sessions. Developers can integrate this into their own web widgets using the following JSON structure: + +```json +{ + "app_version": "0.0.1", + "current_session_id": "string", + "sessions": [ + { + "source_app_id": "string", + "media_properties": { + "Title": "string", + "Artist": "string", + "AlbumTitle": "string", + "AlbumArtist": "string", + "Thumbnail": "string (base64)", + "AlbumTrackCount": "integer", + "TrackNumber": "integer", + "Genres": "array of strings", + "Subtitle": "string" + }, + "playback_info": { + "PlaybackStatus": "integer", + "PlaybackType": "integer", + "PlaybackRate": "number or null", + "IsShuffleActive": "boolean", + "AutoRepeatMode": "integer" + }, + "timeline_properties": { + "Position": "integer (ms)", + "StartTime": "integer (ms)", + "EndTime": "integer (ms)", + "MinSeekTime": "integer (ms)", + "MaxSeekTime": "integer (ms)", + "LastUpdatedTime": "string (ISO 8601)" + } + } + ] +} +``` ## Credits Built and maintained by **nutty**.