-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable song metadata when either artist or title are passed. Add
configuration to allow to pass all metadata verbatim.
- Loading branch information
Showing
6 changed files
with
216 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
def fn() = | ||
def on_metadata(m) = | ||
if | ||
|
||
m["title"] == | ||
"the real title" | ||
|
||
and | ||
|
||
m["metadata_url"] == | ||
"metadata url" | ||
|
||
then | ||
test.pass() | ||
end | ||
end | ||
|
||
def on_connect(_) = | ||
thread.run( | ||
delay=1., | ||
{ | ||
icy.update_metadata( | ||
password="testtest", | ||
user="testtest", | ||
host="localhost", | ||
port=9834, | ||
mount="test", | ||
[ | ||
( | ||
"song", | ||
"song title" | ||
), | ||
( | ||
"title", | ||
"the real title" | ||
), | ||
( | ||
"url", | ||
"metadata url" | ||
) | ||
] | ||
) | ||
} | ||
) | ||
end | ||
|
||
s = | ||
input.harbor( | ||
buffer=0.1, | ||
password="testtest", | ||
user="testtest", | ||
"test", | ||
port=9834, | ||
on_connect=on_connect | ||
) | ||
|
||
s.on_metadata(on_metadata) | ||
output.dummy(fallible=true, s) | ||
output.icecast( | ||
%mp3, password="testtest", user="testtest", mount="test", port=9834, noise() | ||
) | ||
end | ||
|
||
test.check(fn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
def fn() = | ||
def on_metadata(m) = | ||
print(m) | ||
if | ||
m["title"] == "" | ||
and | ||
|
||
m["artist"] == | ||
"the artist" | ||
|
||
and | ||
|
||
m["metadata_url"] == | ||
"metadata url" | ||
|
||
then | ||
test.pass() | ||
end | ||
end | ||
|
||
def on_connect(_) = | ||
thread.run( | ||
delay=1., | ||
{ | ||
icy.update_metadata( | ||
password="testtest", | ||
user="testtest", | ||
host="localhost", | ||
port=9834, | ||
mount="test", | ||
[ | ||
( | ||
"song", | ||
"song title" | ||
), | ||
( | ||
"artist", | ||
"the artist" | ||
), | ||
( | ||
"url", | ||
"metadata url" | ||
) | ||
] | ||
) | ||
} | ||
) | ||
end | ||
|
||
s = | ||
input.harbor( | ||
buffer=0.1, | ||
password="testtest", | ||
user="testtest", | ||
"test", | ||
port=9834, | ||
on_connect=on_connect | ||
) | ||
|
||
s.on_metadata(on_metadata) | ||
output.dummy(fallible=true, s) | ||
output.icecast( | ||
%mp3, password="testtest", user="testtest", mount="test", port=9834, noise() | ||
) | ||
end | ||
|
||
test.check(fn) |