equal
deleted
inserted
replaced
64 $smarty->display('playlist.tpl'); |
64 $smarty->display('playlist.tpl'); |
65 } |
65 } |
66 |
66 |
67 function artwork_request_handler($httpd, $socket) |
67 function artwork_request_handler($httpd, $socket) |
68 { |
68 { |
69 global $homedir; |
69 global $amarok_home; |
70 |
70 |
71 if ( !isset($_GET['artist']) || !isset($_GET['album']) ) |
71 if ( !isset($_GET['artist']) || !isset($_GET['album']) ) |
72 { |
72 { |
73 echo 'Please specify artist and album.'; |
73 echo 'Please specify artist and album.'; |
74 return; |
74 return; |
75 } |
75 } |
76 // get hash |
76 // get hash |
77 $artwork_hash = md5( strtolower(trim($_GET['artist'])) . strtolower(trim($_GET['album'])) ); |
77 $artwork_hash = md5( strtolower(trim($_GET['artist'])) . strtolower(trim($_GET['album'])) ); |
78 $artwork_dir = "$homedir/.kde/share/apps/amarok/albumcovers"; |
78 $artwork_dir = "$amarok_home/albumcovers"; |
79 if ( file_exists("$artwork_dir/large/$artwork_hash") ) |
79 if ( file_exists("$artwork_dir/large/$artwork_hash") ) |
80 { |
80 { |
81 // artwork file found - scale and convert to PNG |
81 // artwork file found - scale and convert to PNG |
82 if ( !is_dir("$artwork_dir/greyhoundthumbnails") ) |
82 if ( !is_dir("$artwork_dir/greyhoundthumbnails") ) |
83 { |
83 { |