Podcast endpoints (#3140)

* Add: `AudioTrack.yaml`

* Fix: audiotrack example

* Initial: podcast schemas and endpoints

* Update schemas

* Add: podcasts tag

* Update bundled spec
This commit is contained in:
Nicholas W 2024-07-11 14:29:35 -07:00 committed by GitHub
parent acaf1ac196
commit c5e60d30e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1810 additions and 0 deletions

View file

@ -0,0 +1,74 @@
components:
schemas:
PodcastEpisode:
type: object
description: A single episode of a podcast.
properties:
libraryItemId:
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
podcastId:
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId'
id:
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/podcastId'
oldEpisodeId:
$ref: '../mediaTypes/Podcast.yaml#/components/schemas/oldPodcastId'
index:
type: integer
description: The index of the episode within the podcast.
nullable: true
season:
type: string
description: The season number of the episode.
nullable: true
episode:
type: string
description: The episode number within the season.
nullable: true
episodeType:
type: string
description: The type of episode (e.g., full, trailer).
nullable: true
title:
type: string
description: The title of the episode.
nullable: true
subtitle:
type: string
description: The subtitle of the episode.
nullable: true
description:
type: string
description: The description of the episode.
nullable: true
enclosure:
type: object
description: The enclosure object containing additional episode data.
nullable: true
additionalProperties: true
guid:
type: string
description: The globally unique identifier for the episode.
nullable: true
pubDate:
type: string
description: The publication date of the episode.
nullable: true
chapters:
type: array
description: The chapters within the episode.
items:
type: object
audioFile:
$ref: '../files/AudioFile.yaml#/components/schemas/audioFile'
publishedAt:
$ref: '../../schemas.yaml#/components/schemas/createdAt'
addedAt:
$ref: '../../schemas.yaml#/components/schemas/addedAt'
updatedAt:
$ref: '../../schemas.yaml#/components/schemas/updatedAt'
audioTrack:
$ref: '../files/AudioTrack.yaml#/components/schemas/AudioTrack'
duration:
$ref: '../../schemas.yaml#/components/schemas/durationSec'
size:
$ref: '../../schemas.yaml#/components/schemas/size'

View file

@ -0,0 +1,45 @@
components:
schemas:
AudioTrack:
type: object
description: Represents an audio track with various properties.
properties:
index:
type: integer
nullable: true
description: The index of the audio track.
example: null
startOffset:
type: number
format: float
nullable: true
description: The start offset of the audio track in seconds.
example: null
duration:
type: number
format: float
nullable: true
description: The duration of the audio track in seconds.
example: null
title:
type: string
nullable: true
description: The title of the audio track.
example: null
contentUrl:
type: string
nullable: true
description: The URL where the audio track content is located.
example: '`/api/items/${itemId}/file/${audioFile.ino}`'
mimeType:
type: string
nullable: true
description: The MIME type of the audio track.
example: null
codec:
type: string
nullable: true
description: The codec used for the audio track.
example: aac
metadata:
$ref: '../metadata/FileMetadata.yaml#/components/schemas/fileMetadata'

View file

@ -0,0 +1,74 @@
components:
schemas:
podcastId:
type: string
description: The ID of podcasts and podcast episodes after 2.3.0.
format: uuid
example: e4bb1afb-4a4f-4dd6-8be0-e615d233185b
oldPodcastId:
description: The ID of podcasts on server version 2.2.23 and before.
type: string
nullable: true
format: 'pod_[a-z0-9]{18}'
example: pod_o78uaoeuh78h6aoeif
Podcast:
type: object
description: A podcast containing multiple episodes.
properties:
id:
$ref: '#/components/schemas/podcastId'
libraryItemId:
$ref: '../LibraryItem.yaml#/components/schemas/libraryItemId'
metadata:
$ref: '../metadata/PodcastMetadata.yaml#/components/schemas/PodcastMetadata'
coverPath:
type: string
description: The file path to the podcast's cover image.
nullable: true
tags:
type: array
description: The tags associated with the podcast.
items:
type: string
episodes:
type: array
description: The episodes of the podcast.
items:
$ref: '../entities/PodcastEpisode.yaml#/components/schemas/PodcastEpisode'
autoDownloadEpisodes:
type: boolean
description: Whether episodes are automatically downloaded.
autoDownloadSchedule:
type: string
description: The schedule for automatic episode downloads, in cron format.
nullable: true
lastEpisodeCheck:
type: integer
description: The timestamp of the last episode check.
maxEpisodesToKeep:
type: integer
description: The maximum number of episodes to keep.
maxNewEpisodesToDownload:
type: integer
description: The maximum number of new episodes to download when automatically downloading epsiodes.
lastCoverSearch:
type: integer
description: The timestamp of the last cover search.
nullable: true
lastCoverSearchQuery:
type: string
description: The query used for the last cover search.
nullable: true
size:
type: integer
description: The total size of all episodes in bytes.
duration:
type: integer
description: The total duration of all episodes in seconds.
numTracks:
type: integer
description: The number of tracks (episodes) in the podcast.
latestEpisodePublished:
type: integer
description: The timestamp of the most recently published episode.

View file

@ -0,0 +1,59 @@
components:
schemas:
PodcastMetadata:
type: object
description: Metadata for a podcast.
properties:
title:
type: string
description: The title of the podcast.
nullable: true
author:
type: string
description: The author of the podcast.
nullable: true
description:
type: string
description: The description of the podcast.
nullable: true
releaseDate:
type: string
format: date-time
description: The release date of the podcast.
nullable: true
genres:
type: array
description: The genres of the podcast.
items:
type: string
feedUrl:
type: string
description: The URL of the podcast feed.
nullable: true
imageUrl:
type: string
description: The URL of the podcast's image.
nullable: true
itunesPageUrl:
type: string
description: The URL of the podcast's iTunes page.
nullable: true
itunesId:
type: string
description: The iTunes ID of the podcast.
nullable: true
itunesArtistId:
type: string
description: The iTunes artist ID of the podcast.
nullable: true
explicit:
type: boolean
description: Whether the podcast contains explicit content.
language:
type: string
description: The language of the podcast.
nullable: true
type:
type: string
description: The type of podcast (e.g., episodic, serial).
nullable: true