feat: add mobile devices stream config field (#2744)

This commit is contained in:
Jonas L 2023-10-14 09:13:04 +02:00 committed by GitHub
parent 8fb2a5d4e3
commit b2e512cbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 1 deletions

View File

@ -264,6 +264,10 @@ stream:
# Icecast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# Shoutcast output streams.
# > max items is 1
shoutcast:
@ -309,6 +313,10 @@ stream:
# Shoutcast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# System outputs.
# > max items is 1
system:

View File

@ -264,6 +264,10 @@ stream:
# Icecast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# Shoutcast output streams.
# > max items is 1
shoutcast:
@ -309,6 +313,10 @@ stream:
# Shoutcast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# System outputs.
# > max items is 1
system:

View File

@ -264,6 +264,10 @@ stream:
# Icecast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# Shoutcast output streams.
# > max items is 1
shoutcast:
@ -309,6 +313,10 @@ stream:
# Shoutcast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# System outputs.
# > max items is 1
system:

View File

@ -451,6 +451,10 @@ stream:
website: "https://libretime.org"
# Icecast stream genre.
genre: "various"
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
```
#### Shoutcast
@ -504,6 +508,10 @@ stream:
website: "https://libretime.org"
# Shoutcast stream genre.
genre: "various"
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
```
#### System

View File

@ -264,6 +264,10 @@ stream:
# Icecast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# Shoutcast output streams.
# > max items is 1
shoutcast:
@ -309,6 +313,10 @@ stream:
# Shoutcast stream genre.
genre: various
# Whether the stream should be used for mobile devices.
# > default is false
mobile: false
# System outputs.
# > max items is 1
system:

View File

@ -171,6 +171,7 @@ class Schema implements ConfigurationInterface
/* */->scalarNode('description')->end()
/* */->scalarNode('website')->end()
/* */->scalarNode('genre')->end()
/* */->booleanNode('mobile')->defaultFalse()->end()
/**/->end()->end()->end()
// Shoutcast outputs
@ -200,6 +201,7 @@ class Schema implements ConfigurationInterface
/* */->scalarNode('name')->end()
/* */->scalarNode('website')->end()
/* */->scalarNode('genre')->end()
/* */->booleanNode('mobile')->defaultFalse()->end()
/**/->end()->end()->end()
// System outputs

View File

@ -62,7 +62,7 @@ class Application_Model_StreamConfig
$prefix . 'description' => $output['description'] ?? '',
$prefix . 'genre' => $output['genre'] ?? '',
$prefix . 'url' => $output['website'] ?? '',
$prefix . 'mobile' => 'false',
$prefix . 'mobile' => $output['mobile'] ?? 'false',
// $prefix . 'liquidsoap_error' => 'waiting',
];
}

View File

@ -220,6 +220,8 @@ class IcecastOutput(BaseModel):
website: Optional[str] = None
genre: Optional[str] = None
mobile: bool = False
_mount_no_leading_slash = no_leading_slash_validator("mount")
@ -244,6 +246,8 @@ class ShoutcastOutput(BaseModel):
website: Optional[str] = None
genre: Optional[str] = None
mobile: bool = False
class SystemOutputKind(str, Enum):
ALSA = "alsa"