use of org.libresonic.player.service.upnp.ApacheUpnpServiceConfiguration in project libresonic by Libresonic.
the class UPnPService method createService.
private synchronized void createService() throws Exception {
upnpService = new UpnpServiceImpl(new ApacheUpnpServiceConfiguration());
// Asynch search for other devices (most importantly UPnP-enabled routers for port-mapping)
upnpService.getControlPoint().search();
// Start DLNA media server?
setMediaServerEnabled(settingsService.isDlnaEnabled());
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
System.err.println("Shutting down UPnP service...");
upnpService.shutdown();
System.err.println("Shutting down UPnP service - Done!");
}
});
}
Aggregations