From 3aca6eb7580456837944877d798f207c4a82e964 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 27 May 2013 15:48:49 +0200 Subject: [PATCH] Use title for Icecast metadata. --- .../net/pterodactylus/sonitus/data/sink/Icecast2Sink.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java index ce55669..87d9496 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java @@ -23,7 +23,6 @@ import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.net.Socket; import java.net.URLEncoder; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.logging.Level; @@ -35,10 +34,6 @@ import net.pterodactylus.sonitus.data.Sink; import net.pterodactylus.sonitus.data.event.MetadataUpdated; import net.pterodactylus.sonitus.io.InputStreamDrainer; -import com.google.common.base.Function; -import com.google.common.base.Joiner; -import com.google.common.base.Optional; -import com.google.common.collect.FluentIterable; import com.google.common.eventbus.EventBus; import com.google.common.io.BaseEncoding; import com.google.common.io.Closeables; @@ -184,13 +179,7 @@ public class Icecast2Sink implements Sink { @Override public void run() { - String metadataString = String.format("%s (%s)", Joiner.on(" - ").skipNulls().join(FluentIterable.from(Arrays.asList(metadata.artist(), metadata.name())).transform(new Function, Object>() { - - @Override - public Object apply(Optional input) { - return input.orNull(); - } - })), "Sonitus"); + String metadataString = String.format("%s (%s)", metadata.title(), "Sonitus"); logger.info(String.format("Updating metadata to %s", metadataString)); Socket socket = null; -- 2.7.4