Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d1bdea8e
Commit
d1bdea8e
authored
Jan 20, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shout_tls' of
git://github.com/JakobOvrum/MPD
parents
3a0480a4
0cea67ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
NEWS
NEWS
+2
-0
plugins.rst
doc/plugins.rst
+2
-0
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+20
-0
No files found.
NEWS
View file @
d1bdea8e
ver 0.21.5 (not yet released)
* tags
- ape: map "Album Artist"
* output
- shout: add support for TLS
ver 0.21.4 (2019/01/04)
* database
...
...
doc/plugins.rst
View file @
d1bdea8e
...
...
@@ -974,6 +974,8 @@ You must set a format.
- Set the timeout for the shout connection in seconds. Defaults to 2 seconds.
* - **protocol icecast2|icecast1|shoutcast**
- Specifies the protocol that wil be used to connect to the server. The default is "icecast2".
* - **tls disabled|auto|auto_no_plain|rfc2818|rfc2817**
- Specifies what kind of TLS to use. The default is "disabled" (no TLS).
* - **mount URI**
- Mounts the :program:`MPD` stream in the specified URI.
* - **user USERNAME**
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
d1bdea8e
...
...
@@ -141,6 +141,25 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
protocol
=
SHOUT_PROTOCOL_HTTP
;
}
unsigned
tls
;
value
=
block
.
GetBlockValue
(
"tls"
);
if
(
value
!=
nullptr
)
{
if
(
0
==
strcmp
(
value
,
"disabled"
))
tls
=
SHOUT_TLS_DISABLED
;
else
if
(
0
==
strcmp
(
value
,
"auto"
))
tls
=
SHOUT_TLS_AUTO
;
else
if
(
0
==
strcmp
(
value
,
"auto_no_plain"
))
tls
=
SHOUT_TLS_AUTO_NO_PLAIN
;
else
if
(
0
==
strcmp
(
value
,
"rfc2818"
))
tls
=
SHOUT_TLS_RFC2818
;
else
if
(
0
==
strcmp
(
value
,
"rfc2817"
))
tls
=
SHOUT_TLS_RFC2817
;
else
throw
FormatRuntimeError
(
"invalid shout TLS option
\"
%s
\"
"
,
value
);
}
else
{
tls
=
SHOUT_TLS_DISABLED
;
}
if
(
shout_set_host
(
shout_conn
,
host
)
!=
SHOUTERR_SUCCESS
||
shout_set_port
(
shout_conn
,
port
)
!=
SHOUTERR_SUCCESS
||
shout_set_password
(
shout_conn
,
passwd
)
!=
SHOUTERR_SUCCESS
||
...
...
@@ -151,6 +170,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
shout_set_format
(
shout_conn
,
shout_format
)
!=
SHOUTERR_SUCCESS
||
shout_set_protocol
(
shout_conn
,
protocol
)
!=
SHOUTERR_SUCCESS
||
shout_set_tls
(
shout_conn
,
tls
)
!=
SHOUTERR_SUCCESS
||
shout_set_agent
(
shout_conn
,
"MPD"
)
!=
SHOUTERR_SUCCESS
)
throw
std
::
runtime_error
(
shout_get_error
(
shout_conn
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment