Skip to content

Commit 2a13c47

Browse files
authored
Merge pull request #444 from arabcoders/dev
v1.0.1
2 parents f91811a + 568d92c commit 2a13c47

File tree

21 files changed

+1526
-245
lines changed

21 files changed

+1526
-245
lines changed

.github/workflows/build-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- master
10+
- dev
1011
paths-ignore:
1112
- "**.md"
1213
- ".github/ISSUE_TEMPLATE/**"

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"jmespath",
8888
"jsonschema",
8989
"kibibytes",
90+
"Kodi",
9091
"lastgroup",
9192
"levelno",
9293
"libcurl",

API.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ This document describes the available endpoints and their usage. All endpoints r
3535
- [POST /api/tasks/inspect](#post-apitasksinspect)
3636
- [POST /api/tasks/{id}/mark](#post-apitasksidmark)
3737
- [DELETE /api/tasks/{id}/mark](#delete-apitasksidmark)
38+
- [POST /api/tasks/{id}/metadata](#post-apitasksidmetadata)
3839
- [GET /api/task\_definitions/](#get-apitask_definitions)
3940
- [GET /api/task\_definitions/{identifier}](#get-apitask_definitionsidentifier)
4041
- [POST /api/task\_definitions/](#post-apitask_definitions)
@@ -658,6 +659,58 @@ or
658659

659660
---
660661

662+
### POST /api/tasks/{id}/metadata
663+
**Purpose**: Generate metadata files for a scheduled task, including NFO files, thumbnails, and JSON metadata compatible with media centers.
664+
665+
**Path Parameter**:
666+
- `id`: Task ID.
667+
668+
**Response**:
669+
```json
670+
{
671+
"id": "channel_or_playlist_id",
672+
"id_type": "youtube|twitch|...",
673+
"title": "Channel/Playlist Title",
674+
"description": "Description text...",
675+
"uploader": "Uploader name",
676+
"tags": ["tag1", "tag2"],
677+
"year": 2024,
678+
"json_file": "path/to/Title [id].info.json",
679+
"nfo_file": "path/to/tvshow.nfo",
680+
"thumbnails": {
681+
"poster": "path/to/poster.jpg",
682+
"fanart": "path/to/fanart.jpg",
683+
"thumb": "path/to/thumb.jpg",
684+
"banner": "path/to/banner.jpg",
685+
"icon": "path/to/icon.jpg",
686+
"landscape": "path/to/landscape.jpg"
687+
}
688+
}
689+
```
690+
or
691+
```json
692+
{ "error": "..." }
693+
```
694+
695+
**Files Generated**:
696+
- `tvshow.nfo` - NFO file for media center compatibility (Kodi, Jellyfin, Emby, etc.)
697+
- `Title [id].info.json` - yt-dlp metadata file.
698+
- `poster.jpg`, `fanart.jpg`, `thumb.jpg`, `banner.jpg`, `icon.jpg`, `landscape.jpg` - Thumbnail images (if available from the source)
699+
700+
**Notes**:
701+
- This endpoint fetches metadata from the URL associated with the task
702+
- Files are saved to the task's configured folder (or default download path)
703+
- Existing files will be overwritten.
704+
- Thumbnail images are only downloaded if available from the source.
705+
- The NFO file follows the Kodi tvshow.nfo format
706+
707+
**Status Codes**:
708+
- `200 OK` - Metadata generated successfully
709+
- `400 Bad Request` - Missing task ID, invalid folder path, or failed to fetch metadata
710+
- `404 Not Found` - Task does not exist
711+
712+
---
713+
661714
### GET /api/task_definitions/
662715
**Purpose**: Retrieve all task definitions.
663716

0 commit comments

Comments
 (0)