64 // setup handlers |
64 // setup handlers |
65 status('initializing handlers'); |
65 status('initializing handlers'); |
66 $httpd->add_handler('index', 'function', 'amarok_playlist'); |
66 $httpd->add_handler('index', 'function', 'amarok_playlist'); |
67 $httpd->add_handler('action.json', 'function', 'ajax_request_handler'); |
67 $httpd->add_handler('action.json', 'function', 'ajax_request_handler'); |
68 $httpd->add_handler('scripts', 'dir', './scripts'); |
68 $httpd->add_handler('scripts', 'dir', './scripts'); |
|
69 $httpd->add_handler('favicon.ico', 'file', './amarok_icon.ico'); |
|
70 $httpd->add_handler('apple-touch-icon.png', 'file', './apple-touch-icon.png'); |
69 $httpd->add_handler("themes/$theme", 'dir', "./themes/$theme"); |
71 $httpd->add_handler("themes/$theme", 'dir', "./themes/$theme"); |
70 $httpd->allow_dir_list = true; |
72 $httpd->allow_dir_list = true; |
71 $httpd->default_document = 'index'; |
73 $httpd->default_document = 'index'; |
72 |
74 |
73 status("Entering main server loop - ^C to interrupt, listening on port $port"); |
75 status("Entering main server loop - ^C to interrupt, listening on port $port"); |