greyhound.php
changeset 27 20a36fe254c9
parent 25 5c377ceb0e4c
child 29 8210fdc7c317
child 32 86140ed9087d
equal deleted inserted replaced
26:300d374d89b0 27:20a36fe254c9
    38 // The default theme. This should be a name of a directory in ./themes.
    38 // The default theme. This should be a name of a directory in ./themes.
    39 $theme = 'funkymonkey';
    39 $theme = 'funkymonkey';
    40 // Allow forking when an HTTP request is received. This has advantages
    40 // Allow forking when an HTTP request is received. This has advantages
    41 // and disadvantages. If this experimental option is enabled, it will
    41 // and disadvantages. If this experimental option is enabled, it will
    42 // result in faster responses and load times but more memory usage.
    42 // result in faster responses and load times but more memory usage.
    43 $allow_fork = false;
    43 $allow_fork = true;
    44 // set to true to enable authentication
    44 // set to true to enable authentication
    45 // WARNING: THIS HAS SOME SERIOUS SECURITY PROBLEMS RIGHT NOW. I don't
    45 // WARNING: THIS HAS SOME SERIOUS SECURITY PROBLEMS RIGHT NOW. I don't
    46 // know what's causing it to not prompt for authentication from any
    46 // know what's causing it to not prompt for authentication from any
    47 // client after the first successful auth.
    47 // client after the first successful auth.
    48 $use_auth = false;
    48 $use_auth = false;
    72 define('SMARTY_DIR', GREY_ROOT . '/smarty/');
    72 define('SMARTY_DIR', GREY_ROOT . '/smarty/');
    73 require(GREY_ROOT . '/smarty/Smarty.class.php');
    73 require(GREY_ROOT . '/smarty/Smarty.class.php');
    74 require(GREY_ROOT . '/playlist.php');
    74 require(GREY_ROOT . '/playlist.php');
    75 require(GREY_ROOT . '/json.php');
    75 require(GREY_ROOT . '/json.php');
    76 require(GREY_ROOT . '/ajax.php');
    76 require(GREY_ROOT . '/ajax.php');
       
    77 require(GREY_ROOT . '/imagetools.php');
    77 
    78 
    78 status('doing home directory detection');
    79 status('doing home directory detection');
    79 
    80 
    80 // get home directory
    81 // get home directory
    81 
    82 
   116   
   117   
   117   // setup handlers
   118   // setup handlers
   118   status('initializing handlers');
   119   status('initializing handlers');
   119   $httpd->add_handler('index',                'function', 'amarok_playlist');
   120   $httpd->add_handler('index',                'function', 'amarok_playlist');
   120   $httpd->add_handler('action.json',          'function', 'ajax_request_handler');
   121   $httpd->add_handler('action.json',          'function', 'ajax_request_handler');
       
   122   $httpd->add_handler('artwork',              'function', 'artwork_request_handler');
   121   $httpd->add_handler('scripts',              'dir',      GREY_ROOT . '/scripts');
   123   $httpd->add_handler('scripts',              'dir',      GREY_ROOT . '/scripts');
   122   $httpd->add_handler('favicon.ico',          'file',     GREY_ROOT . '/amarok_icon.ico');
   124   $httpd->add_handler('favicon.ico',          'file',     GREY_ROOT . '/amarok_icon.ico');
   123   $httpd->add_handler('apple-touch-icon.png', 'file',     GREY_ROOT . '/apple-touch-icon.png');
   125   $httpd->add_handler('apple-touch-icon.png', 'file',     GREY_ROOT . '/apple-touch-icon.png');
   124   // load all themes if forking is enabled
   126   // load all themes if forking is enabled
   125   // Themes are loaded when the playlist is requested. This is fine for
   127   // Themes are loaded when the playlist is requested. This is fine for