Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aura-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Kruse
aura-engine
Commits
5cf5ea8b
Commit
5cf5ea8b
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Ability to control scheduled fallbacks. #43
parent
5b2cf274
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/channels.py
+2
-1
2 additions, 1 deletion
modules/core/channels.py
modules/core/liquidsoap/playerclient.py
+27
-8
27 additions, 8 deletions
modules/core/liquidsoap/playerclient.py
with
29 additions
and
9 deletions
modules/core/channels.py
+
2
−
1
View file @
5cf5ea8b
...
@@ -35,6 +35,7 @@ class Channel(Enum):
...
@@ -35,6 +35,7 @@ class Channel(Enum):
"""
"""
FILESYSTEM_A
=
"
in_filesystem_0
"
FILESYSTEM_A
=
"
in_filesystem_0
"
FILESYSTEM_B
=
"
in_filesystem_1
"
FILESYSTEM_B
=
"
in_filesystem_1
"
SCHEDULED_FALLBACK
=
"
playlist_fallback_scheduled
"
HTTP_A
=
"
in_http_0
"
HTTP_A
=
"
in_http_0
"
HTTP_B
=
"
in_http_1
"
HTTP_B
=
"
in_http_1
"
HTTPS_A
=
"
in_https_0
"
HTTPS_A
=
"
in_https_0
"
...
@@ -56,7 +57,7 @@ class ChannelType(Enum):
...
@@ -56,7 +57,7 @@ class ChannelType(Enum):
FILESYSTEM
=
{
FILESYSTEM
=
{
"
id
"
:
"
fs
"
,
"
id
"
:
"
fs
"
,
"
numeric
"
:
0
,
"
numeric
"
:
0
,
"
channels
"
:
[
Channel
.
FILESYSTEM_A
,
Channel
.
FILESYSTEM_B
]
"
channels
"
:
[
Channel
.
FILESYSTEM_A
,
Channel
.
FILESYSTEM_B
,
Channel
.
SCHEDULED_FALLBACK
]
}
}
HTTP
=
{
HTTP
=
{
"
id
"
:
"
http
"
,
"
id
"
:
"
http
"
,
...
...
This diff is collapsed.
Click to expand it.
modules/core/liquidsoap/playerclient.py
+
27
−
8
View file @
5cf5ea8b
...
@@ -121,10 +121,10 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
...
@@ -121,10 +121,10 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
def
playlist_push
(
self
,
channel
,
uri
):
def
playlist_push
(
self
,
channel
,
uri
):
"""
"""
Pushes the passed file URI to the playlist channel.
Pushes the passed file URI to the
`equeue`
playlist channel.
Args:
Args:
channel (String): Liquidsoap
Channel
ID
channel (String): Liquidsoap
Source
ID
uri (String): Path to the file
uri (String): Path to the file
"""
"""
self
.
command
(
channel
,
'
push
'
,
uri
)
self
.
command
(
channel
,
'
push
'
,
uri
)
...
@@ -133,10 +133,10 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
...
@@ -133,10 +133,10 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
def
playlist_seek
(
self
,
channel
,
duration
):
def
playlist_seek
(
self
,
channel
,
duration
):
"""
"""
Forward the playing track/playlist of the given channel.
Forward the playing
`equeue`
track/playlist of the given channel.
Args:
Args:
channel (String): Liquidsoap
Channel
ID
channel (String): Liquidsoap
Source
ID
duration (Integer): Seek duration ins seconds
duration (Integer): Seek duration ins seconds
Returns:
Returns:
...
@@ -148,19 +148,38 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
...
@@ -148,19 +148,38 @@ class LiquidSoapPlayerClient(LiquidSoapClient):
def
playlist_clear
(
self
,
channel
):
def
playlist_clear
(
self
,
channel
):
"""
"""
Clears all playlist entries of the given channel.
Clears all
`equeue`
playlist entries of the given channel.
Args:
Args:
channel (String): Liquidsoap
Channel
ID
channel (String): Liquidsoap
Source
ID
duration (Integer): Seek duration ins seconds
duration (Integer): Seek duration ins seconds
Returns:
Returns:
Liquidsoap server response
Liquidsoap server response
"""
"""
if
channel
==
Channel
.
FILESYSTEM_A
.
value
:
if
channel
==
Channel
.
FILESYSTEM_A
.
value
:
self
.
command
(
channel
,
'
clear
_filesystem_0
'
)
self
.
command
(
channel
,
'
clear
'
)
elif
channel
==
Channel
.
FILESYSTEM_B
.
value
:
elif
channel
==
Channel
.
FILESYSTEM_B
.
value
:
self
.
command
(
channel
,
'
clear_filesystem_1
'
)
self
.
command
(
channel
,
'
clear
'
)
else
:
return
"
Invalid filesystem channel
'
%s
'"
%
channel
return
self
.
message
def
playlist_uri
(
self
,
channel
,
uri
):
"""
Sets the URI of a playlist source.
Args:
channel (String): Liquidsoap Source ID
uri (String): URI to the playlist file
Returns:
Liquidsoap server response
"""
if
channel
==
Channel
.
SCHEDULED_FALLBACK
.
value
:
self
.
command
(
channel
,
'
uri
'
,
uri
)
else
:
else
:
return
"
Invalid filesystem channel
'
%s
'"
%
channel
return
"
Invalid filesystem channel
'
%s
'"
%
channel
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment