Skip to content
Snippets Groups Projects
Commit 1315f3d0 authored by David Trattnig's avatar David Trattnig
Browse files

Test: Metadata build

parent ed45be13
No related branches found
No related tags found
1 merge request!3Liquidsoap 2 migration
#!/usr/bin/env liquidsoap
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-now() - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
%include "base_config.liq"
%include "../src/functions.liq"
json_string = "{ \
\"show_name\": \"Laser Music 2000\", \
\"show_id\": -1, \
\"timeslot_id\": -1, \
\"playlist_id\": -1, \
\"playlist_item\": \"\", \
\"track_type\": 0, \
\"track_start\": \"2022/02/22 22:02:22\", \
\"track_duration\": 303, \
\"track_title\": \"FooBar 2000\", \
\"track_album\": \"\", \
\"track_artist\": \"\" \
}"
metadata = build_metadata(json_string)
title = metadata["track_title"]
print("Track title: #{title}")
assertEquals(title, "FooBar 2000")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment