mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 13:16:37 +00:00
Add station IANA timezone to NowPlaying/Station public responses.
This commit is contained in:
parent
0a3693f792
commit
6b511b0803
|
@ -474,6 +474,11 @@ export interface ApiNowPlayingStation {
|
|||
* @example "liquidsoap"
|
||||
*/
|
||||
backend?: string;
|
||||
/**
|
||||
* The station's IANA time zone
|
||||
* @example "America/Chicago"
|
||||
*/
|
||||
timezone?: string;
|
||||
/**
|
||||
* The full URL to listen to the default mount of the station
|
||||
* @example "http://localhost:8000/radio.mp3"
|
||||
|
|
|
@ -51,6 +51,12 @@ final class Station implements ResolvableUrlInterface
|
|||
)]
|
||||
public string $backend = '';
|
||||
|
||||
#[OA\Property(
|
||||
description: 'The station\'s IANA time zone',
|
||||
example: 'America/Chicago'
|
||||
)]
|
||||
public string $timezone = '';
|
||||
|
||||
#[OA\Property(
|
||||
description: 'The full URL to listen to the default mount of the station',
|
||||
example: 'http://localhost:8000/radio.mp3'
|
||||
|
|
|
@ -33,6 +33,7 @@ final class StationApiGenerator
|
|||
$response->description = (string)$station->getDescription();
|
||||
$response->frontend = $station->getFrontendType()->value;
|
||||
$response->backend = $station->getBackendType()->value;
|
||||
$response->timezone = $station->getTimezone();
|
||||
$response->url = $station->getUrl();
|
||||
$response->is_public = $station->getEnablePublicPage();
|
||||
$response->listen_url = $frontend?->getStreamUrl($station, $baseUri);
|
||||
|
|
|
@ -3816,6 +3816,10 @@ components:
|
|||
description: 'Which AutoDJ software (backend) the station uses'
|
||||
type: string
|
||||
example: liquidsoap
|
||||
timezone:
|
||||
description: "The station's IANA time zone"
|
||||
type: string
|
||||
example: America/Chicago
|
||||
listen_url:
|
||||
description: 'The full URL to listen to the default mount of the station'
|
||||
example: 'http://localhost:8000/radio.mp3'
|
||||
|
|
Loading…
Reference in New Issue
Block a user