greyhound.php
changeset 58 05a69bab5f10
parent 55 b8a3c9c54fbe
child 64 ee64bb096f56
--- a/greyhound.php	Sun Nov 23 23:43:52 2008 -0500
+++ b/greyhound.php	Sun Nov 23 23:43:59 2008 -0500
@@ -112,7 +112,27 @@
 rebuild_playlist();
 
 // startup webserver
-$ip = ( $public ) ? '0.0.0.0' : '127.0.0.1';
+$ip = array();
+if ( !$enable_ipv4 && !$enable_ipv6 )
+{
+  warning('Both IPv4 and IPv6 are disabled, enabling IPv4 access');
+  $enable_ipv4 = true;
+}
+if ( $public )
+{
+  if ( $enable_ipv6 )
+    $ip[] = '::';
+  if ( $enable_ipv4 )
+    $ip[] = '0.0.0.0';
+}
+else
+{
+  if ( $enable_ipv6 )
+    $ip[] = '::1';
+  if ( $enable_ipv4 )
+    $ip[] = '127.0.0.1';
+}
+
 $port = 7447;
 
 try
@@ -160,6 +180,7 @@
   $httpd->add_handler('favicon.ico',          'file',     GREY_ROOT . '/amarok_icon.ico');
   $httpd->add_handler('apple-touch-icon.png', 'file',     GREY_ROOT . '/apple-touch-icon.png');
   $httpd->add_handler('spacer.gif',           'file',     GREY_ROOT . '/spacer.gif');
+  $httpd->add_handler('trans80.png',          'file',     GREY_ROOT . '/trans80.png');
   $httpd->threader->ipc_register('reloadconfig', 'grey_reload_config');
   // load all themes if forking is enabled
   // Themes are loaded when the playlist is requested. This is fine for