From: David ‘Bombe’ Roden Date: Mon, 27 May 2013 13:48:49 +0000 (+0200) Subject: Use title for Icecast metadata. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3aca6eb7580456837944877d798f207c4a82e964;p=sonitus.git Use title for Icecast metadata. --- 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;