Merge remote-tracking branch 'airsonic/pr/939'

master
Andrew DeMaria 6 years ago
commit 570abe69d5
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 6
      airsonic-main/src/main/java/org/airsonic/player/service/UPnPService.java

@ -22,6 +22,7 @@ package org.airsonic.player.service;
import org.airsonic.player.service.upnp.ApacheUpnpServiceConfiguration;
import org.airsonic.player.service.upnp.CustomContentDirectory;
import org.airsonic.player.service.upnp.MSMediaReceiverRegistrarService;
import org.apache.commons.io.IOUtils;
import org.fourthline.cling.UpnpService;
import org.fourthline.cling.UpnpServiceImpl;
import org.fourthline.cling.binding.annotations.AnnotationLocalServiceBinder;
@ -43,6 +44,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import java.io.*;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@ -155,7 +157,9 @@ public class UPnPService {
new ModelDetails(serverName),
new DLNADoc[]{new DLNADoc("DMS", DLNADoc.Version.V1_5)}, null);
Icon icon = new Icon("image/png", 512, 512, 32, "logo-512", getClass().getResourceAsStream("logo-512.png"));
InputStream in = getClass().getResourceAsStream("logo-512.png");
Icon icon = new Icon("image/png", 512, 512, 32, "logo-512", in);
IOUtils.closeQuietly(in);
LocalService<CustomContentDirectory> contentDirectoryservice = new AnnotationLocalServiceBinder().read(CustomContentDirectory.class);
contentDirectoryservice.setManager(new DefaultServiceManager<CustomContentDirectory>(contentDirectoryservice) {

Loading…
Cancel
Save